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 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 good answer on Stack 
> Overflow:
>
> https://stackoverflow.com/a/417184/603819
>
>  
>
> Summary:
>
>1. The HTTP protocol doesn’t place a limit on the number of characters.
>2. Modern browsers suggest not exceeding 2,000 characters.
>
>  
>
> There are other details, such as the domain name not exceeding 255 
> characters, but that is a different issue.
>
>  
>
> Why does Django impose such a limit on URLField? Could we increase it to, 
> say, 2000 characters? Or even just remove the limitation on it?
>
> Thanks,
>
> Matthew
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a42f7ebc-d6c3-4e57-8b23-03dad0e5f391n%40googlegroups.com.


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 good answer on Stack Overflow:
https://stackoverflow.com/a/417184/603819

Summary:

  1.  The HTTP protocol doesn't place a limit on the number of characters.
  2.  Modern browsers suggest not exceeding 2,000 characters.

There are other details, such as the domain name not exceeding 255 characters, 
but that is a different issue.

Why does Django impose such a limit on URLField? Could we increase it to, say, 
2000 characters? Or even just remove the limitation on it?
Thanks,
Matthew

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8e0dccd02c20476b95b84108446020f6%40Exchange.ISS.LOCAL.


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 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 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 designed using CSS, however, Django
>> documentation suggests that it's good practice to use Django forms.
>>
>> So how feasible do you think it is for a frontend guy to learn Django
>> widgets from scratch to implement the same thing he can easily do from CSS
>> and JS. As a newbie backend guy, it's not easy for me either to learn
>> frontend tech to implement the same thing in so little time.
>>
>> So I tried implementing the form without using Django forms but I find it
>> hard to deal with files as there is no documentation I can look up to.
>>
>> So can we add these to the documentation or it is still advisable to use
>> Django forms?
>>
>>
>> Thanks and regards,
>> Nishant
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJ5pyZ%3DSVVNccLzS9iRDMWmZOtaVf90DroUWB_fDOjxWh3wTYQ%40mail.gmail.com.


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 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 designed using CSS, however, Django
> documentation suggests that it's good practice to use Django forms.
>
> So how feasible do you think it is for a frontend guy to learn Django
> widgets from scratch to implement the same thing he can easily do from CSS
> and JS. As a newbie backend guy, it's not easy for me either to learn
> frontend tech to implement the same thing in so little time.
>
> So I tried implementing the form without using Django forms but I find it
> hard to deal with files as there is no documentation I can look up to.
>
> So can we add these to the documentation or it is still advisable to use
> Django forms?
>
>
> Thanks and regards,
> Nishant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJ5pyZmWbU8fZ6ebZEfW90ZRn6LvuaokF_AniPP%3DMzwXfRm_2w%40mail.gmail.com.


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
> template. But what it provides you are all the facilities available within
> Django forms for data validation and conversions.
>
> On 9/23/2022 10:06 AM, 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 form template ready?
>
> 
> 
> 
> 
> 
> 
> 
>  >
> {% csrf_token %}
> Registration form
> 
> 
> Name of Homeowner :
> 
> 
> 
> Roof Age :
>  required />
> 
> 
> 
> Email ID :
>  />
> 
> 
> Phone :
>  />
> 
> 
> Full Home Address :
>  required />
> 
> 
> Average Monthly Electric Bill Costs :
>  required />
> 
> 
> Do you have HOA?
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Would you also need a battery?  label>
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Is your home on concrete
> foundation?
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Roof Type :
> 
> 
> Select here
> Comp Shingle
> Concrete
> Metal
> Spanish
> Clay
> 
> 
> 
> 
> 
> Your Availability :
>  placeholder="Select Time"
> required />
> 
> 
> Upload your bill :
> 
> 
> 
>  "reset" />
>  "submit" />
> 
> 
> 
> 
> 
> 
>
> On Fri, Sep 23, 2022 at 7:20 PM siyamak abasnezhad 
> wrote:
>
>> 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 designed using CSS, however,
>>> Django documentation suggests that it's good practice to use Django forms.
>>>
>>> So how feasible do you think it is for a frontend guy to learn Django
>>> widgets from scratch to implement the same thing he can easily do from CSS
>>> and JS. As a newbie backend guy, it's not easy for me either to learn
>>> frontend tech to implement the same thing in so little time.
>>>
>>> So I tried implementing the form without using Django forms but I find
>>> it hard to deal with files as there is no documentation I can look up to.
>>>
>>> So can we add these to the documentation or it is still advisable to use
>>> Django forms?
>>>
>>>
>>> Thanks and regards,
>>> Nishant
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-developers+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CAOGgH_-umvzoQ2cDkQFbTMU%3D6cvsxNV%2B2MNCwvr46kPCOCJ-Gw%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CANNtL-KYchoxjB9GoQsBhHQb%2BEdhtO9FdC9D%2B%2BTmipg96JskKw%40mail.gmail.com
> 
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/96aff1ea-9e34-69d4-c258-26dffabc4c69%40comcast.net
> 
> .
>

