Re: URLField Validation

2022-09-23 Thread Ken Whitesell
That limit is a default setting. You're free to change it to whatever value you want in your models. (See the docs for URLField ) On Friday, September 23, 2022 at 3:58:55 PM UTC-4 matthew.pava wrote: > Hello, > > I ran into an

URLField Validation

2022-09-23 Thread Matthew Pava
Hello, I ran into an issue with a models.URLField because it limits the size of the field to 200 characters. I find this too short to my use case. I have a valid URL to an external website (in academia), and it won't fit in the Django URLField. This took me down a rabbit hole and this very

Re: Regarding Django forms

2022-09-23 Thread Kiet Lam
Why don't you also use the context and pass in an array to be rendered at the htm? There are too many repeating and hard code elements that could have been done with a single foreach statement. On Sat, Sep 24, 2022 at 2:27 AM Kiet Lam wrote: > Hi Nishant, > Yes. I would stick to using Django

Re: Regarding Django forms

2022-09-23 Thread Kiet Lam
Hi Nishant, Yes. I would stick to using Django forms. It has a lot of inbuilt security protection that is easily implemented at the front end like CSRF. Cheers, Kiet On Fri, Sep 23, 2022 at 3:56 PM Nishant Sagar wrote: > Hey forks, > > I’m in little dilemma regarding Django forms. I'm working

Re: Regarding Django forms

2022-09-23 Thread Nishant Sagar
That's what I wanted to know Thank you sir On Fri, Sep 23, 2022 at 7:42 PM Ken Whitesell wrote: > Absolutely. > > If you're using Django, then *use* Django. Take advantage of all the > facilities it provides you. > > Yes, it's a little more work on your part to convert this to a Form-based >

Re: Regarding Django forms

2022-09-23 Thread Ken Whitesell
Absolutely. If you're using Django, then *use* Django. Take advantage of all the facilities it provides you. Yes, it's a little more work on your part to convert this to a Form-based template. But what it provides you are all the facilities available within Django forms for data validation

Re: Regarding Django forms

2022-09-23 Thread Nishant Sagar
And one more thing, why is radio btn returning 'on' even if it is not selected? On Fri, Sep 23, 2022 at 7:36 PM Nishant Sagar wrote: > That's the whole point. I've attached my form.html file, do you think it's > a generous idea to design the whole form page using widgets if I already > have the

Re: Regarding Django forms

2022-09-23 Thread Nishant Sagar
That's the whole point. I've attached my form.html file, do you think it's a generous idea to design the whole form page using widgets if I already have the form template ready? {% csrf_token %} Registration form Name of Homeowner : Roof Age : Email ID : Phone : Full Home

Re: Regarding Django forms

2022-09-23 Thread siyamak abasnezhad
You can use widget Tweeks or crispy On Fri, Sep 23, 2022, 09:26 Nishant Sagar wrote: > Hey forks, > > I’m in little dilemma regarding Django forms. I'm working on a project as > a backend guy who doesn't know much about CSS and JavaScript so a frontend > guy delivered me a form template

Proposal: Add utility class "ClassList"

2022-09-23 Thread Jacob Rief
In JavaScript each HTMLElement has a property named classList . This actually is a set allowing to *add* a single CSS class string, *remove* it and/or *toggle* it. If we would reimplement this as a Python class, methods such