Re: [Django] #14094: Cannot define CharField with unlimited length

2022-12-28 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Adrian
 |  Torres
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"7eee1dca420ee7c4451d24cd32fa08aed0dcbb36" 7eee1dc]:
 {{{
 #!CommitTicketReference repository=""
 revision="7eee1dca420ee7c4451d24cd32fa08aed0dcbb36"
 Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.

 Co-authored-by: Mariusz Felisiak 
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018558cbd412-765c9cfc-235a-490c-89d1-a7dbfc0fbd7d-00%40eu-central-1.amazonses.com.


Re: [Django] #14094: Cannot define CharField with unlimited length

2022-12-28 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Adrian
 |  Torres
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185586763f4-fcb29bec-0b88-4f59-a79a-6db755c223d5-00%40eu-central-1.amazonses.com.


Re: [Django] #14094: Cannot define CharField with unlimited length

2022-12-15 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Adrian
 |  Torres
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018515dd918b-e156310f-afca-4396-a8ad-c7100578070b-00%40eu-central-1.amazonses.com.


Re: [Django] #14094: Cannot define CharField with unlimited length

2022-11-16 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Adrian
 |  Torres
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adrian Torres):

 * cc: Adrian Torres (added)
 * needs_better_patch:  1 => 0
 * owner:  Aron Podrigal => Adrian Torres


Comment:

 I have submitted a patch at https://github.com/django/django/pull/16302

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018481dfac4c-9db6b26c-432b-412e-9f46-37107ab7b730-00%40eu-central-1.amazonses.com.


Re: [Django] #14094: Cannot define CharField with unlimited length

2022-06-18 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Aron
 |  Podrigal
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anvesh Mishra):

 * cc: Anvesh Mishra (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018176c3b4b7-f401a49c-378a-4ccf-aac2-ef41d4f4cd91-00%40eu-central-1.amazonses.com.


Re: [Django] #14094: Cannot define CharField with unlimited length

2019-05-03 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  Daniel Miller|Owner:  Aron
 |  Podrigal
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Rich Rauenzahn):

 * cc: Rich Rauenzahn (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c82ed5fd558fc1804c9387b6aae0388f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2016-08-22 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 Please be more specific about the docs inaccuracy. I see
 [https://docs.djangoproject.com/en/1.9/ref/models/fields/#charfield the
 following]:

  CharField has one extra required argument: ... CharField.max_length

 Perhaps you're looking at the
 [https://docs.djangoproject.com/en/1.9/ref/forms/fields/#charfield form
 field docs] where the argument is indeed option.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f146be90f4559ce3e0533f322acba643%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2016-08-22 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by geekscrapy):

 Agree that this should be made optional, but at the very least the docs
 for 1.9 need amending as it describes this attribute as optional.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.444d7b9720bb8257e570e3d3064396da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2016-01-21 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by srkunze):

 Recently, I helped a friend bootstrapping a new Django project.

 This issue (TextField vs CharField without max_length) again popped up
 because I had trouble explaining why exactly there needs to be a limit.
 Because I have some reasonable experience with Django I know about the
 internal relationship between models and forms which again lead to some
 questionable design decisions in the past.


 My point here is there is not easy way for (new) Django users to decide
 for either a CharField or a TextField.

 CharField -> one line text data but limited
 TextField -> multi-line text data

 What most projects actually need is
 CharField -> one line, unlimited text data

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.351f8ab2f4a1e4975837b68b36bf6b9c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2015-09-24 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 The consensus on the mailing list seems to be that making `max_length`
 optional isn't a good idea.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.431cad8d9f5b4b2493dd2cc2108d9eff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2015-09-21 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 Perhaps you should wait until the discussion on django-developers comes to
 a consensus; new ideas are still being proposed.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.fe04d72467cae5745abe65b008fae666%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2015-09-21 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  ar45
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ar45):

 * cc: ar45 (added)
 * owner:  nobody => ar45
 * has_patch:  0 => 1
 * version:  1.2 => master
 * status:  new => assigned


