Re: Is there any way of model cross reference placed in different files but in one app?

2009-11-26 Thread Denis Cheremisov
Oh, thanks, that works!

On 26 ноя, 13:03, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Nov 26, 10:01 am, Denis Cheremisov <denis.cheremi...@gmail.com>
> wrote:
>
> > I have models directory with several files in it (models/__init__.py,
> > models/main.py, ...)
> > I have basic "Article" model and many models derived from it. So, I
> > would like to place them into separate file: models/article.py
> > But I also have several models ("Image" and "Section") which contain
> > ForeignKey(Article,...) and, on the  other hand, Article also has
> > ForeingKey on them. I tried to use ".models.main.Image" and
> > ".models.main.Section" as model name, but it didnt' work.
> > Is there any way to place Article and Article-based models into
> > separate file
>
> As long as your __init__.py is importing all the models from the
> various files, you can just refer to them as appname.Image,
> appname.Section etc.
> --
> DR.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Is there any way of model cross reference placed in different files but in one app?

2009-11-26 Thread Denis Cheremisov
I have models directory with several files in it (models/__init__.py,
models/main.py, ...)
I have basic "Article" model and many models derived from it. So, I
would like to place them into separate file: models/article.py
But I also have several models ("Image" and "Section") which contain
ForeignKey(Article,...) and, on the  other hand, Article also has
ForeingKey on them. I tried to use ".models.main.Image" and
".models.main.Section" as model name, but it didnt' work.
Is there any way to place Article and Article-based models into
separate file

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Django documentation site is SLOW

2009-08-09 Thread Denis Cheremisov

I thinkg it's firefox issue - with google chromium, midori or opera
it's felt much faster.

On Aug 7, 3:46 pm, Jo  wrote:
> Surely can't only be me that finds the main Django site painfully
> slow? There is some javascript in there or something that just kills
> my browser.
>
> I'm using Firefox on Linux, on 1.5gig P4, OK not state of the art but
> it's fine for pretty much any other website, but when I try to look
> something up on the Django website, firefox jumps to 80% CPU and takes
> 10s of seconds to render each page, and even when the page is rendered
> the browser is so sluggish as to be almost unusable.
>
> Django might speed up development, but what it gives it takes away in
> time sitting waiting for the damn docs to load!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Place two or more inputs per line in django admin.

2009-06-08 Thread Denis Cheremisov

Solved it, replace get_fieldsets with my custom function, returning:

[(None,
  {'fields': [('field1','field2),]})]

On Jun 5, 5:23 pm, Denis Cheremisov <denis.cheremi...@gmail.com>
wrote:
> I saw the method using fieldsets, by grouping several fields in a
> tuple. But this method didn't suit my needs, because I use slightly
> modified add_view,change_view,get_form, etc, where the base model/form
> can be substituted by it's derivative. So, I don't know what fields to
> show exactly, but know which fields I want to show in one line.
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Place two or more inputs per line in django admin.

2009-06-05 Thread Denis Cheremisov

I saw the method using fieldsets, by grouping several fields in a
tuple. But this method didn't suit my needs, because I use slightly
modified add_view,change_view,get_form, etc, where the base model/form
can be substituted by it's derivative. So, I don't know what fields to
show exactly, but know which fields I want to show in one line.
Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---