Skip to content

Commit

Permalink
Updated complaint example.
Browse files Browse the repository at this point in the history
  • Loading branch information
nowells committed Sep 4, 2009
1 parent 0cc6e74 commit 7db6c4f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions examples/complaints/forms.py
@@ -0,0 +1,6 @@
from django import forms
from complaints.models import Complaint

class ComplaintForm(forms.ModelForm):
class Meta:
model = Complaint
Empty file.
Empty file.
1 change: 0 additions & 1 deletion examples/complaints/templates/index.html

This file was deleted.

1 change: 0 additions & 1 deletion examples/complaints/templates/test.html

This file was deleted.

16 changes: 7 additions & 9 deletions examples/complaints/urls.py
@@ -1,12 +1,10 @@
from django.conf.urls.defaults import url, include, patterns, handler404, handler500
import pluggables
from pluggables import Pluggable, url, include, patterns

class Comments(pluggables.Pluggable):
urlpatterns = pluggables.patterns('',
pluggables.url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'test.html'}),
class Complaints(Pluggable):
urlpatterns = patterns('',
url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'complaints/index.html'}),
url(r'^create/$', 'django.views.generic.simple.direct_to_template', {'template': 'complaints/edit.html'}),
url(r'^(?P<complaint_id>/edit/$', 'django.views.generic.simple.direct_to_template', {'template': 'complaints/edit.html'}),
)

urlpatterns = patterns('',
url('^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}),
url('^(?P<name>\w+)/test/', include(Comments())),
)
urlpatterns = Complaints()

0 comments on commit 7db6c4f

Please sign in to comment.