#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 honeyman):

 And surely this is not the only use case for this feature (when the
 separating of SQLview-based models to a different "namespace" lacks
 convenience).
 Even more useful would be the capability to have several models in the
 same Python file, some of the models requiring the SQL regeneration and
 some of them not requiring.
 Example: we have a Django model Order (generating the table dbOrder). We
 could have manually created SQL views like vwOrder_InProcess,
 vwOrder_PartnershipProgram, vwOrder_AttentionRequired, and reengineer the
 appropriate Django models for them. Having a capability to mark the view-
 based models as "sql_generation_required = False", we could have put the
 definitions of all these "special order models" into the same Python file:
 {{{
 class Order(models.Model):
   ...
 class Order_InProcess(models.Model):
   class Meta:
     sql_generation_required = False
   ...
 }}}

 All these classes could easily share the code, interact - and this is less
 convenient if class Order and class Order_InProcess are defined in
 separate files.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3163#comment:24>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to