Fixed exception on user-not-found in form
This commit is contained in:
parent
f7dc5bda50
commit
f97a501f1c
|
@ -35,5 +35,5 @@ class VirtualTransactionForm(forms.ModelForm):
|
|||
try:
|
||||
user = User.objects.get(username=self.cleaned_data['recipient'])
|
||||
except User.DoesNotExist:
|
||||
raise ValidationError(u"Emfpänger '%s' konnte nicht gefunden werden" % self.cleaned_data['user'])
|
||||
raise ValidationError(u"Emfpänger '%s' konnte nicht gefunden werden" % self.cleaned_data['recipient'])
|
||||
return user
|
||||
|
|
|
@ -20,6 +20,8 @@ urlpatterns = patterns('',
|
|||
(r'^transaction/', include('transaction.urls')),
|
||||
(r'^store/', include('buyable.urls')),
|
||||
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'media'}),
|
||||
(r'^docs/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'docs'}),
|
||||
|
||||
|
||||
# Uncomment the next line to enable the admin:
|
||||
(r'^admin/', include(admin.site.urls)),
|
||||
|
|
Loading…
Reference in New Issue