Re: problem with auto_now date

2005-09-28 Thread asrenzo
Hi, I'm happy to see that I don't seem to be the only one with this problem : I already posted a similar message a few days ago. http://groups.google.com/group/django-users/browse_thread/thread/1e7cb60de998d3cf

Re: problem with auto_now date

2005-09-28 Thread Kenneth Gonsalves
On Wednesday 28 Sep 2005 1:33 pm, asrenzo wrote: > Hi, > > I'm happy to see that I don't seem to be the only one with this > problem apparently everyone has this problem - there are a couple of tickets open on it. What i dont understand is why it worked for a week and then stopped working -- r

Re: read only/hidden form fields

2005-09-28 Thread [EMAIL PROTECTED]
Found a really tidy way of doing this. Created a new css style based on the Django Wide and Collapse styles calld Hide /* CUSTOM TYPE hide */ .hide label { width:15em !important; } .colM .hide select { visibility: hidden; } fieldset.hide * { display:none; } Then in the model simply grouped tog

Validation of related objects

2005-09-28 Thread [EMAIL PROTECTED]
Hi I looking to do teh following validation on update or add. I have an Module "Question" which has a set of 4 related "Answers" that can be either correct or incorrect (code below) What I want is to be able to check that exactly 4 ansers have been given and that only one of these 4 is listed a

Re: problem with auto_now date

2005-09-28 Thread asrenzo
But I only have this problem with a model involving an ImageField. Other models are working well. Strange ???

Re: Validation of related objects

2005-09-28 Thread Maniac
[EMAIL PROTECTED] wrote: What I want is to be able to check that exactly 4 ansers have been given and that only one of these 4 is listed as being correct Anyone got any ideas on where I might start with this kind of thing. I noticed validator lists for certain fields but wasn't sure that this

Re: problem with auto_now date

2005-09-28 Thread Kenneth Gonsalves
On Wednesday 28 Sep 2005 2:47 pm, asrenzo wrote: > But I only have this problem with a model involving an ImageField. > Other models are working well. > > Strange ??? it only happens where there is an imagefield and an auto_now_add -- regards kg http://www.livejournal.com/users/lawgon tally ho

Re: newbie: unique and ForeignKey

2005-09-28 Thread Andreas
Hey Emanuele, > This last constraint doesnt'work, giving a long > traceback in admin interface. How should I express this > constraint in the proper way? What's wrong? Would you mind posting the traceback? That would certainly help in finding out what's wrong. Andreas

newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
Toy problem: I have a list of persons and a sublist of it are friends. Each list shouldn't have duplicates (it means there is no more than one guy with a given pair , I know it's not a good assumption in general but this is a toy example ;). So I made two models (Person, Friend) the first having t

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
OK. Sorry for missing the error log. Here it is. Actions in admin interface: add a Person, then add it in Friends list. When submitting this last add I get: - There's been an error: Traceback (most recent call last)

Re: newbie: unique and ForeignKey

2005-09-28 Thread Andreas
> Actions in admin interface: > add a Person, then add it in Friends list. Using your model this works for me without any traceback. The reason for the error is probably that the keyword argument 'person__exact' was used instead of 'person__id__exact'. I can't figure out right now why that's the

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
The only things that are different from tutorial steps, in my case, are: 1) python2.4 instead of 2.3 2) I installed django using 'python setup.py install' instead of making a softlink to sources. I'm using postgresql and django's own web server. In any case, thanks for your time. Emanuele

Best way to make your apps translateable

2005-09-28 Thread Dagur
This might not really be a Django question but I was wondering what is the best way to write your apps so they can be easily translated (with as small a performance hit possible of course)

Errors uploading to ImageField on add in django admin

2005-09-28 Thread mortenbagai
Hello, I am trying to use ImageField in one of my models, and I am seeing an issue where I will intermittently get the error listed below when trying to add a _new_ object in the django admin site. However, the image actually does get uploaded correctly to the specified location and the object is

Re: newbie: unique and ForeignKey

2005-09-28 Thread Maniac
Emanuele wrote: The only things that are different from tutorial steps, in my case, are: 1) python2.4 instead of 2.3 2) I installed django using 'python setup.py install' instead of making a softlink to sources. Django is being actively developed every day. So may be this bug was already fi

User permission setting problem

