python - In django template urls are imported correctly but don't work -
i total noob in django, might seem may miss obvious.
i using django userena app. following official documentationv include userena urls this
from django.conf.urls import patterns, include, url django.contrib import admin urlpatterns = patterns('', # examples: url(r'^accounts/', include('userena.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^$', 'mysite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), )
and when try use url in template load correctly, don't work.
<div class="search_button" type="submit"> find </div> <div href="{% url 'userena_signin' %}" class="enter"> sign in </div> <div href="{% url 'userena_signup' %}" class="enter"> sign </div>
when load page can see correct url
<div href="/accounts/signin/" class="enter"> sign in </div> <div href="/accounts/signup/" class="enter"> sign </div>
but pushing button doesn't lead neither sign in page, nor sign up. did miss?
href need applied on < > markup . using on div.
here correct version :
<div class="search_button" type="submit"> find </div> <a href="{% url 'userena_signin' %}" class="enter"> sign in </a> <a href="{% url 'userena_signup' %}" class="enter"> sign </a>
also < div type="submit" > apply on < input /> markup, may have code fixing don't know.
seems pure html issue, nothing related django correctly used here ;)
Comments
Post a Comment