You should send both forms to the context, as in:
args['form_login'] = AuthenticationForm()
args['form_register'] = UserCreationForm()
And change the template to the appropriate form names. Also, change {% if
user.is_authenticated == False %} to {% if not user.is_authenticated %}.
On Wednesday
Before template access_ownsite.html I had separated on few templates like
login, register etc .html and it work's but now when I split it, a form is
not forward to access_ownsite.html
W dniu wtorek, 24 listopada 2015 21:34:30 UTC+1 użytkownik Dariusz Mysior
napisał:
>
> Hi I had a problem with
It's not fix a problem.
W dniu wtorek, 24 listopada 2015 21:34:30 UTC+1 użytkownik Dariusz Mysior
napisał:
>
> Hi I had a problem with display a form of login and register, please look
> on it.
>
> my template access_ownsite.html
>
> {% load staticfiles %}
>
>
>
>
> {% block title %}{% en
It's a good idea to use render() instead of render_to_response(),
see https://docs.djangoproject.com/en/1.8/topics/http/shortcuts/#render.
That will fix the issue with the CSRF token. render() takes the request as
the first argument, and uses a RequestContext. This is needed to run the
context
Hmm I forget about it but I change names on form_l and form_r and effect is
the same, I had also info
C:\Python34\lib\site-packages\django\template\defaulttags.py:66:
> UserWarning: A {% csrf_token %} was used in a template, but the context did
> not provide the value. This is usually cause
>
You are using the same form for both register and login. Set different
names for the forms in the template context.
On Tuesday, November 24, 2015 at 6:34:30 PM UTC-2, Dariusz Mysior wrote:
>
> Hi I had a problem with display a form of login and register, please look
> on it.
>
> my template acce
Hi I had a problem with display a form of login and register, please look
on it.
my template access_ownsite.html
{% load staticfiles %}
{% block title %}{% endblock %}
{% block content %}
{% if user.is_authenticated %}
Jesteś zalogowany {{ user.username
}}
7 matches
Mail list logo