I just have to say congrats man, I used watch your channels when you had a few thousand subs and I learned a lot about html and css from you. Now I come back after a couple of years and boom! Your channel has exploded. That's amazing; not everyone can teach but you are certainly born for it!
@NetNinja3 жыл бұрын
Thanks so much :)
@auroshisray91405 жыл бұрын
Hugely respect you for such precise tutorials
@NetNinja5 жыл бұрын
Thanks so much 😊
@ghassenjemiai3 жыл бұрын
Hey firstly I want to thank you Shaun for your incredible high-quality content, but what if I want to use my custom signup page with my custom fields, things like phone numbers, and other stuff like custom email domains that aren't available in the default authentication, how can I do that, please? I am pretty familiar with PHP so is it the same, like getting the inputs with its name and making a query, or is it something else in Django, thank you.
@siddharthsingh84722 жыл бұрын
For the people getting 404 still in the post request add signup/ in urls,py as well
@anroiduser12224 жыл бұрын
if you are getting the url error, after you successfully signed-up a new user. changed the return redirect code to return redirect('/articles/')
@diosdadoasumundongandeme32225 жыл бұрын
No entiendo inglés pero el video me ayudo mucho TANKS
@hrishomme6 жыл бұрын
The current path, accounts/signup/accounts/signup/, didn't match any of these. i`m getting this error,can u help me on how to tackle this in my form,i followed all your steps...
@embrekbuason89766 жыл бұрын
In signup.html I put action="." instead of action="accounts/signup.html" which worked for me, "." means the directory it is already in. Hope that helps.
@imammahadi3525 жыл бұрын
@@embrekbuason8976 Thank you buddy.I was also thought about action argument.And your comment make it clear to me.Thanks again
@elenaperez63273 жыл бұрын
@@embrekbuason8976 3 years later and your comment still helps people, thanks a lot!
@tonymugendi85236 жыл бұрын
For anyone getting a HttpResponse object error, make sure to add an else statement if the form is invalid if form.is_valid(): form.save() # Log user in return redirect('articles:list') else: return render(request, 'accounts/signup.html', { 'form': form })
@jaynepal20516 жыл бұрын
UnboundLocalError at /accounts/signup local variable 'form' referenced before assignment
@dustbinsavesyou82836 жыл бұрын
I'm having the same problem
@yeshijinsel6 жыл бұрын
def signup_view(request): if request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): form.save() #log the user in return redirect('articles:list') else: form = UserCreationForm return render(request, 'accounts/signup.html', {'form': form})
@AxmedShiimax6 жыл бұрын
Thank you so much
@elyasomarr3 жыл бұрын
Thanks a lot
@KevinTempelx4 жыл бұрын
form.save() only works for me if I save it to a variable. Is that something new? I don't know where that variable will come in hand later. I was hoping to get clarification.. Thank you!
@letoan2856 жыл бұрын
Hello shaun, could you please have a brief explanation the differences in django 2? I have some confuse about urls
@dawitbezabih62472 жыл бұрын
In case the redirect('articles:list') is not working for you Try redirect('list') I hope that works and check the documentation.
@trzztrzz2477 Жыл бұрын
life safer. Thank you!
@rahulparmar2086 жыл бұрын
I typed csrf_token exactly u did.. But still getting that csrf token missing error
@fahimchowdhury63555 жыл бұрын
same problem
@oleksandr67505 жыл бұрын
had same problem, reload the server
@johnnydamilatis82814 жыл бұрын
I had some issues with some adblockers not letting the csrf token work properly. When i turned the blocker off it worked properly.
@PastewnyGolem4 жыл бұрын
Reload the server + clear the cache in browser
@DuongTran-zh6td2 жыл бұрын
1:25 chinh sua ham signup_view de luu tai khoan nguoi dung vao admin
@anroiduser12224 жыл бұрын
I owe you alot!
@diosdadoasumundongandeme32225 жыл бұрын
tanks brooo
@dustbinsavesyou82836 жыл бұрын
So how do you get the application on the internet in the first place, like its not a static html website its a whole server
@davidtolu27105 жыл бұрын
how can we remove those guidelines that pop up on django signup html side, they should only be shown when there is an error
@peymannaji6 жыл бұрын
How can we retrieve data from Request.POST when we post normal ( Fx: Comments ) data and not something related to Django's framework like user form ?
@Kristmaz8085 жыл бұрын
u didnt tell us what should be in the urls.py file... where did /accounts/signup/ come from lol Update: found the answer in video #22 :)
@dec236 жыл бұрын
Hi Ninja and anyone in the comments, I'm interested in only asking users to sign up for 'our newsletter' and only ask for the users email and have that stored in the database. Is this sort of the same way I would accomplish that? Does Django have system in place of that instead of the UserCreateForm function?
@argelpolicarpio65526 жыл бұрын
create your own forms.py inside your app
@pankajuprety92164 жыл бұрын
thank you so much
@ahmdzsakib80934 жыл бұрын
I got this error, I check all the URL I used everything seems fine but whenever I submit the form get this error anyone please help me Page not found (404) Request Method: POST Request URL: 127.0.0.1:8000/accounts/signup/ Using the URLconf defined in pyshop.urls, Django tried these URL patterns, in this order: admin/ products/ orders/ articles/ accounts/ signup [name='signup'] ^static/(?P.*)$ ^media/(?P.*)$ The current path, accounts/signup/, didn't match any of these.
@lightknight8766 жыл бұрын
your videos are awesome Ninja. can your followers make requests? can we beg you to do a asp.net core c# project after this one? thanks mate!
@NetNinja6 жыл бұрын
Ha, tthanks :). Yeah you can always make requests. I can't do all of tem but if enough people ask for something I generally try to do it. As for C# and ASP, I will be doing a series on this. But it won't be next. Most likely some time in the new year.
@lightknight8766 жыл бұрын
The Net Ninja Fantastic, mate! Glad I subscribed. I'll try to promote your channel. you're brilliant.
@NetNinja6 жыл бұрын
Thanks so much :). Really glad you like it.
@jafarrezazadeh8463 жыл бұрын
hi i used the {% csrf_token %} but still i have that error what should i do?
@jafarrezazadeh8463 жыл бұрын
no it is working, i just stop the server, run it again, and it is worked but in the video ninja did not that :)
@tinashemphisa72544 жыл бұрын
youre good
@ZK-rf4mf6 жыл бұрын
wow....love u nijna.. :)
@NetNinja6 жыл бұрын
Thanks :)
@dfhfdgfgdfshdfhe82576 жыл бұрын
chutiya
@clinck34393 жыл бұрын
its not redirecting me to the article list url
@ibrahimadamou5047 Жыл бұрын
make sure your last return is outside of the if/else clause
@o-t30164 жыл бұрын
For anyone who is getting an error this is how the views.py should be with django 3 from django.contrib.auth import authenticate, login from django.shortcuts import render , redirect from django.contrib.auth.forms import UserCreationForm from django.http import HttpResponse # Create your views here. def signup_view(request): if request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): form.save() # log the user in username = form.cleaned_data.get('username') messages.success(request, 'User has been created') return redirect('login') else: form = UserCreationForm() return render(request, 'accounts/signup.html', {'form':form})
@dustbinsavesyou82836 жыл бұрын
UnboundLocalError at /accounts/signup/ local variable 'form' referenced before assignment I'm getting line1 as the big error line and the second line as the sub line how did you use form without defining it in the main section
@md.mizanurrahmankhan42296 жыл бұрын
thanks
@anutoshyt4 жыл бұрын
The view accounts.views.signup_view didn't return an HttpResponse object. It returned None instead please help
@KevinTempelx4 жыл бұрын
I've been getting that for a while now..
@o-t30164 жыл бұрын
did you find anything about this?
@KevinTempelx4 жыл бұрын
@@o-t3016 What you're probably experiencing is not adding your app to your settings and not having had migrated it after that? Let me know.
@denniskinoti1833 жыл бұрын
check your return identation
@calibur55183 жыл бұрын
The view accounts.views.signup_view didn't return an HttpResponse object. It returned None instead.
@newtricks5833 жыл бұрын
make sure your last return is outside of the if/else clause
@ibrahimadamou5047 Жыл бұрын
@@newtricks583 Thanks very much
@vladus77044 жыл бұрын
I don't know why but i am getting this error .NoReverseMatch: Reverse for 'detail' not found. Can someone help me?
@chantzoul4 жыл бұрын
i was getting a similar error, i accidentally used a dictionary { } instead of a list [ ] for my 'urlpatterns' located in urls.py file... hopefully that helps
@im_vj_8 Жыл бұрын
check for the form action whether the entered route is correct or not
@Lbmaniak6 жыл бұрын
thx
@vcg72036 жыл бұрын
please make video on uploading image through django forms and also on update and delete data in database through forms
@hamrozjumaev6 жыл бұрын
Could anyone pls assist me with this error: NoReverseMatch at /accounts/signup/
@im_vj_8 Жыл бұрын
just check your app urls name once
@shadiismailalzouabi10354 жыл бұрын
when I add user mario not added users in admin
@rahulmadhugiri3 жыл бұрын
Yeah Im having the same issue. Anyone know why that might be happening?
@DuongTran-zh6td2 жыл бұрын
9:24 action them / va them {% crfs_token %}
@richardc93256 жыл бұрын
ooooooooh wow a hash algorithm, fancy
@richardc93256 жыл бұрын
4:50
@richardc93256 жыл бұрын
YOU USED ONLY ONE EQUAL SIGN IN YOUR IF STATEMENT NOOOOOOOOOOOOOOO TOO LATE
@edgardojrpo38596 жыл бұрын
why if i click somewhere of my /account/signup page i going to the articles page??? is that a problem??
@EMa-sf5gf5 жыл бұрын
I think he just wants to test out if the function works the way he expected.
@im_vj_8 Жыл бұрын
close the anchor tag properly in the base_layout.html