+from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
model = Character
fields = ('name')
+@login_required
def add(request, character_id=None):
initial = {}
# Get the current user's characters
return render_to_response('influences/add.html', {'form' : f}, RequestContext(request))
+@login_required
def addCharacter(request):
f = CharacterForm(request=request)
if (f.is_valid()):
return render_to_response('influences/add_character.html', {'form' : f}, RequestContext(request))
+@login_required
def index(request):
characters = request.user.character_set.all()
influences = Influence.objects.filter(character__in=characters)