* cc: luiz.vital@… (added)
* ui_ux: => 0
* easy: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: luiz.vital@… (removed)
Comment:
I have a simple use case for this:
I'm using GeoDjango and I need to INSERT custom projections to the
`spatial_ref_sys` postgis table before any geometry field is created,
because they will use the custom SRID.
This signal would be handy, specially when creating test databases.
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:9>
* cc: luiz.vital@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:10>
Comment (by v.z.afzal@…):
Will this be integrated into the next Major release?
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:11>
Comment (by v.z.afzal@…):
Note: If you want to apply this patch on Windows, you may need to resave
the patch file in MS-DOS compatible mode.
- Open with wordpad
- Select File->Save As
- Give it a name and select the format as: Text Document - MS-DOS format
It should work after making this change
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:12>
* stage: Design decision needed => Accepted
Comment:
While I'm violently against signals in general, this one doesn't look too
dangerous.
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:15>
Comment (by stvsmth):
I see that this has a patch, tests and documentation and that it was
recently accepted.
It does seem to have an old version attribute (1.1.beta).
Is there anything I can do to assist with this ticket? We us a similar
custom patch and I would like to get out of the business of patching
Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:16>
* cc: stvsmth (added)
* version: 1.1-beta =>
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:17>
* cc: donald@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:18>
Comment (by akaariai):
I think we don't want to send pre_syncdb from flush. I know post_syncdb is
sent from flush, but that seems wrong, and it makes post_syncdb harder
than necessary to use for schema changes. I am not even sure what one
could do in pre_syncdb signal sent from flush. Creating data doesn't work,
it is going to be flushed anyway, doing schema changes in pre_syncdb seems
wrong, too. Maybe creating data for unmanaged models, but then those
aren't ever flushed...
Could we at least add a kwarg "flush=True/False" to the signal, even if it
is a bit silly to get a post_syncdb signal from flush?
I would prefer to add post_flush signal and stop sending post_syncdb from
flush, but doing that is a direct break of the backwards compatibility
rules... Ideas how to do that in backwards-compat way?
Otherwise the patch looks sane (patch not reviewed, just skimmed...). I am
referring to: https://github.com/dstufft/django/compare/pre-syncdb-signal
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:19>
Comment (by dstufft):
It's sent there to be consistent with post_syncdb.
I would however be agreeable to not doing pre_syncdb there. As far as
post_syncdb goes that's another issue that you should probably open up a
ticket for so a new signal can be added and flush triggering post_syncdb
can be deprecated.
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:20>
Comment (by akaariai):
I think it is a good idea to not send pre_syncdb from flush. I just don't
see any use for that.
In addition, in separate ticket lets add a "flush" argument to post_syncdb
so that one can distinguish between flush and syncdb in the signal. This
is somewhat ugly, but I don't feel like tackling the backwards
compatibility problems. Anyways, this is another ticket's problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:21>
Comment (by Donald Stufft <donald@…>):
In [changeset:"8133ee6cb4c3e9fee613ee772197dc77cdc78cd1"]:
{{{
#!CommitTicketReference repository=""
revision="8133ee6cb4c3e9fee613ee772197dc77cdc78cd1"
Merge pull request #1200 from dstufft/pre-syncdb-signal
Fixed #11398 - Added a pre_syncdb signal
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:23>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"3de1288042f2dc1cb8a2b36ae0fc4d9e0beb6494"]:
{{{
#!CommitTicketReference repository=""
revision="3de1288042f2dc1cb8a2b36ae0fc4d9e0beb6494"
Fixed #11398 - Added a pre_syncdb signal
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/11398#comment:22>