Re: ORM funkiness when doing Many2Many to intermediary table with the same source table twice

2005-10-20 Thread Luke Plant
antrod, > If I've got a Many2Many relationship implemented via an intermediary > table (a la > http://www.djangoproject.com/documentation/models/m2m_intermediary/) > but in the intermediary table I point back to the same table twice, > does django's ORM not support this? > > Example: table Node

import error

2005-10-20 Thread stava
I'm trying to import a simple utils.py from the toplevel of my application, i.e. from ttime.utils import * All I get from djangoadmin.py runserver is: "ImportError: No module named utils". The utils.py is there, but the django server can't seem to find it, I suspect this is a true newbie questi

Re: Pb with Backwards-incompatible admin changes

2005-10-20 Thread Adrian Holovaty
On 10/20/05, Laurent RAHUEL <[EMAIL PROTECTED]> wrote: > THX, it was the problem. I guess this should be added to the documentation. I've updated the docs at http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges . Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocri

Re: Pb with Backwards-incompatible admin changes

2005-10-20 Thread Laurent RAHUEL
Le Jeudi 20 Octobre 2005 17:44, Andreas Stuhlmüller a écrit : > Hi Laurent, > > > Error: The database couldn't be initialized. > > 'module' object has no attribute 'INSTALLED_APPS' > > Deleting your project/settings directory might help. At least it helped > when I got this error :). > > Andreas

Re: Pb with Backwards-incompatible admin changes

2005-10-20 Thread Andreas Stuhlmüller
Hi Laurent, > Error: The database couldn't be initialized. > 'module' object has no attribute 'INSTALLED_APPS' Deleting your project/settings directory might help. At least it helped when I got this error :). Andreas

Pb with Backwards-incompatible admin changes

2005-10-20 Thread Laurent RAHUEL
Hi, I'm trying to move my code after those changes and I can't get python django-admin.py init working. I get this error and I can't figure out why : Error: The database couldn't be initialized. 'module' object has no attribute 'INSTALLED_APPS' I got a good PYTHONPATH and a good DJANGO_SETTIN

Error in myapp

2005-10-20 Thread Grigory Fateyev
Hello! Wrote polls app from tutorial and it was worked, then write articles app and see this error: File "/home/greg/www/django_src/django/core/urlresolvers.py", line 77, in _get_urlconf_moduleself._urlconf_module = __import__(self.urlconf_name, '', '', ['']) ImportError: No module named

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
On 10/20/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > Should I add this to the wiki page? Feel free. But, please don't use @decorator syntax, it's not 2.3-safe. /s

ORM funkiness when doing Many2Many to intermediary table with the same source table twice

2005-10-20 Thread antrod
If I've got a Many2Many relationship implemented via an intermediary table (a la http://www.djangoproject.com/documentation/models/m2m_intermediary/) but in the intermediary table I point back to the same table twice, does django's ORM not support this? Example: table Node, intermediary table Rel

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
On 10/20/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > * All app templates assume there's a "base_generic" template and {% > extend %} it. > * All app templates assume the is in {% title %}. > * All app templates assume there's a {% block extrahead %} within the > . This is a hook for putting

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
On 10/20/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > I had this same question: What's a mnemosyne? We should change it to "myapp". Mnemosyne is the greek goddess of memory, I pulled it out of the hat, because I think myapp is so boring and impersonal. But, feel free to change it. /s

Re: Error in DateFormat

2005-10-20 Thread Grigory Fateyev
Hello Adrian Holovaty! On Thu, 20 Oct 2005 08:46:47 -0500 you wrote: > Fixed as of revision 976. > > Adrian Thanks, very much! -- Всего наилучшего! greg [at] anastasia [dot] ru Григорий.

Re: Error in DateFormat

2005-10-20 Thread Adrian Holovaty
On 10/20/05, Grigory Fateyev <[EMAIL PROTECTED]> wrote: > Install blogs app from django_website, and when whant to see comment of > blog entrie see this error: > > File "/home/greg/www/django_src/django/utils/dateformat.py", line 26, > in formatpieces.append(str(getattr(self, piece)())) > >

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Adrian Holovaty
On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: > Seeing it in writing got me wondering though if the whole idea of > application templates "extending" the base site is wrong-headed. > Because the application knows nothing about the site it is to be > embedded in, the application writer is second-gues

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Adrian Holovaty
On 10/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > great start. just two comments. why use mnemosyne as the example? why > not something more generic like "myapp" ? I had this same question: What's a mnemosyne? We should change it to "myapp". Adrian -- Adrian Holovaty holovaty.com | dj

