#13335: Revision 12950 crashes complex interdependent models in directory
---------------------------------------------------+------------------------
          Reporter:  haras                         |         Owner:  nobody
            Status:  new                           |     Milestone:  1.2   
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  1     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by haras):

 I pasted wrong code, this is ok
 but you can see, all my models are importing its own admin module from
 file which is located in ../admin/ directory
 (models are in model dir, admin files in admin dir, views in views dir,
 and so on...)

 crm.contract.admin.document
 {{{
 from django.contrib import admin
 from ..models.document import Document
 import settings



 class DocumentAdmin ( admin.ModelAdmin ):
   class Media():
     #js = ( settings.MEDIA_URL + '/js/crm/contract.js', )
     css = { 'all': ( settings.MEDIA_URL + '/css/crm/contract/admin.css', )
 }

   list_select_related = True
   search_fields = ['name', 'type']
   list_display = ( 'name', 'type', 'sample_view' )
   list_display_links = ( 'name', )

 admin.site.register( Document, DocumentAdmin )
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13335#comment:6>
Django <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 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.

Reply via email to