-- 
You received this message b

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 and conversions.


On 9/23/2022 10:06 AM, 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 form template ready?









id="register-form">

{% csrf_token %}
Registration form


Name of Homeowner :



Roof Age :
required />




Email ID :
required />



Phone :
required />



Full Home Address :
required />



Average Monthly Electric Bill Costs :
required />



Do you have HOA?


Yes




No




Would you also need a 
battery? 



Yes




No




Is your home on concrete 
foundation?



Yes




No




Roof Type :


Select here
Comp Shingle
Concrete
Metal
Spanish
Clay





Your Availability :
placeholder="Select Time"

required />


Upload your bill :



id="reset" />
id="submit" />








On Fri, Sep 23, 2022 at 7:20 PM siyamak abasnezhad 
 wrote:


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
designed using CSS, however, Django documentation suggests
that it's good practice to use Django forms.

So how feasible do you think it is for a frontend guy to learn
Django widgets from scratch to implement the same thing he can
easily do from CSS and JS. As a newbie backend guy, it's not
easy for me either to learn frontend tech to implement the
same thing in so little time.

So I tried implementing the form without using Django forms
but I find it hard to deal with files as there is no
documentation I can look up to.

So can we add these to the documentation or it is still
advisable to use Django forms?


Thanks and regards,
Nishant
-- 
You received this message because you are subscribed to the

Google Groups "Django developers (Contributions to Django
itself)" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to
django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com

.

-- 
You received this message because you are subscribed to the Google

Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-developers/CAOGgH_-umvzoQ2cDkQFbTMU%3D6cvsxNV%2B2MNCwvr46kPCOCJ-Gw%40mail.gmail.com

.