2005-09-28 Thread Qiangning Hong
I setup a polls app following the tutorial and want to do more. I see there are users and groups settings in the admin index page, and so I want add a staff user to manage the polls. However, after I create the user, I found the available permissions list has nothing to do with polls management

Re: "Developers for hire" page

2005-09-28 Thread Joshua D. Drake
Jakub Labath wrote: Hi Joshua,Eugene, Joshua, you are of course right. At the same time when there is someone like me trying to replace existing solutions in place (which are all under IIS and MSSQL). Declaring one day company-wide switch to a different SQL server, different operating system a

Surving Static Files on Django

2005-09-28 Thread Armin
Hey Everyone, So.. I need to host all my non-django-generated files in an external web server? Meaning that if my site requires a css file or an image file, then it shouldn't be bugging django for it? Does that mean I should leave my static html pages in an external page as well? Or use the temp

Re: "Developers for hire" page

2005-09-28 Thread Joshua D. Drake
Eugene Lazutkin wrote: Joshua, 1st thing 1st: I am not a Django developer. I do contribute some code. Personally I don't have Oracle on my desktop but I have WinXP => I have "free" IIS and "free" MSSQL. Whether we like it or not majority of small guys out there are running MS Windows of some

Re: Suggested doc updates

2005-09-28 Thread quentinsf
OK - Some notes added at http://code.djangoproject.com/wiki/DocumentationSuggestions and it's linked from the front page. Hopefully someone will correct any gross foolishness! Quentin

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
** SOLVED ** Thank you very much for your help. Updating (now using softlinks instead of setup.py) solved perfectly my problem. I'm _really_ happy :) Emanuele

Controlling which fields to display when editing an object inline

2005-09-28 Thread mortenbagai
Hello, I have two model objects, Section and Page. Each Page is mapped to a Section through a regular ForeignKey field. On the Section edit detail display in the Django admin app, I'd like to list the Page objects belonging to that Section and having a few fields be editable from there. However,

Re: User permission setting problem

2005-09-28 Thread quentinsf
I think you need to update the permissions database when you update the model using sqlinitialdata. I put something at the bottom of this page: http://code.djangoproject.com/wiki/DocumentationSuggestions which might help? But I'm learning too, so don't take it as too authoritative! Best, Qu

Re: problem with auto_now date

2005-09-28 Thread Adrian Holovaty
On 9/28/05, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > it only happens where there is an imagefield and an auto_now_add Can you paste an example model? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Controlling which fields to display when editing an object inline

2005-09-28 Thread Adrian Holovaty
On 9/28/05, mortenbagai <[EMAIL PROTECTED]> wrote: > However, it seems to me that there is no way to control which fields > are displayed when editing an object inline through its ForeignKey > relation. At first, I thought only fields marked core=True would be > displayed, but that does not seem t

Re: User permission setting problem

2005-09-28 Thread Adrian Holovaty
On 9/28/05, Qiangning Hong <[EMAIL PROTECTED]> wrote: > I setup a polls app following the tutorial and want to do more. I see > there are users and groups settings in the admin index page, and so I > want add a staff user to manage the polls. > > However, after I create the user, I found the avai

Re: Controlling which fields to display when editing an object inline

2005-09-28 Thread Robert Wittams
mortenbagai wrote: > Hello, > > I have two model objects, Section and Page. Each Page is mapped to a > Section through a regular ForeignKey field. On the Section edit detail > display in the Django admin app, I'd like to list the Page objects > belonging to that Section and having a few fields be

Re: Surving Static Files on Django

2005-09-28 Thread Jakub Labath
Hi, 1. No it doesn't have to be external web server. Here is what I do with Apache. SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings.main SetHandler None The SetHandler None w

Re: Surving Static Files on Django

2005-09-28 Thread Jacob Kaplan-Moss
On Sep 28, 2005, at 2:48 PM, Jakub Labath wrote: 1. No it doesn't have to be external web server. However, if you have the resources, it really should be another server -- or at least another instance of Apache running on the same server. Why? In case you hadn't noticed, Django has a pr

Concurrent-request memory footprints (was Surving Static Files on Django)

2005-09-28 Thread Jeremy Dunck
On 9/28/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > ...In case you hadn't noticed, Django has a pretty large memory > footprint; between Apache, mod_python, Python, the database drivers, > etc., Apache server processes tend to weigh about 10M each (at least > on my servers). I hadn't notic

