jjcjgxydhfxydzh
On Wed, Jun 27, 2012 at 12:54 AM, Alireza Savand
wrote:
> Hi
> Common way to create [model|admin] classes is implement and create them in
> [models|admin].py file.
> But as standard non-django way is to create a python package named admin
> for
Yes, But when my models.py/admin.py reach to +2000 line then django
standard way not gonna help. That's why i seperate the classes into files
and pkgs.
I'm wonder is there any performance issue on this approach, since each
class is in separate file, when i import them i'm sure python should find
On Wednesday, 27 June 2012 08:54:07 UTC+1, Alireza Savand wrote:
>
> Hi
> Common way to create [model|admin] classes is implement and create them in
> [models|admin].py file.
> But as standard non-django way is to create a python package named admin
> for AdminClass es and create a file for
As your approach, at admin/__init__.py i have to
from myapp.admin.ouradmin import *
That means import all of the classes inside that files.
On Wed, Jun 27, 2012 at 2:54 PM, Matt Schinckel wrote:
> I generally register admin models where I define them, and then just
>
I generally register admin models where I define them, and then just import
that
file in admin/__init__.py
If you are getting multiple registration errors, it may be that your app
appears
twice in sys.path (perhaps as app, and project.app?).
That's generally a Bad Thing(tm).
Matt.
--
You
Hi
Common way to create [model|admin] classes is implement and create them in
[models|admin].py file.
But as standard non-django way is to create a python package named admin
for AdminClass es and create a file for each admin class.
But i couldn't find any standard way to register those admin
6 matches
Mail list logo