Comment:

 I started to work on this here
 [https://github.com/django/django/compare/master...ar45:max_length_optional]
 I would appriciate any comments.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.a26e3a985923f424714809f00c320554%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-06-07 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
 Reporter:  millerdev|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.2
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * component:  Core (Other) => Database layer (models, ORM)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f5ef916d9245ba8af9ce24898393b283%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-06-07 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by erikr):

 Replying to [comment:15 charettes]:
 > What about providing a backend specific `max_length` just like we do
 with `IntegerField` and friends? See #12030 and
 1506c71a95cd7f58fbc6363edf2ef742c58d2487.

 Yes, that makes sense to me as well.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.0c9a77519f9bc409c525b4ea36d75418%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-05-31 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by charettes):

 > My suggestion is to give max_length on CharField a default that matches
 4000 bytes, but I'm not sure whether that's the best solution.

 What about providing a backend specific `max_length` just like we do with
 `IntegerField` and friends? See #12030 and
 1506c71a95cd7f58fbc6363edf2ef742c58d2487.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b34fe81912c29ce3fa448ec5a8e5c46c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-05-31 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by erikr):

 Thanks for digging into that. However, I think this isn't the biggest
 problem. If I read the
 
[[http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1825|oracle
 docs]] correctly, specifying a length is mandatory for `VARCHAR2`, and the
 maximum is 4000 bytes. For
 [[http://dev.mysql.com/doc/refman/5.7/en/char.html|MySQL]], it's 65K
 bytes, for PostgreSQL and SQLite it's very large.

 Therefore, we can't set it to an unlimited length for all databases: we
 must pick something up to 4000 as maximum for Oracle. I don't think it's
 acceptable to only require `max_length` for Oracle backends. Essentially,
 I only see one option: default `max_length` to to the Oracle maximum. This
 works the same in all databases, and will work for many cases. Anyone else
 can still override it trivially. I'm not too enthusiastic about this
 solution though.

 Another challenge with this solution that, if I remember correctly,
 `max_length` defines characters, whereas the oracle limit is 4000 bytes.
 How characters translate to bytes depends on characters and encoding.
 However, this might be solved already somewhere: after all, if you define
 `max_length` on a field now, that value must not end up as the limit in
 `varchar2(n)` due to the same concern.

 I should add that I know very little about Oracle, so it's entirely
 possible this is not the complete story for Oracle.

 To summarise:
 * An explicit `max_length` defined somewhere (either in your own code or
 in Django) is always required for Oracle compatibility, if I read the docs
 correctly.
 * The maximum size can be no longer than 4000 bytes, which may not fit
 4000 characters, depending on encoding. We may already have code in place
 that resolves this concern.
 * My suggestion is to give `max_length` on `CharField` a default that
 matches 4000 bytes, but I'm not sure whether that's the best solution.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.1105864d7413061658dff36bf9d8bbbc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-05-30 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by bendavis78):

 Ugh. I took a stab at it and fell into the black hole that is the Django
 ORM. I'll try to summarize what I found here in case anyone is interested.

 Fixing the validation was easy, just needed to delete a few lines of code.
 Now, we could just override CharField's db_type() method to return
 `"varchar"` and be done with it, but that doesn't seem like the right
 solution to me, especially since CharField is a core field type. So, I
 sought out to find the right way to fix it, but only uncovered more
 hurdles.

 The problem starts with how django db backends define their basic mappings
 from django's "internal types" to the actual SQL definition. The mappings
 all look something like `"varchar(%(max_length)s)"` and are used to format
 a string given the field's `__dict__`. So the first hurdle was that
 `Field.db_type()` was returning `"varchar(None)"`. I made some changes to
 get it to replace `None` values with `''`. But then I found that
 `"varchar()"` is invalid syntax in postgres -- you have to use just
 `"varchar"` alone.

 So, like Dante, I ventured deeper. The `db_type()` method relies on the
 backend's `DatabaseCreation` class, which is where these mappings are
 defined. One option I thought of was to have two internal types for
 CharField:
 {{{
 #!python
 data_types = {
 #...
 'CharField': 'varchar(%(max_length)s)',
 'CharFieldNoLimit': 'varchar',
 #..
 }
 }}}
 But, there's no precident right now for having two internal types for the
 same model field. Besides, these mappings don't help us differentiate
 between "data type" and "modifier", which is what really needed to happen.
 So, ''I ventured even deeper''.

 The base `Field` defines `db_type()`, `db_parameters()`, and
 `db_type_suffix()`. I would argue that `Field` shouldn't even implement
 these methods, as they produce back-end specific results. Those methods
 should really live in a back-end specific class. That's where I pretty
 much threw my hands up. Django's whole schema system is in flux right now
 due to migrations, and it's not really clear what the right answer is.

 Well, that was fun. C'est la vie.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.7d1eb43126035fa8e08bab299863a84a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-05-30 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 The answer may be disappointing -- no one was sufficiently interested in
 this issue to write a patch, that's all...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f78a892090f2e0c78b127cf5718870a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2014-05-30 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by bendavis78):

 I'm curious why this ticket is 4 years old. Everyone seems to be in
 agreement that this should change, and it seems like a simple one (unless
 I'm mistaken), and it's backward compatible.

 I completely agree with aaugustin (comment:6). The max_length argument
 should be reserved for use cases where someone wants to enforce the
 length. Instead I'm having to pick arbitrary values for things that don't
 need enforcing. It adds indirection to my models because it implies that
 the value ''should'' be enforced when that's not really the case.

 For databases like MySQL that require a length, the db field should be
 created as VARCHAR(255) by default. The documentation already has a note
 that says "some backends have restrictions on max length", so we would
 just need to expand on that to explain the behavior when max_length is
 None.

 Also, using TextField is not the right answer -- it has a different
 meaning in Django, regardless of how it's stored in the db.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f622bc8ba9bb19ff678d33be56edbdc7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14094: Cannot define CharField with unlimited length

2013-10-02 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by unaizalakain):

 * cc: unai@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b7e79a3085596f1321ca91a0b144dc05%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #14094: Cannot define CharField with unlimited length

2013-09-03 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by mightyiam):

 * cc: mightyiam (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.229dbfaca8178f03c8e3f51e8f3da5a4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #14094: Cannot define CharField with unlimited length

2012-11-13 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by akaariai):

 Oracle for example uses nvarchar2 for CharField, NCLOB for TextField,
 MySQL has varchar and longtext... And these "unlimited" size text fields
 really are different than limited size text field without the limit.

 How about just having a "large" default value, like 1024 chars?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14094: Cannot define CharField with unlimited length

