diff options
author | Mike Crute <mcrute@gmail.com> | 2010-02-20 15:01:12 -0500 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2010-02-20 15:01:12 -0500 |
commit | 30be67b3319167c9c4962006c66615cce4b1afb5 (patch) | |
tree | b22979c18b4b5194500661be8fe0f2e282078c80 /snakeplan | |
download | snakeplan-30be67b3319167c9c4962006c66615cce4b1afb5.tar.bz2 snakeplan-30be67b3319167c9c4962006c66615cce4b1afb5.tar.xz snakeplan-30be67b3319167c9c4962006c66615cce4b1afb5.zip |
Fixing pluralization of stories
Diffstat (limited to 'snakeplan')
-rwxr-xr-x | snakeplan/__init__.py | 0 | ||||
-rw-r--r-- | snakeplan/data.json | 1 | ||||
-rwxr-xr-x | snakeplan/manage.py | 11 | ||||
-rwxr-xr-x | snakeplan/projects/__init__.py | 0 | ||||
-rw-r--r-- | snakeplan/projects/admin.py | 8 | ||||
-rwxr-xr-x | snakeplan/projects/models.py | 98 | ||||
-rw-r--r-- | snakeplan/projects/templates/footer.html | 2 | ||||
-rw-r--r-- | snakeplan/projects/templates/header.html | 4 | ||||
-rw-r--r-- | snakeplan/projects/templates/projects/iteration_list.html | 18 | ||||
-rw-r--r-- | snakeplan/projects/templates/projects/project_list.html | 7 | ||||
-rw-r--r-- | snakeplan/projects/templates/stories/story_list.html | 0 | ||||
-rwxr-xr-x | snakeplan/projects/tests.py | 23 | ||||
-rw-r--r-- | snakeplan/projects/urls.py | 8 | ||||
-rw-r--r-- | snakeplan/projects/views/__init__.py | 0 | ||||
-rw-r--r-- | snakeplan/projects/views/projects.py | 23 | ||||
-rw-r--r-- | snakeplan/projects/views/stories.py | 10 | ||||
-rw-r--r-- | snakeplan/readme_urls.txt | 42 | ||||
-rwxr-xr-x | snakeplan/settings.py | 55 | ||||
-rw-r--r-- | snakeplan/snakeplan.db | bin | 0 -> 83968 bytes | |||
-rwxr-xr-x | snakeplan/urls.py | 13 |
20 files changed, 323 insertions, 0 deletions
diff --git a/snakeplan/__init__.py b/snakeplan/__init__.py new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/snakeplan/__init__.py | |||
diff --git a/snakeplan/data.json b/snakeplan/data.json new file mode 100644 index 0000000..89b1e1d --- /dev/null +++ b/snakeplan/data.json | |||
@@ -0,0 +1 @@ | |||
[{"pk": 22, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 8}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_message", "name": "Can add message", "content_type": 4}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 1}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_message", "name": "Can change message", "content_type": 4}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 1}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_message", "name": "Can delete message", "content_type": 4}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 1}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 5}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_iteration", "name": "Can add iteration", "content_type": 10}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_loggedtime", "name": "Can add logged time", "content_type": 13}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_project", "name": "Can add project", "content_type": 9}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_story", "name": "Can add story", "content_type": 11}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_task", "name": "Can add task", "content_type": 12}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_iteration", "name": "Can change iteration", "content_type": 10}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_loggedtime", "name": "Can change logged time", "content_type": 13}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_project", "name": "Can change project", "content_type": 9}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_story", "name": "Can change story", "content_type": 11}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_task", "name": "Can change task", "content_type": 12}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_iteration", "name": "Can delete iteration", "content_type": 10}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_loggedtime", "name": "Can delete logged time", "content_type": 13}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_project", "name": "Can delete project", "content_type": 9}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_story", "name": "Can delete story", "content_type": 11}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_task", "name": "Can delete task", "content_type": 12}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 6}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 7}}, {"pk": 1, "model": "auth.user", "fields": {"username": "root", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2010-02-20 11:18:45", "groups": [], "user_permissions": [], "password": "sha1$f2493$0f7b2e4387894d47810c9c885d9efc9b9043a6c7", "email": "root@example.com", "date_joined": "2010-02-20 11:18:22"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "iteration", "name": "iteration", "app_label": "projects"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "loggedtime", "name": "logged time", "app_label": "projects"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "message", "name": "message", "app_label": "auth"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "project", "name": "project", "app_label": "projects"}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "story", "name": "story", "app_label": "projects"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "task", "name": "task", "app_label": "projects"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": "8b4e9c8d3c261624901394dd2613bde4", "model": "sessions.session", "fields": {"expire_date": "2010-03-06 11:18:45", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjZjMTMyZDUxODcwZTdhZGExZTM4\nNTE0YWY1OWI0MmI4\n"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 3, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2010-02-20 11:21:35", "object_repr": "Release 0.1", "object_id": "2", "change_message": "", "user": 1, "content_type": 10}}, {"pk": 2, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2010-02-20 11:21:09", "object_repr": "Backlog", "object_id": "1", "change_message": "", "user": 1, "content_type": 10}}, {"pk": 1, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2010-02-20 11:20:47", "object_repr": "Snakeplan", "object_id": "1", "change_message": "", "user": 1, "content_type": 9}}, {"pk": 1, "model": "projects.project", "fields": {"active": true, "hidden": false, "name": "Snakeplan", "wiki_link": "", "description": "Development of snakeplan."}}, {"pk": 1, "model": "projects.iteration", "fields": {"status": 0, "name": "Backlog", "end_date": "2025-02-20", "project": 1, "days_worked": "0", "start_date": "2010-02-20", "description": ""}}, {"pk": 2, "model": "projects.iteration", "fields": {"status": 0, "name": "Release 0.1", "end_date": "2010-03-20", "project": 1, "days_worked": "0", "start_date": "2010-02-20", "description": ""}}] | |||
diff --git a/snakeplan/manage.py b/snakeplan/manage.py new file mode 100755 index 0000000..5e78ea9 --- /dev/null +++ b/snakeplan/manage.py | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/usr/bin/env python | ||
2 | from django.core.management import execute_manager | ||
3 | try: | ||
4 | import settings # Assumed to be in the same directory. | ||
5 | except ImportError: | ||
6 | import sys | ||
7 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) | ||
8 | sys.exit(1) | ||
9 | |||
10 | if __name__ == "__main__": | ||
11 | execute_manager(settings) | ||
diff --git a/snakeplan/projects/__init__.py b/snakeplan/projects/__init__.py new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/snakeplan/projects/__init__.py | |||
diff --git a/snakeplan/projects/admin.py b/snakeplan/projects/admin.py new file mode 100644 index 0000000..7471356 --- /dev/null +++ b/snakeplan/projects/admin.py | |||
@@ -0,0 +1,8 @@ | |||
1 | from snakeplan.projects import models | ||
2 | from django.contrib import admin | ||
3 | |||
4 | admin.site.register(models.Task) | ||
5 | admin.site.register(models.Story) | ||
6 | admin.site.register(models.Project) | ||
7 | admin.site.register(models.Iteration) | ||
8 | admin.site.register(models.LoggedTime) | ||
diff --git a/snakeplan/projects/models.py b/snakeplan/projects/models.py new file mode 100755 index 0000000..d1fa44c --- /dev/null +++ b/snakeplan/projects/models.py | |||
@@ -0,0 +1,98 @@ | |||
1 | from django.db import models as m | ||
2 | from django.db.models import Model | ||
3 | from django.contrib.auth.models import User | ||
4 | |||
5 | |||
6 | STATUSES = ( | ||
7 | (0, 'Active'), | ||
8 | (1, 'Inactive'), | ||
9 | ) | ||
10 | |||
11 | DISPOSITIONS = ( | ||
12 | (0, 'Planned'), | ||
13 | (1, 'Carried Over'), | ||
14 | (2, 'Added'), | ||
15 | (3, 'Discovered'), | ||
16 | ) | ||
17 | |||
18 | TASK_TYPES = ( | ||
19 | (0, 'Feature'), | ||
20 | (1, 'Debt'), | ||
21 | (2, 'Functional Test'), | ||
22 | (3, 'Acceptance Test'), | ||
23 | (4, 'Overhead'), | ||
24 | ) | ||
25 | |||
26 | |||
27 | class Project(Model): | ||
28 | |||
29 | name = m.CharField(max_length=200) | ||
30 | description = m.TextField(blank=True) | ||
31 | active = m.BooleanField(default=True) | ||
32 | hidden = m.BooleanField(default=False) | ||
33 | wiki_link = m.URLField(blank=True) | ||
34 | |||
35 | def __unicode__(self): | ||
36 | return self.name | ||
37 | |||
38 | |||
39 | class Iteration(Model): | ||
40 | |||
41 | name = m.CharField(max_length=200) | ||
42 | project = m.ForeignKey(Project) | ||
43 | status = m.IntegerField(choices=STATUSES, default=0) | ||
44 | start_date = m.DateField() | ||
45 | end_date = m.DateField() | ||
46 | days_worked = m.DecimalField(default=0, decimal_places=2, max_digits=5) | ||
47 | description = m.TextField(blank=True) | ||
48 | |||
49 | def __unicode__(self): | ||
50 | return self.name | ||
51 | |||
52 | |||
53 | class Story(Model): | ||
54 | |||
55 | class Meta: | ||
56 | verbose_name_plural = 'Stories' | ||
57 | |||
58 | name = m.CharField(max_length=200) | ||
59 | iteration = m.ForeignKey(Iteration) | ||
60 | disposition = m.IntegerField(choices=DISPOSITIONS) | ||
61 | customer = m.ForeignKey(User, blank=True, null=True, | ||
62 | related_name='story_customer') | ||
63 | tracker = m.ForeignKey(User, blank=True, null=True) | ||
64 | status = m.IntegerField(choices=STATUSES, default=0) | ||
65 | priority = m.IntegerField() | ||
66 | order = m.IntegerField() | ||
67 | description = m.TextField(blank=True) | ||
68 | |||
69 | def __unicode__(self): | ||
70 | return self.name | ||
71 | |||
72 | |||
73 | class Task(Model): | ||
74 | |||
75 | name = m.CharField(max_length=200) | ||
76 | story = m.ForeignKey(Story) | ||
77 | task_type = m.IntegerField(choices=TASK_TYPES) | ||
78 | disposition = m.IntegerField(choices=DISPOSITIONS) | ||
79 | acceptor = m.ForeignKey(User, blank=True) | ||
80 | estimated_hours = m.DecimalField(decimal_places=2, max_digits=5) | ||
81 | description = m.TextField(blank=True) | ||
82 | |||
83 | def __unicode__(self): | ||
84 | return self.name | ||
85 | |||
86 | |||
87 | class LoggedTime(Model): | ||
88 | |||
89 | start_time = m.DateTimeField(blank=True) | ||
90 | end_time = m.DateTimeField(blank=True) | ||
91 | logged_date = m.DateField() | ||
92 | duration = m.DecimalField(decimal_places=2, max_digits=5) | ||
93 | person1 = m.ForeignKey(User, blank=True, related_name="person1") | ||
94 | person2 = m.ForeignKey(User, blank=True, related_name="person2") | ||
95 | description = m.TextField(blank=True) | ||
96 | |||
97 | def __unicode__(self): | ||
98 | return self.description | ||
diff --git a/snakeplan/projects/templates/footer.html b/snakeplan/projects/templates/footer.html new file mode 100644 index 0000000..308b1d0 --- /dev/null +++ b/snakeplan/projects/templates/footer.html | |||
@@ -0,0 +1,2 @@ | |||
1 | </body> | ||
2 | </html> | ||
diff --git a/snakeplan/projects/templates/header.html b/snakeplan/projects/templates/header.html new file mode 100644 index 0000000..75ba4bf --- /dev/null +++ b/snakeplan/projects/templates/header.html | |||
@@ -0,0 +1,4 @@ | |||
1 | <html> | ||
2 | <head><title>{{page_title]]</title></head> | ||
3 | |||
4 | <body> | ||
diff --git a/snakeplan/projects/templates/projects/iteration_list.html b/snakeplan/projects/templates/projects/iteration_list.html new file mode 100644 index 0000000..6d33251 --- /dev/null +++ b/snakeplan/projects/templates/projects/iteration_list.html | |||
@@ -0,0 +1,18 @@ | |||
1 | <h1>Project: {{project_name}}</h1> | ||
2 | |||
3 | <h2>Iterations</h2> | ||
4 | |||
5 | {% for iteration in object_list %} | ||
6 | <div id="{{iteration.id}}"> | ||
7 | <ul> | ||
8 | <li><a href="{{iteration.id}}">{{iteration.name}}</a></li> | ||
9 | <li>{{iteration.description}}</li> | ||
10 | <li>{{iteration.status}}</li> | ||
11 | <li>{{iteration.start_date}}</li> | ||
12 | <li>{{iteration.end_date}}</li> | ||
13 | <li>{{iteration.days_worked}}</li> | ||
14 | </ul> | ||
15 | </div> | ||
16 | {% endfor %} | ||
17 | </ul> | ||
18 | |||
diff --git a/snakeplan/projects/templates/projects/project_list.html b/snakeplan/projects/templates/projects/project_list.html new file mode 100644 index 0000000..5ede56e --- /dev/null +++ b/snakeplan/projects/templates/projects/project_list.html | |||
@@ -0,0 +1,7 @@ | |||
1 | <h1>Projects</h1> | ||
2 | |||
3 | <ol> | ||
4 | {% for project in object_list %} | ||
5 | <li><a href="{{project.id}}">{{project.name}}</a></li> | ||
6 | {% endfor %} | ||
7 | </ol> | ||
diff --git a/snakeplan/projects/templates/stories/story_list.html b/snakeplan/projects/templates/stories/story_list.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/snakeplan/projects/templates/stories/story_list.html | |||
diff --git a/snakeplan/projects/tests.py b/snakeplan/projects/tests.py new file mode 100755 index 0000000..2247054 --- /dev/null +++ b/snakeplan/projects/tests.py | |||
@@ -0,0 +1,23 @@ | |||
1 | """ | ||
2 | This file demonstrates two different styles of tests (one doctest and one | ||
3 | unittest). These will both pass when you run "manage.py test". | ||
4 | |||
5 | Replace these with more appropriate tests for your application. | ||
6 | """ | ||
7 | |||
8 | from django.test import TestCase | ||
9 | |||
10 | class SimpleTest(TestCase): | ||
11 | def test_basic_addition(self): | ||
12 | """ | ||
13 | Tests that 1 + 1 always equals 2. | ||
14 | """ | ||
15 | self.failUnlessEqual(1 + 1, 2) | ||
16 | |||
17 | __test__ = {"doctest": """ | ||
18 | Another way to test that 1 + 1 is equal to 2. | ||
19 | |||
20 | >>> 1 + 1 == 2 | ||
21 | True | ||
22 | """} | ||
23 | |||
diff --git a/snakeplan/projects/urls.py b/snakeplan/projects/urls.py new file mode 100644 index 0000000..d477430 --- /dev/null +++ b/snakeplan/projects/urls.py | |||
@@ -0,0 +1,8 @@ | |||
1 | from django.conf.urls.defaults import patterns | ||
2 | |||
3 | |||
4 | urlpatterns = patterns('snakeplan.projects.views', | ||
5 | (r'^$', 'projects.index'), | ||
6 | (r'^story/(.*)/', 'stories.index'), | ||
7 | (r'^(.*)/', 'projects.project_iterations'), | ||
8 | ) | ||
diff --git a/snakeplan/projects/views/__init__.py b/snakeplan/projects/views/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/snakeplan/projects/views/__init__.py | |||
diff --git a/snakeplan/projects/views/projects.py b/snakeplan/projects/views/projects.py new file mode 100644 index 0000000..78de64c --- /dev/null +++ b/snakeplan/projects/views/projects.py | |||
@@ -0,0 +1,23 @@ | |||
1 | from django.views.generic import list_detail | ||
2 | from snakeplan.projects.models import Project | ||
3 | from snakeplan.projects.models import Iteration | ||
4 | |||
5 | |||
6 | def index(request): | ||
7 | return list_detail.object_list( | ||
8 | request=request, | ||
9 | queryset=Project.objects.all(), | ||
10 | allow_empty=True | ||
11 | ) | ||
12 | |||
13 | |||
14 | def project_iterations(request, project_id): | ||
15 | iterations = Iteration.objects.filter(project=project_id) | ||
16 | project = iterations[0].project | ||
17 | |||
18 | return list_detail.object_list( | ||
19 | request=request, | ||
20 | queryset=iterations, | ||
21 | extra_context={'project_name': project}, | ||
22 | allow_empty=True | ||
23 | ) | ||
diff --git a/snakeplan/projects/views/stories.py b/snakeplan/projects/views/stories.py new file mode 100644 index 0000000..f87bb2b --- /dev/null +++ b/snakeplan/projects/views/stories.py | |||
@@ -0,0 +1,10 @@ | |||
1 | from django.views.generic import list_detail | ||
2 | from snakeplan.projects.models import Iteration | ||
3 | |||
4 | |||
5 | def index(request, project_id): | ||
6 | return list_detail.object_list( | ||
7 | request=request, | ||
8 | queryset=Iteration.objects.filter(project=project_id).all(), | ||
9 | allow_empty=True | ||
10 | ) | ||
diff --git a/snakeplan/readme_urls.txt b/snakeplan/readme_urls.txt new file mode 100644 index 0000000..6a12fc1 --- /dev/null +++ b/snakeplan/readme_urls.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | ====== ======================== ======================================== | ||
2 | Method URL What it does | ||
3 | ====== ======================== ======================================== | ||
4 | GET /modelname/ Lists model instances, using filters | ||
5 | like ?key=value1&key=value2 | ||
6 | |||
7 | GET /modelname/search displays a search form | ||
8 | |||
9 | GET /modelname/id displays a readonly instance | ||
10 | |||
11 | GET /modelname/edit/id displays an edit form | ||
12 | |||
13 | POST /modelname/update/id updates an instance and redirects | ||
14 | |||
15 | POST /modelname/upsert Updates or inserts an instance and | ||
16 | redirects | ||
17 | |||
18 | GET /modelname/upsert Draws a form to do an upsert. | ||
19 | |||
20 | GET /modelname/upsertform Draws a form to do an upsert. | ||
21 | |||
22 | GET /modelname/create displays an insert form | ||
23 | |||
24 | GET /modelname/insertform displays an insert form | ||
25 | |||
26 | GET /modelname/remove/id displays a form that posts to | ||
27 | /model/delete/id | ||
28 | |||
29 | POST /modelname/insert inserts a new record and redirects | ||
30 | |||
31 | POST /modelname/delete/id deletes a record and redirects | ||
32 | |||
33 | GET /modelname/bulk/edit display a bulk edit ui | ||
34 | |||
35 | POST /modelname/bulk/update performs a bulk update and redirect | ||
36 | |||
37 | GET /modelname/bulk/create display a bulk insert form | ||
38 | |||
39 | POST /modelname/bulk/insert performs a bulk insert and redirect | ||
40 | |||
41 | POST /modelname/bulk/delete performs a bulk delete and redirect | ||
42 | ====== ======================== ======================================== | ||
diff --git a/snakeplan/settings.py b/snakeplan/settings.py new file mode 100755 index 0000000..6da9ec1 --- /dev/null +++ b/snakeplan/settings.py | |||
@@ -0,0 +1,55 @@ | |||
1 | DEBUG = True | ||
2 | TEMPLATE_DEBUG = DEBUG | ||
3 | |||
4 | ADMINS = ( | ||
5 | ('Mike Crute', 'mcrute@gmail.com'), | ||
6 | ) | ||
7 | |||
8 | MANAGERS = ADMINS | ||
9 | |||
10 | DATABASE_ENGINE = 'sqlite3' | ||
11 | DATABASE_NAME = 'snakeplan.db' | ||
12 | |||
13 | TIME_ZONE = 'America/New_York' | ||
14 | LANGUAGE_CODE = 'en-us' | ||
15 | |||
16 | SITE_ID = 1 | ||
17 | |||
18 | USE_I18N = False | ||
19 | |||
20 | # Absolute path to the directory that holds media. | ||
21 | # Example: "/home/media/media.lawrence.com/" | ||
22 | MEDIA_ROOT = '' | ||
23 | |||
24 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | ||
25 | # trailing slash if there is a path component (optional in other cases). | ||
26 | # Examples: "http://media.lawrence.com", "http://example.com/media/" | ||
27 | MEDIA_URL = '' | ||
28 | ADMIN_MEDIA_PREFIX = '/media/' | ||
29 | |||
30 | SECRET_KEY = 'ow28jyl#0h8+^3$-!*%o-qfj5#zyr@xz+%vn_a3iizhn%l-3_=' | ||
31 | |||
32 | TEMPLATE_LOADERS = ( | ||
33 | 'django.template.loaders.filesystem.load_template_source', | ||
34 | 'django.template.loaders.app_directories.load_template_source', | ||
35 | ) | ||
36 | |||
37 | MIDDLEWARE_CLASSES = ( | ||
38 | 'django.middleware.common.CommonMiddleware', | ||
39 | 'django.contrib.sessions.middleware.SessionMiddleware', | ||
40 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
41 | ) | ||
42 | |||
43 | ROOT_URLCONF = 'snakeplan.urls' | ||
44 | |||
45 | TEMPLATE_DIRS = ( | ||
46 | ) | ||
47 | |||
48 | INSTALLED_APPS = ( | ||
49 | 'django.contrib.auth', | ||
50 | 'django.contrib.contenttypes', | ||
51 | 'django.contrib.sessions', | ||
52 | 'django.contrib.sites', | ||
53 | 'django.contrib.admin', | ||
54 | 'snakeplan.projects', | ||
55 | ) | ||
diff --git a/snakeplan/snakeplan.db b/snakeplan/snakeplan.db new file mode 100644 index 0000000..e06dc67 --- /dev/null +++ b/snakeplan/snakeplan.db | |||
Binary files differ | |||
diff --git a/snakeplan/urls.py b/snakeplan/urls.py new file mode 100755 index 0000000..591c69f --- /dev/null +++ b/snakeplan/urls.py | |||
@@ -0,0 +1,13 @@ | |||
1 | from django.conf.urls.defaults import patterns, include | ||
2 | |||
3 | from django.contrib import admin | ||
4 | admin.autodiscover() | ||
5 | |||
6 | # Just get the admin stuff, don't actually do anything with it | ||
7 | from snakeplan.projects import admin as snakeplan_admin | ||
8 | |||
9 | |||
10 | urlpatterns = patterns('', | ||
11 | (r'^admin/', include('django.contrib.admin.site.urls')), | ||
12 | (r'^project/', include('snakeplan.projects.urls')), | ||
13 | ) | ||