Managing static media urls

2006-01-13 Thread Greg
Andy Shaw posed an interesting question in the topic "CSS and PNG files in templates" (in this discussion group)... what kind of URL do you put in a template when you want to refer to a static file? If you use URLs that encode too much information (like a hostname or an absolute path), then it bec

Re: Bulk delete?

2006-01-13 Thread Kenneth Gonsalves
On Saturday 14 Jan 2006 1:11 am, Jacob Kaplan-Moss wrote: > > Have I overlooked something? > > Nope - *we've* overlooked something; this totally should be   > possible.  I've opened a ticket so we can keep track of this > (http:// code.djangoproject.com/ticket/1219). and, while on this note, chec

Re: ANN: "Snakes and Rubies" (Django/Rails meetup) video/audio available

2006-01-13 Thread Eugene Lazutkin
After 5 days some files went live several minutes ago: snakesandrubies-01-django.mp4 --- http://video.google.com/videoplay?docid=-3548805983075267875 snakesandrubies-02-rails.mp4 --- http://video.google.com/videoplay?docid=1149552518153462279 snakesandrubies-03-qa.mp4 --- http://video.goo

Re: Dreamhost - problem with Django installation

2006-01-13 Thread Eugene Lazutkin
PythonistL wrote: Patrick, but if the error happens twice a day, as you say, that is very, very bad having hosting with Dreamhost. Or I am wrong? http://status.dreamhost.com/ They had connection problems for 3 days in a row. If you want to host your mission critical app, look for other hosts

Re: How are default values for fields used

2006-01-13 Thread akaihola
Jeff's right, I want to edit all fields in the full edit form, and use the defaults only in a quick add form. I generalized the code I showed above to a fill_missing_fields function. Now the only remaining problem I see is that it has to be called before validation and html2python. It would be ne

Re: Dreamhost - problem with Django installation

2006-01-13 Thread patrick k
> Patrick, but if the error happens twice a day, as you say, that is > very, very bad having hosting with Dreamhost. right now, i don´t suggest hosting with dreamhost. maybe it´s only a temporary problem, maybe it´s only "my" server (who knows). but not being able to work at least twice a day is

Re: custom form, validation, is there an easier way?

2006-01-13 Thread Daniel Ericsson
On 13 jan 2006, at 13.15, Gábor Farkas wrote: 2. forms/manipulators: again, there are auto-created manipulators for database-models, but for my needs there is need for a custom one. yes, i can create a custom validator, but is that simpler than to simply do all the validating by myself?

Re: Bulk delete?

2006-01-13 Thread Jacob Kaplan-Moss
On Jan 13, 2006, at 1:12 PM, Ned Batchelder wrote: I'm used to writing SQL statements like: delete from app_things where type = 'foo'; to delete a number of objects at once. I don't see a way to do this type of delete in Django. I was hoping for something like: things.delete(type__exac

Bulk delete?

2006-01-13 Thread Ned Batchelder
I'm used to writing SQL statements like: delete from app_things where type = 'foo'; to delete a number of objects at once. I don't see a way to do this type of delete in Django. I was hoping for something like: things.delete(type__exact='foo') Certainly I could do this: for t in thi

Re: Dreamhost - problem with Django installation

2006-01-13 Thread PythonistL
Patrick, but if the error happens twice a day, as you say, that is very, very bad having hosting with Dreamhost. Or I am wrong? The wiky says: To view the admin site, go to http://django.mydomain.com/django.fcgi/admin/ To view the normal site, go to http://django.mydomain.com/django.fcgi/ Should

foreign (not legacy) database and many-to-many

2006-01-13 Thread Dmitry Sorokin
Hello, I have used legacy database docs to use django with database produced by gnuenterprise http://www.gnuenterprise.org application server. As gnue-appserver requires to use gnue_id field as primary key (32-char long UUID) I then manually modified the model to something like this: from d

foreign (not legacy) database and many-to-many

2006-01-13 Thread Dmitry Sorokin
Hello, I have used legacy database docs to use django with database produced for gnuenterprise http://www.gnuenterprise.org application server.

Re: Dreamhost - problem with Django installation

2006-01-13 Thread patrick kranzlmüller
i also have the error (in error.log) you mentioned when dreamhost has problem with my server - which happens very often lately (about twice a day). besides that, i followed the steps in the wiki and everything works fine. patrick Am 13.01.2006 um 17:00 schrieb PythonistL: I am trying to

Re: Django, mod_python error

2006-01-13 Thread Eric Walstad
On Wednesday 11 January 2006 14:53, [EMAIL PROTECTED] wrote: > ImproperlyConfigured: Error importing middleware > django.middleware.sessions: "No module named resumes" Let's see your settings.py file, particularly the MIDDLEWARE_CLASSES part.

Dreamhost - problem with Django installation

2006-01-13 Thread PythonistL
I am trying to setup Django on Dreamhost. I followed the instructions at http://wiki.dreamhost.com/index.php/Django but no success. I tried the Troubleshooting described there and the script # #!/usr/bin/python2.3 from fcgi import WSGIServer def test_app(environ, start_response):

Re: How are default values for fields used

2006-01-13 Thread Jeffrey E. Forcier
On Jan 13, 2006, at 5:11 AM, Maniac wrote: You also can make a default manipulator not complain about those fields being absent on validation. Give them "editable=False" in the model. Then manipulator will omit them. Assuming this is still the same issue aikihola brought up on IRC yeste

custom form, validation, is there an easier way?

2006-01-13 Thread Gábor Farkas
hi, i am implementing a VERY simple usermanagement screen for the admin view. functionality: create new user, change existing user, delete user. for an user, the following data is "available": username, password, groups. so when they create/change an user, they can change the username, the

Re: How are default values for fields used

2006-01-13 Thread Maniac
akaihola wrote: Actually, the manipulator doesn't even know about the default values of the model. Why that? If you just create AddManipulator and get its flatten_data you'll get default values of the model. Your example is based on hidden fields with default values. However, I've unders

Re: How are default values for fields used

2006-01-13 Thread akaihola
Maniac wrote: >What happens is that a manipulator checks the values that come from the web, >and not the default ones inside it. Actually, the manipulator doesn't even know about the default values of the model. Your example is based on hidden fields with default values. However, I've understoo