I am quite new to Django (have a background in python), and I am trying to build a simple webpage (normal stuff: registration, shopping cart, payments etc).
To this end, I am using the django-registration package and I have followed the instructions on: <a href="http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/" rel="nofollow">http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/</a>
I have to say, I quite like it, and got it to work: and the registration pages look like admin panels. Now, I would like do some customization and I started off by including my own base.html. In the django-registration, I have some default templates, and the login temlates look like:
First, when I changed the I base.html to my own path, the page does not seem to render properly (although I see the text content, but the graphics are all missing), and I have noticed that all the links have gone a level down. For example, my Homepage ref has gone down to mysite.com/accounts/login/Homepage rather then my orginal mysite.com/Homepage.
As I unserstand, my url mappings do not seem right, but I cannot seem to find the url conf links. My current url conf looks like:
Where do I find the registration url confs such as /accounts/login etc and the corresponding mapings?
Sorry if this is 101 django question!
To this end, I am using the django-registration package and I have followed the instructions on: <a href="http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/" rel="nofollow">http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/</a>
I have to say, I quite like it, and got it to work: and the registration pages look like admin panels. Now, I would like do some customization and I started off by including my own base.html. In the django-registration, I have some default templates, and the login temlates look like:
Code:
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<form method="post" action=".">
{{ form.as_p }}
<input type="submit" value="{% trans 'Log in' %}" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<p>{% trans "Forgot password" %}? <a href="{% url auth_password_reset %}">{% trans "Reset your account" %}</a>!</p>
<p>{% trans "Not member" %}? <a href="{% url registration_register %}">{% trans "Register Now" %}</a>!</p>
{% endblock %}
First, when I changed the I base.html to my own path, the page does not seem to render properly (although I see the text content, but the graphics are all missing), and I have noticed that all the links have gone a level down. For example, my Homepage ref has gone down to mysite.com/accounts/login/Homepage rather then my orginal mysite.com/Homepage.
As I unserstand, my url mappings do not seem right, but I cannot seem to find the url conf links. My current url conf looks like:
Code:
urlpatterns = patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
(r'^$', index),
(r'^Homepage$', index),
(r'^AboutUs$', AboutUs),
(r'^ContactUs$', ContactUs),
(r'^admin/(.*)', admin.site.root),
(r'^accounts/', include('registration.urls')),
(r'^$', direct_to_template,
{ 'template': 'index.html' }, 'index'),
Where do I find the registration url confs such as /accounts/login etc and the corresponding mapings?
Sorry if this is 101 django question!