* Set a default value for the character_id argument to the add view.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 27 Jan 2008 16:02:32 +0000 (17:02 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 27 Jan 2008 16:02:32 +0000 (17:02 +0100)
influences/views.py

index 184a3a3957271a7a988efac2f56cbedb1c76dcd4..4df518f6a2902143dd65ef22c30908555b9f90ba 100644 (file)
@@ -21,7 +21,7 @@ class CharacterForm(ContextModelForm):
         model = Character
         fields = ('name')
 
-def add(request, character_id):
+def add(request, character_id=None):
     initial = {}
     # Get the current user's characters
     chars = request.user.character_set.all()