Hello, I am using a context_processor method to make signup form available in each page. I am using also the CreateView class to handle the signup form. The problem is that when the form is not valid the page just refreshes with fresh form and no errors are displayed. Is there anything that I have to add to CreateView class? (because I have changed the context variables name from the default.)
sec^nd has quit
luckyfluke has quit
luckyfluke joined the channel
govg joined the channel
luckyfluke has quit
mj_k joined the channel
celesrina
when I did python3 -m venv myvenv
I dont see (myvenv)
in my terminal
ionescu77 has quit
jessamynsmith
celesrina: that command just creates the venv
you still have to activate it
celesrina
how do you activate it?
shangxiao
celesrina: source myenv/bin/activate
aditya_r joined the channel
celesrina: it's important to remember to activate whenever you open a new shell in terminal. it will stay activated until deactivated or the shell is closed.
mojtaba
I found the problem, I have giving the form with another name to the template, using context processor. But the createView is using the form. So that is why it does not bound the form. Does anybody know how can I fix this problem?
mattmcc has quit
ionescu77 joined the channel
sec^nd joined the channel
celesrina
ty :D
wait
jessamynsmith has quit
that command says no file or directory
shangxiao
celesrina: run it from the same place that it was created in
jessamynsmith joined the channel
celesrina
I am in the directory
jhfisc joined the channel
it asked me to create a djangogirls folder so I did
and I created the venv
using python3 -m venv myvenv
shangxiao
is there a folder named 'myenv'?
rainy-day joined the channel
stickperson has quit
jhfisc has quit
rainy-day has quit
celesrina
in my home directory no
on my mac
shangxiao
ah right so it sounds like you need to run that command from the djangogirls folder
(check that there's a 'myenv' in that djangogirls folder)
celesrina: oh i just reread the tutorial - they've used 'myvenv'
with an extra v
i misread your command above sorry :)
__love__ joined the channel
celesrina
I still dont see that
in my home directory
on my mac
rainy-day joined the channel
jhfisc joined the channel
mattmcc joined the channel
jhfisc has quit
ionescu77 has quit
ionescu77 joined the channel
ionescu77 has quit
ionescu77 joined the channel
ionescu77 has quit
ionescu77 joined the channel
ionescu77 has quit
ionescu77 joined the channel
ionescu77 has quit
jhfisc joined the channel
shredding joined the channel
shredding has quit
milardovich joined the channel
mojtaba
Hello, I am using a context_processor method to make signup form available in each page. I am using also the CreateView class to handle the signup form. The problem is that when the form is not valid the page just refreshes with fresh form and no errors are displayed. Is there anything that I have to add to CreateView class? (because I have changed the context variables name from the default.)
mj_k has quit
elbarto_e joined the channel
jhfisc has quit
FunkyBob
mojtaba: does the signup page work all on its own, when you start from that page?
mojtaba
FunkyBob: Yes, I removed the context processor and "with form=signupform" from the template, and it was working.
milardovich has quit
FunkyBob
... no
that sounds very wrong
probably better to use an inclusion tag, though
elbarto_e has quit
which template are you doing that in... and why ?
jhfisc joined the channel
elbarto_e joined the channel
mojtaba
FunkyBob: I want to have signup form in all the pages, so I created a context processor.
FunkyBob: In the registeration template I am adding it.
FunkyBob
yes, that's just about rendering
mojtaba
I have also one for login.
FunkyBob
why are you using "with form=signupform"?
where ?
where and why
mojtaba
So what should I do? I shouldn't use with form=signupform, in the template?
FunkyBob
WHICH TEMPLATE?
you're giving so little detail, it's hard to know
imack joined the channel
mojtaba
I am using it where I want to include the registeration form in the main page.
{% include regireationForm with form=signupform %}