2012-11-13 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 I can't comment on performance, but I've always found choosing the length
 of `CharField`s incredibly annoying.

 "How long can this be? 100 chars? Fields are always too short, et's make
 it 200. Oh why not 255, everyone does that..."

 I'm in favor of removing the requirement to define `max_length` on
 `CharField`s, and making them unlimited by default — assuming this isn't a
 ''Gun Aimed At Feet''.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14094: Cannot define CharField with unlimited length

2012-11-13 Thread Django
#14094: Cannot define CharField with unlimited length
--+
 Reporter:  millerdev |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.2
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by jacob):

 * stage:  Design decision needed => Accepted


Comment:

 We should do this. Postgres, at least, has no performance or storage space
 penalty for using `varchar` over `varchar(n)` -- the length requirement is
 basically a constraint, that's all. I imagine other modern DBs are
 similar, but even if not it's still a good idea to let users make the
 call, not do it unilaterally.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14094: Cannot define CharField with unlimited length

2011-07-07 Thread Django
#14094: Cannot define CharField with unlimited length
-+-
   Reporter:  millerdev  |  Owner:  nobody
   Type:  New| Status:  reopened
  feature|  Component:  Core (Other)
  Milestone: |   Severity:  Normal
Version:  1.2|   Keywords:
 Resolution: |  Has patch:  0
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by aaugustin):

 * stage:  Unreviewed => Design decision needed


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14094: Cannot define CharField with unlimited length

2011-07-06 Thread Django
#14094: Cannot define CharField with unlimited length
---+--
   Reporter:  millerdev|  Owner:  nobody
   Type:  New feature  | Status:  reopened
  Milestone:   |  Component:  Core (Other)
Version:  1.2  |   Severity:  Normal
 Resolution:   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+--
Changes (by joe@…):

 * status:  closed => reopened
 * severity:   => Normal
 * cc: joe@… (added)
 * resolution:  invalid =>
 * easy:   => 0
 * ui_ux:   => 0
 * type:   => New feature


Comment:

 PostgreSQL allows char fields (which are distinct from Text fields) which
 are "character varying" with no preset length.

 It only makes sense that these should map to a Django CharField, with
 max_length=None, rather than be forced to use a Django TextField, only
 because of this limitation of Django.

 In common PostgreSQL usage, these are small text fields of 20 or 50
 characters or less, NOT large text fields.

 Fixing this issue would also make the introspection of existing postgres
 databases *much* smoother.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14094: Cannot define CharField with unlimited length

2011-01-19 Thread Django
#14094: Cannot define CharField with unlimited length
-+--
  Reporter:  millerdev   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  invalid |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by rfugger):

 You can subclass CharField to get rid of max_length, like in this snippet:

 http://djangosnippets.org/snippets/2328/

 Alternatively, you can subclass TextField to override the form fields it
 generates by default so you don't get big textareas.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14094: Cannot define CharField with unlimited length

2010-08-11 Thread Django
#14094: Cannot define CharField with unlimited length
-+--
  Reporter:  millerdev   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  invalid |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by akaariai):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 You should use models.TextField, which is unlimited in size.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.