Re: problem with admin in a .90 site

2009-02-02 Thread Malcolm Tredinnick

On Mon, 2009-02-02 at 14:36 +0530, Kenneth Gonsalves wrote:
> hi,
> I have an old site running on revision 2486 - had not touched it for years 
> and 
> since it wasnt broken nor needed new features, I did not upgrade it. A new 
> model was required, so I added it, but it was not appearing in sqlall 
> statement. The application is called 'web' and under the directory 'web' 
> there are 2 files 'models.py' and 'views.py'. The new model was 
> called 'Affiliation', and the site started barfing saying 'cannot import 
> affiliations'. I then noticed that views.py had a statement:
> 
> from myapp.web.models.web import *
> 
> there is a directory called myapp.web.models, but that only held an 
> __init__.py file which was empty. In those days django required for models in 
> an app called web, to have a directory like
> web/models/web.py and /web/views/web.py. Apparently some years back I had 
> changed this to the current directory structure as web/views.py and 
> web/models.py. But I could not understand how the site was working until I 
> saw on the production server a file called ~/models/web.pyc. The site had 
> been using this all these years which is why my new model was not noticed. I 
> restored the old directory structure - the site load fine now. But - in 
> admin, the only things that show up are are auth and core - no sign of 'web'. 
> Any clues (I know I should not expect people to help out on such old stuff, 
> but if there *are* any oldtimers with long memories ...)

It's possible you've hit a very old bug that is triggered depending upon
import orders and chained imports and the like. The final patch against
ticket #1796 is what fixed it (note that the ticket title is only the
tip of the iceberg; the final patch and resolution is what's important).
You might need to backport the equivalent of r5919 (and possibly some
other patches that I can't remember now, for checking whether the
many-to-many cache in the Options class can be used).

Regards,
Malcolm



--~--~-~--~~~---~--~~
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: problem with admin in a .90 site

2009-02-02 Thread Kenneth Gonsalves

On Monday 02 Feb 2009 2:36:49 pm Kenneth Gonsalves wrote:
> there is a directory called myapp.web.models, but that only held an
> __init__.py file which was empty. In those days django required for models
> in an app called web, to have a directory like
> web/models/web.py and /web/views/web.py. Apparently some years back I had
> changed this to the current directory structure as web/views.py and
> web/models.py. But I could not understand how the site was working until I
> saw on the production server a file called ~/models/web.pyc. The site had
> been using this all these years which is why my new model was not noticed.
> I restored the old directory structure - the site load fine now. But - in
> admin, the only things that show up are are auth and core - no sign of
> 'web'.

i can access the changelists etc by directly entering the url:
/web/admin/web/matches/ for example. But on clicking the 'home' link, the 
screen for web is not shown

-- 
regards
KG
http://lawgon.livejournal.com

--~--~-~--~~~---~--~~
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: problem with admin in a .90 site

2009-02-02 Thread Kenneth Gonsalves

On Monday 02 Feb 2009 3:27:33 pm Daniel Roseman wrote:
> > Any clues (I know I should not expect people to help out on such old
> > stuff, but if there *are* any oldtimers with long memories ...)
> > --
> > regards
> > KGhttp://lawgon.livejournal.com
>
> Was this pre-magic removal? I seem to remember you had to import your
> models from a magic Django namespace, rather than from the actual
> module location. Something like:
> from django.models.web import model1, model2

pre MR, as I said, everything is working - but the models are not appearing in 
the admin. Only 'auth' and 'core' are appearing. I have 4 other old sites 
running on the same django, and admin is working ok there.

-- 
regards
KG
http://lawgon.livejournal.com

--~--~-~--~~~---~--~~
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: problem with admin in a .90 site

2009-02-02 Thread Daniel Roseman

On Feb 2, 9:06 am, Kenneth Gonsalves  wrote:
> hi,
> I have an old site running on revision 2486 - had not touched it for years and
> since it wasnt broken nor needed new features, I did not upgrade it. A new
> model was required, so I added it, but it was not appearing in sqlall
> statement. The application is called 'web' and under the directory 'web'
> there are 2 files 'models.py' and 'views.py'. The new model was
> called 'Affiliation', and the site started barfing saying 'cannot import
> affiliations'. I then noticed that views.py had a statement:
>
> from myapp.web.models.web import *
>
> there is a directory called myapp.web.models, but that only held an
> __init__.py file which was empty. In those days django required for models in
> an app called web, to have a directory like
> web/models/web.py and /web/views/web.py. Apparently some years back I had
> changed this to the current directory structure as web/views.py and
> web/models.py. But I could not understand how the site was working until I
> saw on the production server a file called ~/models/web.pyc. The site had
> been using this all these years which is why my new model was not noticed. I
> restored the old directory structure - the site load fine now. But - in
> admin, the only things that show up are are auth and core - no sign of 'web'.
> Any clues (I know I should not expect people to help out on such old stuff,
> but if there *are* any oldtimers with long memories ...)
> --
> regards
> KGhttp://lawgon.livejournal.com

Was this pre-magic removal? I seem to remember you had to import your
models from a magic Django namespace, rather than from the actual
module location. Something like:
from django.models.web import model1, model2
--
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-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
-~--~~~~--~~--~--~---



problem with admin in a .90 site

2009-02-02 Thread Kenneth Gonsalves

hi,
I have an old site running on revision 2486 - had not touched it for years and 
since it wasnt broken nor needed new features, I did not upgrade it. A new 
model was required, so I added it, but it was not appearing in sqlall 
statement. The application is called 'web' and under the directory 'web' 
there are 2 files 'models.py' and 'views.py'. The new model was 
called 'Affiliation', and the site started barfing saying 'cannot import 
affiliations'. I then noticed that views.py had a statement:

from myapp.web.models.web import *

there is a directory called myapp.web.models, but that only held an 
__init__.py file which was empty. In those days django required for models in 
an app called web, to have a directory like
web/models/web.py and /web/views/web.py. Apparently some years back I had 
changed this to the current directory structure as web/views.py and 
web/models.py. But I could not understand how the site was working until I 
saw on the production server a file called ~/models/web.pyc. The site had 
been using this all these years which is why my new model was not noticed. I 
restored the old directory structure - the site load fine now. But - in 
admin, the only things that show up are are auth and core - no sign of 'web'. 
Any clues (I know I should not expect people to help out on such old stuff, 
but if there *are* any oldtimers with long memories ...)
-- 
regards
KG
http://lawgon.livejournal.com

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---