I am in process to setting up a new django project and I want to use the provided apps django-registration and django-profile. I installed both of them with easy-install and managed to get the django-registration working fine. My next step would be to connect the django-profile app to the working branch. The django-registration offers a service, that redirects to a URL, which is defined in the settings.py-variable LOGIN_REDIRECT_URL. My guess was, that I can simply paste a url of the django-profile app to connect both. (e.g. '/profiles/'). My settings.py-variable AUTH_PROFILE_MODULE is set on 'registration.User', (trying to use the django-registration model!). But I get a SiteProfileNotAvailable at /profiles/ No exception supplied error. I tried to follow these steps: https://bitbucket.org/ubernostrum/django-registration/src/tip/docs/index.rst https://bitbucket.org/ubernostrum/django-profiles/src/tip/docs/overview.txt But i am not sure, if I done everything properly, namely this paragraph from overview.txt
For default use, create a profile model for your site and specify the
AUTH_PROFILE_MODULE
setting appropriately. Then addprofiles
to yourINSTALLED_APPS
setting, create the appropriate templates and set up the URLs. For convenience in linking to profiles, your profile model should define aget_absolute_url()
method which routes to the viewprofiles.views.profile_detail
, passing the username.
So my questions are:
get_absolute_url()
method which
routes to the view profiles.views.profile_detail
, passing the
username." in the overview.txt?django-registration is hard to use thanks to the type of documentation and lack of templates. Many Django developers now use django-social-auth instead:
https://github.com/omab/django-social-auth http://django-social-auth.readthedocs.org/en/latest/index.html
You can see how Kenneth Love integrated it into the Django Packages code base here:
https://github.com/opencomparison/opencomparison/blob/master/apps/profiles/views.py#L83 https://github.com/opencomparison/opencomparison/blob/master/settings.py#L277
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With