#3163: [patch] Optionally disable DB table creation from model
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: reopened | Component: Database
wrapper
Version: SVN | Resolution:
Keywords: raw SQL view | Stage: Design
decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 0
------------------------------------------+---------------------------------
Comment (by wolfram):
Replying to [comment:18 honeyman]:
> As my #5858 bug was closed, I am joining the discussion here.
> Idea of dbviews.py rather than models.py is good, but restricts in
importing the views from models. When I tried to remove the custom-created
model for my SQL views from models.py though still imported it from
another model, this model still made it into the output of manage.py.
> Therefore a Meta option seems the best possible solution.
> But create_db_table logic seems insufficient to me - a better solution
should cover all the bases - DROP TABLE in sqldelete, CREATE INDEX/DROP
INDEX, even sqlflush.
> I just regenerated the patch proposed in #5858, and now it includes the
documentation, is based on the trunk Django, and covers hopefully all the
commands (except sqlcustom obviously).
Can you please explain what you mean here? Especially by "but restricts in
importing the views from models"!
Actually using dbviews would never generate a table in the DB, so there is
no need for removing it. Create the views by using the sqlcustom files.
hth
Wolfram
--
Ticket URL: <http://code.djangoproject.com/ticket/3163#comment:19>
Django Code <http://code.djangoproject.com/>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---