Re: making slug field unique

2006-01-17 Thread Kenneth Gonsalves
On Tuesday 17 Jan 2006 9:04 pm, Bryan Murdock wrote: > OK, so as a database dummy, how exactly is this done?  Do I pipe > the output of 'manage.py sqlreset myapp' to psql, or is there a > less drastic way since I know I've only changed this one thing? >  I don't have any real data in the database

Re: Dreamhost - problem with Django installation

2006-01-17 Thread Kenneth Gonsalves
On Wednesday 18 Jan 2006 12:06 pm, Jeroen Ruigrok van der Werven wrote: > > On my local machine, firefox misbihaves when favicon is > > missing, yielding error 500. > > That's odd, since that would/should never yield a 500 but a 404, > since the favicon is just another URL request. must be 500

Re: Dreamhost - problem with Django installation

2006-01-17 Thread Jeroen Ruigrok van der Werven
On 1/17/06, iGL <[EMAIL PROTECTED]> wrote: > On my local machine, firefox misbihaves when favicon is missing, > yielding error 500. That's odd, since that would/should never yield a 500 but a 404, since the favicon is just another URL request. You sure the 500 is not the CGI interface going

Re: Exciting job opportunities at Exoweb in Beijing / China

2006-01-17 Thread Albert Lee
哦, 要去国外招人,good。2006/1/18, Dominic <[EMAIL PROTECTED]>: Ni hao" everyone,Do you fancy getting in the fast lane and putting your talents to usein modern Beijing, rapidly becoming a high-tech hub? Are you lured byChina's exotics, its breathtaking cultural heritage, its exquisite (and sometimes

assign or rename a variable in templates

2006-01-17 Thread Bryan Murdock
Is it possible to somehow rename or assign one variable to another in a template? All the generic views provide an object_list, except archive_index which provides latest. I'm trying to write a generic template that loops through the object_list (or latest) for all the date-based generic views,

Re: Managing static media urls

2006-01-17 Thread [EMAIL PROTECTED]
I think there are a few ways of doing this in previous messages, but here's what has worked for me, using a custom context processor. In settings, I add whatever custom variables I want, including this: APP_BASE = "http://www.example.com/; I have an app called home, and in the views.py I put

Re: extra context processors

2006-01-17 Thread Luke Plant
On Tue, 17 Jan 2006 14:02:24 - Alice wrote: > Where would I put extra processors? in /myproject/processors.py ? > Processors are global and not an app specific one ... so where are > others putting theirs? Just after a bit of django etiquette... They are pretty new, so you can be the trend

Re: validators 9.1

2006-01-17 Thread Adrian Holovaty
On 1/17/06, David S. <[EMAIL PROTECTED]> wrote: > I have some custom validation I want only on adding a record, not changing it. > Is there a way to qualify my _manipulator_validate_FOO() method or to find out > from within it if it is an add or change? I know I can create a custom > manipulator

Re: validators 9.1

2006-01-17 Thread Matthew Flanagan
On 1/18/06, David S. <[EMAIL PROTECTED]> wrote: > > I have some custom validation I want only on adding a record, not changing it. > Is there a way to qualify my _manipulator_validate_FOO() method or to find out > from within it if it is an add or change? I know I can create a custom >

validators 9.1

2006-01-17 Thread David S .
I have some custom validation I want only on adding a record, not changing it. Is there a way to qualify my _manipulator_validate_FOO() method or to find out from within it if it is an add or change? I know I can create a custom manipulator to use from my own views, but I would like the admin

Re: Dreamhost - problem with Django installation

2006-01-17 Thread iGL
On my local machine, firefox misbihaves when favicon is missing, yielding error 500.

One-To-One problem in 0.91?

2006-01-17 Thread gattomatto
I'm in a hurry, and I'll have to double check tomorrow, but.. It seems to me that release 0.91 broke somewhat OneToOne relations. The example (Places and Restaurants), in the model examples documentation, doesn't run anymore (place object does not have a get_restaurant method). Admin interfaces

Re: Dreamhost - problem with Django installation

2006-01-17 Thread PythonistL
"Unfortunately", I use IE.So it is not my problem. Is it nescessary to have some standard files in the directory, e.g. robots.txt ? I read that the missing file can cause 500 internal server error.Is it true? rgds, L.

Re: Managing static media urls

2006-01-17 Thread Afternoon
I'd like to have a solution to this problem too. My specific problem is that I have a bunch of sites in development on my laptop: http://localhost/coolsite/ http://localhost/boringsite/ http://localhost/newhomepage/ And these then get deployed to production

Re: passing additional parameters to a view

2006-01-17 Thread James Bennett
On 1/17/06, scum <[EMAIL PROTECTED]> wrote: > Method 1 works with keywords that want lists. For example.. the order > by clause works in method 1 but not in method 2. (?order_by=city) > > Method 2 works with keywords that do not require a list. For example, > the limit and offset keywords work

Re: passing additional parameters to a view

2006-01-17 Thread patrick kranzlmüller
since my server is down again, i can´t verify the code. anyway, thanks everybody for your help. patrick Am 17.01.2006 um 16:19 schrieb Adrian Holovaty: On 1/17/06, scum <[EMAIL PROTECTED]> wrote: Okay- that is a lot trickier. Here's some yucky code that uses the exec command to

