Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-11-03 Thread fábio andrews rocha marques
for later? On Thursday, November 2, 2017 at 6:43:18 PM UTC-3, James Schneider wrote: > > > > On Thu, Nov 2, 2017 at 12:57 PM, fábio andrews rocha marques < > fabioandrews...@gmail.com > wrote: > >> To use django forms is to use the django Form class and it's

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-11-02 Thread fábio andrews rocha marques
: > > > > On Oct 30, 2017 4:46 PM, "fábio andrews rocha marques" < > fabioandrews...@gmail.com > wrote: > > Let's say i have a "register a new user" View and on this page, when the > user forgets to inform a password or a username, i show a message to him o

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread fábio andrews rocha marques
r me. I didn’t have to worry > about sessions any more. > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *fábio andrews > rocha marques > *Sent:* Tuesday, October 31, 2017 12:19 PM > *To:* Django users > *Subject:*

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread fábio andrews rocha marques
I found this topic within stackoverflow: https://stackoverflow.com/questions/10906548/django-redirect-behavior-with-back-button that seems to me that the user was having the same problem as i am. The only answer i found could work was from magicTuscan, but he just said "I would save the last

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread fábio andrews rocha marques
tpResponse > object in all of your view functions, which is returned by the render > function. It looks like you are always populating ‘error_message,’ which > is why there is always an error_message rendered. > > > > *From:* django...@googlegroups.com [mailto: > d

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread fábio andrews rocha marques
iew. > > > https://docs.djangoproject.com/en/1.11/topics/http/decorators/#django.views.decorators.cache.never_cache > > > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *fábio andrews > rocha marques > *Sent:* Tu

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-31 Thread fábio andrews rocha marques
> From: django...@googlegroups.com [django...@googlegroups.com > ] on behalf of fábio andrews rocha marques [ > fabioandrews...@gmail.com ] > Sent: Tuesday, October 31, 2017 00:46 > To: Django users > Subject: do i always have to reload/return render a page t

do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-10-30 Thread fábio andrews rocha marques
Let's say i have a "register a new user" View and on this page, when the user forgets to inform a password or a username, i show a message to him on the same page saying "you forgot the password". The way i do this is by doing this(on my View.py in a function called cadastrarprofessor):

Re: make a button element outside be on the right side of another element inside

2017-09-29 Thread fábio andrews rocha marques
igger the > form submit. > > On Thu, Sep 28, 2017 at 7:56 PM, fábio andrews rocha marques < > fabioandrews...@gmail.com > wrote: > >> In my template, I have a form. This form has a lot of textfields and a >> submit button. There's another button, lets name it &

make a button element outside be on the right side of another element inside

2017-09-28 Thread fábio andrews rocha marques
In my template, I have a form. This form has a lot of textfields and a submit button. There's another button, lets name it "?", that displays a popup window whenever it's clicked. I want the "?" button to be on the right side of one of the textfields on my form. The problem is: since the form

override default "go back" action on a web page to go back to main menu

2017-09-27 Thread fábio andrews rocha marques
Let's say i have a "register a new user" View and on this page, when the user forgets to inform a password or a username, i show a message to him on the same page saying "you forgot the password". The way i do this is by doing this(on my View.py in a function called cadastrarprofessor):

Re: utf-8' codec can't decode byte 0x93 in position 31 even though i use read().decode('utf-8') when i read a UploadedFile i get from a file selector in a View in django

2017-09-27 Thread fábio andrews rocha marques
I've managed to solve it! The problem wasn't on the csv, but on those "print" i used. It turns out command prompt on windows 8 can't print japanese letters. So, 'i've solved it by printing the output to a file instead of a command prompt -- You received this message because you are subscribed

utf-8' codec can't decode byte 0x93 in position 31 even though i use read().decode('utf-8') when i read a UploadedFile i get from a file selector in a View in django

2017-09-21 Thread fábio andrews rocha marques
I have a template called cadastrarnovomaterial.html that is a page with a textfield and a file selection button. The user should select a .csv file with the file selector. It is like this: Cadastrar um novo material 'Cadastre um novo material que pode ser usado para criar provas' {% csrf_token

Re: coming back to register user page after not filling a text field is causing the already filled text fields come with an annexed "/" at the end of the values

2017-09-21 Thread fábio andrews rocha marques
Solved it: If i remove the "/" from all my tags, it's solved. Before: After: On Thursday, September 21, 2017 at 2:46:36 PM UTC-3, fábio andrews rocha marques wrote: > > My register User View is like this: > > def cadastrarprofessor(request): > # if this is a POST r

coming back to register user page after not filling a text field is causing the already filled text fields come with an annexed "/" at the end of the values

2017-09-21 Thread fábio andrews rocha marques
My register User View is like this: def cadastrarprofessor(request): # if this is a POST request we need to process the form data if request.method == 'POST': nomeusuario = request.POST['usuario'] nomesenha = request.POST['senha'] nomeemail = request.POST['email'] if not nomeusuario: return

Creating my own register User page, when i want to go back to same page but with text fields filled with previous values, i'm getting slashes(/)

2017-09-21 Thread fábio andrews rocha marques
My register page View is like this: Enter code here... -- 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 django-users+unsubscr...@googlegroups.com. To post to

Creating my own user registration View and displaying "user created" on the same page after register

2017-09-21 Thread fábio andrews rocha marques
I'm trying to create my own View to register a new User in my website. I'm using this tutorial to help me with authentication: https://docs.djangoproject.com/en/1.11/topics/auth/default/# But my problem is: in the same View that i have my form that i use to create a new User, i want to, when