Giter VIP home page Giter VIP logo

Comments (9)

Jagrati-Bot avatar Jagrati-Bot commented on July 17, 2024 1

Hi! Thanks for opening your first issue at JagratiWebApp 🚀 We really appreciate it. 🙌 Someone from our team will get back here soon.

from jagratiwebapp.

garg3133 avatar garg3133 commented on July 17, 2024 1

Thanks, @engineerscodes for raising this issue. We should definitely validate the form in the backend. But I think a better place to validate the forms is forms.py and not views. Views should only contain the main backend logic.

We are trying to port our forms to Django forms, starting from issue #263, as backend would definitely provide a better form validation.

from jagratiwebapp.

harshakhmk avatar harshakhmk commented on July 17, 2024 1

@garg3133 he is mentioning this issue while creating a new user account, I guess so we need a form there too
I would like to work on this

from jagratiwebapp.

engineerscodes avatar engineerscodes commented on July 17, 2024

look at this line -

email = request.POST['email']

before doing this you could do regex, to check if its a valid Email address or Not

user = User(email=email, is_active=False)

from jagratiwebapp.

engineerscodes avatar engineerscodes commented on July 17, 2024

Yes, your right I did not see the form.py file, you could do def clean and raise an error if it's not a valid email

from jagratiwebapp.

engineerscodes avatar engineerscodes commented on July 17, 2024

There is already form.py

class UserAdminCreationForm(forms.ModelForm):

"""A form for creating new users. Includes all the required

from jagratiwebapp.

garg3133 avatar garg3133 commented on July 17, 2024

Yeah, I guess I created this form to escape Django's password validation while creating a new user through Admin Portal (you can see this form is only used in accounts/admin.py).

I think we can just create a new form here, and use Django's password validation out-of-the-box and check the email against the Regex pattern in clean_email method.

from jagratiwebapp.

harshakhmk avatar harshakhmk commented on July 17, 2024

I would like to work on this @garg3133

from jagratiwebapp.

vinayak3010 avatar vinayak3010 commented on July 17, 2024

sir I am django developer and currently working on making REST APIs through django and integrate it with react frontend, so I would like to work on this if assigned

from jagratiwebapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.