Hello, glad to see you here again. In today's part of the series, we are going to create the sign up page.
Okay to create users we need a model...
For further actions, you may consider blocking this person and/or reporting abuse
Creating The Sign Up Page Part I
Views.py
from .forms import RegisterForm
Giving me an import error. Tried all I know and cannot get past this. Please advise. Fyi: using django 4.1
Thank you
John
Hello there, have you created a forms.py file inside the users app and then the class
RegisterForm
?Yes created forms.py inside users app and RegisterForm. I have copied all your code. I have done a couple of django / app projects myself, no issues. Normally they are path related. Everything else works in your 10 part series so far but this. Some screenshots:
You have created forms.py inside users/templates/users directory. It should be in users/ that means where views.py, models.py and other files are located, so move it to the correct directory and let me know.
I figured it out. My mistake, I had forms.py in the template/users folder. I know better than that. There was another minor error with finding home that I fixed. I'm in chapter 6 now "Django social apps auth". After installing social-auth-app-django (verified pip list) and updating settings.py, migrate etc, I'm now getting an error after code edit in user_management/urls.py. Error: "ImportError: cannot import name 'url' from django.conf.urls (c:..... Seems to not like "from django.conf.urls import url" in projects urls.py file. So need to figure out why. Any suggestions would be helpful. Thank you. John
Ok so the issue is url has been removed from django 4. It's replaced by re_path. That's the fix.
Things have also changed with Google. Before u can use oauth you must use a verified fqdn and must have url to terms of service and public policy url etc. Then several stages of verifications. So cannot just hit Google and get creds to do oauth. Maybe jeed to update yor thread with the things that have changed. My 2 cents. Still love your tutorial.
Yes, url has been removed in Django 4. I'll update the project and the articles soon.
In general, thanks for your feedback and I'm glad I could help :)
Hi, i have this
Help please
ImportError: cannot import name 'home' from 'users.views' (D:\reglog\user_management\users\views.py)
Awesome post!
Thanks, am glad you enjoyed it
Hi
why we need to use
initial
in our code?