My "home" variable is defined with a view :
def home(request):
""" Acceuil du site qui recense toutes nos requêtes pour le moment """
return render(request, 'insertion/accueil.html', locals())
Which redirect to my homepage.
The line with a problem is that one
return render(request, 'insertion/modification.html', locals())
And I really can't figure it out why, according the fact that "locals()"
contains my variable and even if I send directly my variable instead, I get
the same !
Le jeudi 29 août 2019 03:55:52 UTC+2, James Schneider a écrit :
>
>
>
> On Wed, Aug 28, 2019, 2:00 AM Ali IMRANE <[email protected] <javascript:>>
> wrote:
>
>> Thanks James for your help.
>>
>> Indeed, I tought about that problem but I already managed to see an
>> number on an other page, as well as using that ID to read information
>> behind my informations (as you can see in the third line I gave on
>> "lire.html"). A number is printed. How can I know that it is an *int*
>> and not a *string* use in there ?
>>
>
> In the template it won't matter whether it is an int or a string, it gets
> implicitly converted to a string for the regex match anyway.
>
>
>
>>> # Nous pourrions ici envoyer l'e-mail grâce aux données
>>> # que nous venons de récupérer
>>> envoi = True
>>> redirect(home)
>>>
>>>
> What is the home variable in the redirect statement above? It isn't
> defined in your view. I think that will need an extra argument. What line
> is the traceback actually complaining about?
>
> -James
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/4e7167ae-5519-4b9a-8bad-2310e5cc5217%40googlegroups.com.