Re: Django-registration tutorial + code

2012-07-09 Thread scoop
i installed registration, added registration to installed apps and used your
templates.

i nav to accounts/register , enter the info and as i continue it breaks with
the following:

DoesNotExist at /accounts/register/
Site matching query does not exist.
Request Method: POST
Request URL:http://spenv.local/accounts/register/
Django Version: 1.4
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location:
/usr/lib/python2.7/site-packages/django/db/models/query.py in get, line 366

I'm pretty new to django so I'm slightly confused. I looked at the
documentation and there doesn't seem to be anything that I understand to fix
this.

--
View this message in context: 
http://python.6.n6.nabble.com/Django-registration-tutorial-code-tp4974793p4981365.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Custom dashboard view and authentication

2010-07-18 Thread scoop
Django version 1.1.1
I have a custom dashboard view set up to override the django admin
default like:

(r'^admin/$', 'dashboard.views.dashboard'),
(r'^admin/', include(admin.site.urls)),

dashboard view authenticates with the @staff_member_required decorator

This has been working fine with all users having superuser permissions
but when trying to login a user with just staff member status (have
tried different permission settings) I am throwing a 500 server error:

[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1] mod_wsgi
(pid=13815): Exception occurred processing WSGI script '/home//
_site.wsgi'.
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1]   File "/
home/./lib/python2.5/django/core/handlers/wsgi.py", line 245, in
__call__
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1] response =
middleware_method(request, response)
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1]   File "/
home/../lib/python2.5/django/contrib/sessions/middleware.py", line
26, in process_response
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1]
patch_vary_headers(response, ('Cookie',))
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1]   File "/
home/../lib/python2.5/django/utils/cache.py", line 130, in
patch_vary_headers
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1] if
response.has_header('Vary'):
[Sun Jul 18 12:36:59 2010] [error] [client 127.0.0.1] AttributeError:
'QuerySet' object has no attribute 'has_header'

I get the same error when user @login_required as well. Any ideas on
this?

Thanks,

Chad

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.