Re: passing additional parameters to a view

2006-01-17 Thread patrick kranzlmüller
hmm, i thought this is quite easy as it´s already used in the admin-interface (with filters). thanks for the code, patrick Am 17.01.2006 um 16:14 schrieb scum: Okay- that is a lot trickier. Here's some yucky code that uses the exec command to accomplish the same goal... but it's

Re: passing additional parameters to a view

2006-01-17 Thread scum
What error are you getting when you try "milestones.get_list(**request.GET)"?

Re: passing additional parameters to a view

2006-01-17 Thread scum
Okay- that is a lot trickier. Here's some yucky code that uses the exec command to accomplish the same goal... but it's definitely not the elegant solution you are looking for... q = [] for key, value in request.GET.items(): q.append ( "%s = %s" % (key, value) )

Re: passing additional parameters to a view

2006-01-17 Thread Andreas Stuhlmüller
On 1/17/06, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: > actually, i don´t really know my query parameters. > could be responsible__id__exact=5 > or status__exact=1 > or responsible__id__exact=5__exact=5 > ... and so on. > > so, it´d be nice to have something like milestones_list = >

Re: passing additional parameters to a view

2006-01-17 Thread patrick kranzlmüller
thanks for answering. actually, i don´t really know my query parameters. could be responsible__id__exact=5 or status__exact=1 or responsible__id__exact=5__exact=5 ... and so on. so, it´d be nice to have something like milestones_list = milestones.get_list(x), where x is the query. thanks,

Re: passing additional parameters to a view

2006-01-17 Thread scum
All get variables are automagically placed into the request.GET dictionary. In your example: http://mysite.com/manage/projects/1/milestones/?responsible__id__exact=1 Your variable `responsible__id__exact` would be obtained through the code: myVar = request.GET["responsible__id__exact"] or myVar

extra context processors

2006-01-17 Thread Alice
Where would I put extra processors? in /myproject/processors.py ? Processors are global and not an app specific one ... so where are others putting theirs? Just after a bit of django etiquette... Alice

passing additional parameters to a view

2006-01-17 Thread patrick kranzlmüller
my url looks like: http://mysite.com/manage/projects/1/milestones/?responsible__id__exact=1 in the user-group, i found a posting where adrian said: "The query parameters are, essentially, the same as keyword arguments that can be passed to get_list(). " can anybody give me a hint on how to

Re: Dreamhost - problem with Django installation

2006-01-17 Thread [EMAIL PROTECTED]
>So, it seems, from command line, working.But not from browser I wasted an hour last week setting up cgi with lighttpd, not getting 'hello world' to appear. It was a Firefox thing- it showed up OK in IE, but Firefox wouldn't show it without the response being properly formed. Derek

Re: Dreamhost - problem with Django installation

2006-01-17 Thread iGL
and with 'hello.fcgi', did you pkill python before your tests?

Re: Bulk delete?

2006-01-17 Thread Russell Keith-Magee
Ok; in the absence of any objections, I've just committed the change, and closed off the ticket. Bulk delete is now available in magic-removal. Russ Magee %-)

Re: making slug field unique

2006-01-17 Thread Kenneth Gonsalves
On Tuesday 17 Jan 2006 3:53 pm, Jordi Funollet wrote: > >  Afaik Django enforces uniqueness at the application level, but > > you could always add it to the database: > > Ouch. Really? So Django is assuming that we are going to work > with their database *exclusively* through Django, and doesn't

Re: making slug field unique

2006-01-17 Thread James Bennett
On 1/17/06, Jordi Funollet <[EMAIL PROTECTED]> wrote: > This restriction should be on database, shouldn't it? I'd think this would run into compatibility problems with the various supported backends. For example, SQLite supports UNIQUE, but not FOREIGN KEY constraints (its official docs say that

Re: making slug field unique

2006-01-17 Thread Jordi Funollet
Julio Nobrega dixit: > Afaik Django enforces uniqueness at the application level, but you > could always add it to the database: Ouch. Really? So Django is assuming that we are going to work with their database *exclusively* through Django, and doesn't protect us from doing silly things to the

Re: Do I use @login_required to extend authentication?

2006-01-17 Thread Amit Upadhyay
On 1/17/06, tonemcd <[EMAIL PROTECTED]> wrote: Seriously, this is a major thing for any kind of migration we have inmind from Zope -> Django, so any thoughts on how to do this would begreatly appreciated.Hi,In my personal experience, django authentication framework is very thin, and you can bypass

Re: blog archive links

2006-01-17 Thread John Szakmeister
On Tuesday 17 January 2006 01:04, Bryan Murdock wrote: > I'm building myself a little blog with the django blog app that is > found in the djangoproject.com code. I like the archive links (seen > on the right-hand side of http://www.djangoproject.com/weblog/). > However, I'd like those links

Re: Dreamhost - problem with Django installation

2006-01-17 Thread PythonistL
So I did: 1.I went to DreamHost Control Panel (Domains / Manage Domains) and enabled fast_CGI.(Now FastCGI Support box is checked there) 2.I copied fcgi.py and hello.fcgi file to my Web Directory(egsmtrade.com) 3. I added to fcgi.py and hello.fcgi the first line #!/usr/bin/python 4. I set 755