Re: [Django] #22424: Default value for TextField

2014-05-21 Thread Django
#22424: Default value for TextField
-+-
 Reporter:  Nevsky   |Owner:  Loic
 Type:  Bug  |  Bistuer 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-beta-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"d61b6224b09cb2aa6fb75ccecab246f91553ef7b"]:
 {{{
 #!CommitTicketReference repository=""
 revision="d61b6224b09cb2aa6fb75ccecab246f91553ef7b"
 [1.7.x] Fixed #22424 -- Fixed handling of default values for
 TextField/BinaryField on MySQL.

 Thanks syphar for the review and suggestions.

 Backport of 1d3d01b4f7 from master
 }}}

-- 
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/064.50c2cf7f8e346188fe69c8a5494c8d86%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-21 Thread Django
#22424: Default value for TextField
-+-
 Reporter:  Nevsky   |Owner:  Loic
 Type:  Bug  |  Bistuer 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-beta-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"1a29675d76de00d6fad9b366fc66e8b6d541c3b6"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1a29675d76de00d6fad9b366fc66e8b6d541c3b6"
 [1.7.x] Fixed #22626 -- Allow BinaryField defaults with SQlite.

 Also fixes a slight issue in sqlite3.schema._remake_table where
 default values where quoted with "column name" quoting rules.

 Reference for quoting: http://www.sqlite.org/lang_expr.html

 Thanks Shai Berger for the review. Refs #22424.

 Backport of 6aacb4c991 from master
 }}}

-- 
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/064.bc8ab33bcc5fa594cf4fe8118bf0b5a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-20 Thread Django
#22424: Default value for TextField
-+-
 Reporter:  Nevsky   |Owner:  Loic
 Type:  Bug  |  Bistuer 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-beta-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Andrew Godwin ):

 In [changeset:"4e32e47348473757280ca7a8d78edf6011fe65a3"]:
 {{{
 #!CommitTicketReference repository=""
 revision="4e32e47348473757280ca7a8d78edf6011fe65a3"
 Merge pull request #2634 from loic/ticket22424

 Fixed #22424 -- MySQL doesn't accept migrations' one-off default values
 ...
 }}}

-- 
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/064.1447e49f735a391e5c05bb01ee38f308%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-20 Thread Django
#22424: Default value for TextField
-+-
 Reporter:  Nevsky   |Owner:  Loic
 Type:  Bug  |  Bistuer 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-beta-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by Loic Bistuer ):

 * status:  new => closed
 * owner:   => Loic Bistuer 
 * resolution:   => fixed


Comment:

 In [changeset:"1d3d01b4f74f80655ac354f7a39e3908a9b41b14"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1d3d01b4f74f80655ac354f7a39e3908a9b41b14"
 Fixed #22424 -- Fixed handling of default values for TextField/BinaryField
 on MySQL.

 Thanks syphar for the review and suggestions.
 }}}

-- 
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/064.d3274e32b1d4ea6566e0bc1b83732b90%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-20 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 Loic Bistuer ):

 In [changeset:"6aacb4c9915c83a897dbde0b11cc46131fc7d16e"]:
 {{{
 #!CommitTicketReference repository=""
 revision="6aacb4c9915c83a897dbde0b11cc46131fc7d16e"
 Fixed #22626 -- Allow BinaryField defaults with SQlite.

 Also fixes a slight issue in sqlite3.schema._remake_table where
 default values where quoted with "column name" quoting rules.

 Reference for quoting: http://www.sqlite.org/lang_expr.html

 Thanks Shai Berger for the review. Refs #22424.
 }}}

-- 
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/064.9a356746d47eaa0715594321160481c9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-19 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 CollinAnderson):

 #22649 SchemaEditor.quote_value is very fragile.

-- 
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/064.53b9a171018bd03e94d3f11cc7a28dfd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-17 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 loic84):

 Updated the PR to fix the issue reported by @syphar and to incorporate the
 fix for #22626.

 Sadly the handling of bytes/strings is still less than ideal in the many
 `quote_value`:
 - `"` in a `default` will break SQLite and MySQL.
 - Oracle doesn't support bytes so breaks on `BinaryField`.
 - Oracle uses `repr` to quote `six.string_types`, which will probably
 result in an extra `u` prefix.

 I propose we open a new ticket to deal with this issue separately.

-- 
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/064.e2599d6f194a8e7e0c5680d5dfead93c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-16 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 syphar):

 Update the PR with some comments:
 https://github.com/django/django/pull/2634

 short version:
 PR failing when there are empty or string defaults.
 But with fixed everything (in this ticket) seems fine.

-- 
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/064.e57e1204ebd35a4ebd24daaf45e4e539%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-16 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 syphar):

 * cc: denis.cornehl@… (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/064.8a74b3940301419f87b91f03e13dc8f7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-16 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 syphar):

 * owner:  syphar =>
 * status:  assigned => new


-- 
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/064.7e82c9395d56bd8aea87aedf0feb590c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-16 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  syphar
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 syphar):

 * owner:  nobody => syphar
 * status:  new => assigned