Error in DateFormat

2005-10-20 Thread Grigory Fateyev
Hello! Install blogs app from django_website, and when whant to see comment of blog entrie see this error: File "/home/greg/www/django_src/django/utils/dateformat.py", line 26, in formatpieces.append(str(getattr(self, piece)())) AttributeError: DateFormat instance has no attribute 'P' --

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Robert Wittams
kmh wrote: >>On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: >> >>>Shouldn't we encourage a model where site templates are able to >>>explicitly "include" application templates, rather than the other way >>>around? > > >>On 10/20/05, Sune Kirkeby <[EMAIL PROTECTED]> wrote: >>That's not how applicati

Re: site url

2005-10-20 Thread Kenneth Gonsalves
On Thursday 20 Oct 2005 4:56 pm, Andy Shaw wrote: > > {{ site_url }}/css/layout.css. > > how do i do this? > > Um... I don't know the actual answer to your question off the bat, > but you can use an absolute URI that doesn't contain the site name: thing is that i have one copy of the app on my lo

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: > >On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: > >> Shouldn't we encourage a model where site templates are able to > >> explicitly "include" application templates, rather than the other way > >> around? > > >On 10/20/05, Sune Kirkeby <[EMAIL PROTECTED]>

Re: Do's and Dont's for Application Writers

2005-10-20 Thread kmh
>On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: >> Shouldn't we encourage a model where site templates are able to >> explicitly "include" application templates, rather than the other way >> around? >On 10/20/05, Sune Kirkeby <[EMAIL PROTECTED]> wrote: >That's not how applications and templates work

Re: site url

2005-10-20 Thread Andy Shaw
Kenneth Gonsalves wrote: hi, i know it must be somewhere, but cant find it. How do you refer to the site url in a template? Say my css file is in http://mysite.com/css/layout.css, to make this portable i would have to make the template as: {{ site_url }}/css/layout.css. how do i do this?

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
On 10/20/05, kmh <[EMAIL PROTECTED]> wrote: > Shouldn't we encourage a model where site templates are able to > explicitly "include" application templates, rather than the other way > around? That's not how applications and templates work. You can't just include a template from another applicatio

Re: Do's and Dont's for Application Writers

2005-10-20 Thread [EMAIL PROTECTED]
Hey, great start. just two comments. why use mnemosyne as the example? why not something more generic like "myapp" ? for the media directory, mnemosyne/media/ should be sufficient.

Re: Tag library not found

2005-10-20 Thread tomass
Works a treat, thanks! Wonder if you've had a chance to take a look at this: http://code.djangoproject.com/ticket/480#preview Still seems to be bothering me... Thanks, Tom

Re: Do's and Dont's for Application Writers

2005-10-20 Thread kmh
Hi Sune, Thanks for getting this thread going. Your outline is pretty close to the way I've been doing things too. Seeing it in writing got me wondering though if the whole idea of application templates "extending" the base site is wrong-headed. Because the application knows nothing about the s

site url

2005-10-20 Thread Kenneth Gonsalves
hi, i know it must be somewhere, but cant find it. How do you refer to the site url in a template? Say my css file is in http://mysite.com/css/layout.css, to make this portable i would have to make the template as: {{ site_url }}/css/layout.css. how do i do this? -- regards kg http://www.li

Do's and Dont's for Application Writers

2005-10-20 Thread Sune Kirkeby
Hullo. Here is a rough draft of "Do's and Dont's for Application Writers": http://code.djangoproject.com/wiki/DosAndDontsForApplicationWriters I'd be much interested in comments, suggestions and anything people disagree with, but can we keep feedback on the list? Wikis have horrible threading ;)

Re: dynamic choices

2005-10-20 Thread stava
stava wrote: > I'm having a bit of a problem with dynamic choices. I'm working on a > simple timesheet system where I've extended the auth.users with a > couple of fields including something I call "primary group": > > def getUsers(group = None): > users = [] > if group is None: > for u i