* Rename the add views to be a bit more consistent.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 10 Feb 2008 14:37:28 +0000 (15:37 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 10 Feb 2008 14:37:28 +0000 (15:37 +0100)
influences/views.py
urls.py

index 85124e4c0c6c98b5377f6b21ef3b2315b980fd22..1ab2d221a32d357b253db5e773afdd16be770f7f 100644 (file)
@@ -24,7 +24,7 @@ class CharacterForm(ContextModelForm):
         fields = ('name')
 
 @login_required
-def add(request, character_id=None):
+def add_influence(request, character_id=None):
     initial = {}
     # Get the current user's characters
     chars = request.user.character_set.all()
@@ -53,7 +53,7 @@ def add(request, character_id=None):
     return render_to_response('influences/add.html', {'form' : f}, RequestContext(request))
 
 @login_required
-def addCharacter(request):
+def add_character(request):
     f = CharacterForm(request=request)
     if (f.is_valid()):
         character = f.save(commit=False)
diff --git a/urls.py b/urls.py
index 996e08a7c4ba617006c8957cdf1cda518c1d3acd..fe0438f41b8ff9d01b76e84a280c640820c3f7f0 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -11,12 +11,12 @@ urlpatterns = patterns('',
     url(r'^influences/$', 'ee.influences.views.index', name='influences_index'),
     url(r'^influences/influence/$', 'ee.influences.views.influence_list', name='influences_influence_list'),
     url(r'^influences/influence/(?P<object_id>\d+)/$', 'ee.influences.views.influence_detail', name='influences_influence_detail'),
-    url(r'^influences/influence/add/(\d+)/$', 'ee.influences.views.add', name='influences_add_influence_for_character'),
-    url(r'^influences/influence/add/$', 'ee.influences.views.add', name='influences_add_influence'),
+    url(r'^influences/influence/add/(\d+)/$', 'ee.influences.views.add_influence', name='influences_add_influence_for_character'),
+    url(r'^influences/influence/add/$', 'ee.influences.views.add_influence', name='influences_add_influence'),
     
     url(r'^influences/character/$', 'ee.influences.views.character_list', name='influences_character_list'),
     url(r'^influences/character/(?P<object_id>\d+)/$', 'ee.influences.views.character_detail', name='influences_character_detail'),
-    url(r'^influences/character/add/$', 'ee.influences.views.addCharacter', name='influences_add_character'),
+    url(r'^influences/character/add/$', 'ee.influences.views.add_character', name='influences_add_character'),
 
     url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'base/login.html'}, name='login'),
     url(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login', name='logout'),