Comment:

 I'll have a look at it and verify the fix.

 (atm I get Nevsky's error when adding the column without the fix, with the
 fix I get another error. But checking it.

-- 
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/064.900ecd8ced9ce8e3a35ab02d38e36f16%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-06 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 loic84):

 MySQL rejects anything even remotely related to a default for blob/text
 columns (i.e. `ALTER TABLE 'table' ALTER COLUMN 'blob' DROP DEFAULT`).

-- 
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/064.b6c7ff14ad5d7d434b40775b371198da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-06 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 andrewgodwin):

 loic84: That PR looks like the right approach to me; will MySQL reject any
 default value on blob/text columns or just empty ones? Oracle has a weird
 behaviour where it treats empty strings as NULL on text columns that
 causes similar issues, but we have a fix for that.

-- 
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/064.cb5a6d9c813ba94502414f3f8c89a7f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-05 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 loic84):

 * cc: loic84 (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/064.20fc899c872c7c94242203244a678753%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-05 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 loic84):

 @Nevsky could you check if this solves your problem?
 https://github.com/django/django/pull/2634

-- 
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/064.50d7b4294d7a7e31db13dd308fc2f487%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-05 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Old description:

> Hi! I start testing Django 1.7beta1. I use MySQL database.
> I add new TextField into my model like that:
>
> {{{
> class Article(models.Model):
> title = models.CharField(max_length=200)
> pub_date = models.DateField()
> text = models.TextField()
> text2 = models.TextField() #new TextField
> }}}
>
> When I type "python manage.py migrate" I am asked to enter default value.
> But BLOB/TEXT columns can't have a default value and if i will type
> something like 'blabla' then after command "python manage.py
> makemigrations" i will see error. I think it is bug :)

New description:

 Hi! I start testing Django 1.7beta1. I use MySQL database.
 I add new TextField into my model like that:

 {{{
 class Article(models.Model):
 title = models.CharField(max_length=200)
 pub_date = models.DateField()
 text = models.TextField()
 text2 = models.TextField() #new TextField
 }}}

 When I type "python manage.py makemigrations" I am asked to enter default
 value.
 But BLOB/TEXT columns can't have a default value and if i will type
 something like 'blabla' then after command "python manage.py migrate" i
 will see error. I think it is bug :)

--

Comment (by loic84):

 Fixed the name of the commands in the ticket description.

 I originally assumed this was an issue before the migrate step, but it's
 indeed an SQL issue due to one-off defaults, Django uses db defaults for
 these.

 The fix for MySQL is to not provide a default for BLOB/TEXT in the
 SchemaEditor. Although we'll now need to propagate the default value
 manually.

-- 
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/064.e6af334067dc5f442e25d41b458a9d67%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-05-02 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 timo):

 Loic, I'm not sure using `''` as an automatic default is better than the
 current situation. Why not give the user the option of entering something
 else besides that (especially if `blank=True`)?

-- 
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/064.5220ece0c6085e1d946f75e7915d7a7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-04-13 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 Nevsky):

 Replying to [comment:1 loic84]:
 > Regarding the error with `'blabla'`, did you actually type the quotes?
 That prompt interprets Python, so if you just type `blabla` it'll throw an
 error because it can't find a variable named "blabla".
 Yes, I type the quotes and migration successfully making. I get error when
 I trying to apply created migration because it contains default value for
 field that can't have default value in MySQL database :)

-- 
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/064.0dacd5072a77a2fa10648c310498bab4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22424: Default value for TextField

2014-04-12 Thread Django
#22424: Default value for TextField
-+--
 Reporter:  Nevsky   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-beta-1
 Severity:  Release blocker  |   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 loic84):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Hi @Nevsky, `default` is actually handled at the Python level, not added
 to the SQL, so that shouldn't be an issue.

 I can reproduce that adding a `TextField()` triggers the questioner which
 is probably confusing, I wonder if we can't just use `''` as default
 automatically when `default=NOT_PROVIDED` and
 `empty_strings_allowed=True`. Accepting the ticket on this basis.

 Regarding the error with `'blabla'`, did you actually type the quotes?
 That prompt interprets Python, so if you just type `blabla` it'll throw an
 error because it can't find a variable named "blabla".

-- 
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/064.49cd68d96ad02c868388a17949afe076%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #22424: Default value for TextField

2014-04-12 Thread Django
#22424: Default value for TextField
-+
 Reporter:  Nevsky   |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Migrations   |Version:  1.7-beta-1
 Severity:  Release blocker  |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 Hi! I start testing Django 1.7beta1. I use MySQL database.
 I add new TextField into my model like that:

 {{{
 class Article(models.Model):
 title = models.CharField(max_length=200)
 pub_date = models.DateField()
 text = models.TextField()
 text2 = models.TextField() #new TextField
 }}}

 When I type "python manage.py migrate" I am asked to enter default value.
 But BLOB/TEXT columns can't have a default value and if i will type
 something like 'blabla' then after command "python manage.py
 makemigrations" i will see error. I think it is bug :)

-- 
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/049.bfcec5f47e3f2abb43937da262061015%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.