Re: Concurrent-request memory footprints (was Surving Static Files on Django)

2005-09-28 Thread Jacob Kaplan-Moss
On Sep 28, 2005, at 3:38 PM, Jeremy Dunck wrote: On 9/28/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: ...In case you hadn't noticed, Django has a pretty large memory footprint; between Apache, mod_python, Python, the database drivers, etc., Apache server processes tend to weigh about 10M e

Re: Concurrent-request memory footprints (was Surving Static Files on Django)

2005-09-28 Thread Adrian Holovaty
On 9/28/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > I hadn't noticed. Do you just load up your web servers with memory, > or do you (allow Apache to) throttle concurrent requests? In my experience with chicagocrime.org, I've found that the key lies in manipulating the values of StartServers, M

Re: Controlling which fields to display when editing an object inline

2005-09-28 Thread mortenbagai
Adrian, My thought was that anything not marked core=True that could be left blank and/or had a default value, could potentially be excluded from display. So, to answer your question, I was imaging that fields with blank=True would be left blank, and fields with a default value set would get tha

Re: Controlling which fields to display when editing an object inline

2005-09-28 Thread Adrian Holovaty
On 9/28/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > However, the patch I have been making to clean up the admin and > metasystem, on ticket #535, includes a feature that may help. > > Rather than doing edit_inline=meta.TABULAR or meta.STACKED, it is also > possible to do edit_inline="path/to/t

Re: "Developers for hire" page

2005-09-28 Thread Eugene Lazutkin
"Joshua D. Drake" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > There is choice. PostgreSQL runs natively on Windows XP. Apache runs > natively with Windows XP. And that choice is PostgreSQL for databases, and Apache for web sites. I see. Are you trying to configure my comput

Re: Controlling which fields to display when editing an object inline

2005-09-28 Thread Robert Wittams
Adrian Holovaty wrote: > On 9/28/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > >>However, the patch I have been making to clean up the admin and >>metasystem, on ticket #535, includes a feature that may help. >> >>Rather than doing edit_inline=meta.TABULAR or meta.STACKED, it is also >>possible

Re: problem with auto_now date

2005-09-28 Thread Kenneth Gonsalves
On Thursday 29 Sep 2005 12:15 am, Adrian Holovaty wrote: > On 9/28/05, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > it only happens where there is an imagefield and an auto_now_add > > Can you paste an example model? class testit(meta.Model): name = meta.CharField('name',maxlength=10)

Re: "Developers for hire" page

2005-09-28 Thread Kenneth Gonsalves
On Wednesday 28 Sep 2005 9:39 pm, Joshua D. Drake wrote: > As I said, MySQL is a horrible database. I am a PostgreSQL Advocate. > If you need decent database hosting, come over here > (http://www.commandprompt.com). We won't even let you install MySQL. cool -- regards kg http://www.livejournal

Re: "Developers for hire" page

2005-09-28 Thread Kenneth Gonsalves
On Thursday 29 Sep 2005 4:23 am, Eugene Lazutkin wrote: > PS: I never understood what "runs natively" means. "PostgreSQL runs > natively on Windows XP. Apache runs natively with Windows XP." Is > there any other way? Either it runs or it doesn't as opposed to the previous version of postgres that

Re: "Developers for hire" page

2005-09-28 Thread Eugene Lazutkin
What's wrong with cygwin? I was half-expecting virtual machines and stuff. :-) Thanks, Eugene "Kenneth Gonsalves" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Thursday 29 Sep 2005 4:23 am, Eugene Lazutkin wrote: > PS: I never understood what "runs natively" means. "Postgre

Re: "Developers for hire" page

2005-09-28 Thread Joshua D. Drake
The moment I started to use such toolkit, I have choices to move my stuff to different database/webserver without major disruptions. As soon as I start to use intricate features of specific database I limit my database choices to that database. If your stuff really requires some specific feat

Re: "Developers for hire" page

2005-09-28 Thread Joshua D. Drake
Eugene Lazutkin wrote: What's wrong with cygwin? I was half-expecting virtual machines and stuff. :-) Nothing is "wrong" with it but you take a pretty significant performance hit by using it. Especially with a database (because of IO). Thanks, Eugene "Kenneth Gonsalves" <[EMAIL PROT