--
You received this message because you are subscribed to the Google 
Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANNtL-KYchoxjB9GoQsBhHQb%2BEdhtO9FdC9D%2B%2BTmipg96JskKw%40mail.gmail.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/96aff1ea-9e34-69d4-c258-26dffabc4c69%40comcast.net.


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 form template ready?
>
> 
> 
> 
> 
> 
> 
> 
>  >
> {% csrf_token %}
> Registration form
> 
> 
> Name of Homeowner :
> 
> 
> 
> Roof Age :
>  required />
> 
> 
> 
> Email ID :
>  />
> 
> 
> Phone :
>  />
> 
> 
> Full Home Address :
>  required />
> 
> 
> Average Monthly Electric Bill Costs :
>  required />
> 
> 
> Do you have HOA?
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Would you also need a battery?  label>
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Is your home on concrete
> foundation?
> 
> 
> Yes
> 
> 
> 
> 
> No
> 
> 
> 
> 
> Roof Type :
> 
> 
> Select here
> Comp Shingle
> Concrete
> Metal
> Spanish
> Clay
> 
> 
> 
> 
> 
> Your Availability :
>  placeholder="Select Time"
> required />
> 
> 
> Upload your bill :
> 
> 
> 
>  "reset" />
>  "submit" />
> 
> 
> 
> 
> 
>
> 
>
> On Fri, Sep 23, 2022 at 7:20 PM siyamak abasnezhad 
> wrote:
>
>> 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 designed using CSS, however,
>>> Django documentation suggests that it's good practice to use Django forms.
>>>
>>> So how feasible do you think it is for a frontend guy to learn Django
>>> widgets from scratch to implement the same thing he can easily do from CSS
>>> and JS. As a newbie backend guy, it's not easy for me either to learn
>>> frontend tech to implement the same thing in so little time.
>>>
>>> So I tried implementing the form without using Django forms but I find
>>> it hard to deal with files as there is no documentation I can look up to.
>>>
>>> So can we add these to the documentation or it is still advisable to use
>>> Django forms?
>>>
>>>
>>> Thanks and regards,
>>> Nishant
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-developers+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CAOGgH_-umvzoQ2cDkQFbTMU%3D6cvsxNV%2B2MNCwvr46kPCOCJ-Gw%40mail.gmail.com
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANNtL-JBsN2Fk2j4Pe--tYQbCGnBRSy%3Dk_K8EuyHYyugzyJq1A%40mail.gmail.com.


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 Address :



Average Monthly Electric Bill Costs :



Do you have HOA?


Yes




No




Would you also need a battery? 


Yes




No




Is your home on concrete
foundation?


Yes




No




Roof Type :


Select here
Comp Shingle
Concrete
Metal
Spanish
Clay





Your Availability :



Upload your bill :













On Fri, Sep 23, 2022 at 7:20 PM siyamak abasnezhad 
wrote:

> 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 designed using CSS, however, Django
>> documentation suggests that it's good practice to use Django forms.
>>
>> So how feasible do you think it is for a frontend guy to learn Django
>> widgets from scratch to implement the same thing he can easily do from CSS
>> and JS. As a newbie backend guy, it's not easy for me either to learn
>> frontend tech to implement the same thing in so little time.
>>
>> So I tried implementing the form without using Django forms but I find it
>> hard to deal with files as there is no documentation I can look up to.
>>
>> So can we add these to the documentation or it is still advisable to use
>> Django forms?
>>
>>
>> Thanks and regards,
>> Nishant
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAOGgH_-umvzoQ2cDkQFbTMU%3D6cvsxNV%2B2MNCwvr46kPCOCJ-Gw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANNtL-KYchoxjB9GoQsBhHQb%2BEdhtO9FdC9D%2B%2BTmipg96JskKw%40mail.gmail.com.


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 designed using CSS, however, Django
> documentation suggests that it's good practice to use Django forms.
>
> So how feasible do you think it is for a frontend guy to learn Django
> widgets from scratch to implement the same thing he can easily do from CSS
> and JS. As a newbie backend guy, it's not easy for me either to learn
> frontend tech to implement the same thing in so little time.
>
> So I tried implementing the form without using Django forms but I find it
> hard to deal with files as there is no documentation I can look up to.
>
> So can we add these to the documentation or it is still advisable to use
> Django forms?
>
>
> Thanks and regards,
> Nishant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CANNtL-Kqud7V6sk_%3DYnagzATw8eJjO9pCeDx9Za80XywXBi2tQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAOGgH_-umvzoQ2cDkQFbTMU%3D6cvsxNV%2B2MNCwvr46kPCOCJ-Gw%40mail.gmail.com.


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 as
css_classes 

 
could be implemented as a one-liner. This would also be beneficial
for future uses of similar methods in Django and 3rd party libraries, 
because it is a quite
common use case that one has to change the list of CSS classes as an element
attribute.

– Jacob

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/eecbea4e-84f8-4aef-8998-26ff96a82bc0n%40googlegroups.com.