Re: mod_python error when debug=False

2009-02-27 Thread Karen Tracey
On Fri, Feb 27, 2009 at 11:46 AM, Michael Repucci wrote: > > I've been trying to put my site up live, and keep coming across an > error (on any page on the site) whenever I set debug=False in > settings.py. With the development server, or with debug=True on the > production

Re: django.contrib.admindocs

2009-02-27 Thread daniellabeau
it would appear that re-starting the dev server does the trick for this issue. Sorry for the wasted post :) -dls On Feb 27, 9:22 pm, goblue0311 wrote: > All: > > I'm trying to get the documentation portion of the admin up and > running. I've installed the

django.contrib.admindocs

2009-02-27 Thread goblue0311
All: I'm trying to get the documentation portion of the admin up and running. I've installed the django.contrib.admindocs application, but when I visit the admin/docs/ url I end up getting a message about installing docutils. It would appear that admindocs is running, it's just irritated about

Re: Found (and fixed?) a bug in ManyToManyField class

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 12:24 -0800, Joshua Russo wrote: > Think I found a bug in the ManyRelatedManager that occurs when you try > to include a ManyToManyField relation in an admin edit page. I > personally tried to have the relational table/module as an inline > display of primary entity module.

FileField - Forms - upload to not available

2009-02-27 Thread tom
Hi, I am somehow confused. I am using this in a model: file = models.FileField(upload_to="tmp/tracks/", max_length = 1000) and than I am doing this in a form: new_track = form.save(commit = False) after that I want to access the file to do some stuff with it, like print new_track.file.path

Re: Problem routing to certain i18n locales/languages

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 13:15 -0800, Scott wrote: > Hello, > > I'm working on an App Engine (using the Django helper) application > that is to be presented in a number of different languages, and > routing is managed primarily by cookie. The app is serving the correct > pages in most cases, but a

Re: Media Root & Templates

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 11:53 -0800, AKK wrote: > Sorry I must mean the media url. Are the media_root and the media_url > automatically linked? No. The MEDIA_ROOT (capitalisation is important) setting is a storage path. It could be anywhere. It's then up to you to configure your webserver so that

Re: django-sphinx Passages Help

2009-02-27 Thread fortunatestar
me too, "BuildExcerpts" I wanto to the reslut highligting Thanks --~--~-~--~~~---~--~~ 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

Re: Cookie problem on multiple sites

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 08:34 -0800, Dids wrote: > I tried that, thanks for the input (it helped moving forward, see > below). > I've also changed the privacy settings in IE so I get prompted when > cookies arrived. > > What I found is that on site1 (the working one), I get prompted for a > cookie

Re: set_expiry(0)

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 06:11 -0800, Buddy wrote: > Hi. I use set_expiry(0) but it sets for session as default the value > from global_settings.py not (user’s Web browser is closed). also I see > table django_session via sql-shell and it not null for date field > there too, but date as default

Re: How to reverse lookup a RSS feed url?

2009-02-27 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 01:20 -0800, Rama Vadakattu wrote: > i am using django feed syndication framework. > > 1) .in urls.py > > feeds = { >'category': LatestTopicsByCategory, > } > > urlpatterns += patterns('', > url(r'^feeds/(?P.*)/$', >

Managing static assets in Django - almost solved

2009-02-27 Thread Bradley Wright
As an ex-Yahoo!, I'm usually looking for ways to improve my YSlow [1] and static asset handling capabilities in any project. Traditionally, this is something Django has been very weak at, as it focuses mostly on the database and application stack of the project. So between myself and a colleague

Re: select_related + annotate = bug?

2009-02-27 Thread saxon75
Sweet! Thanks! --~--~-~--~~~---~--~~ 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

Re: select_related + annotate = bug?

2009-02-27 Thread Alex Gaynor
On Fri, Feb 27, 2009 at 5:49 PM, saxon75 wrote: > > I'm having a somewhat odd error occurring when I try to use > select_related() and annotate() in the same queryset. > > The application I'm working on is a blog-type app where posts can be a > variety of types--article, book

select_related + annotate = bug?

2009-02-27 Thread saxon75
I'm having a somewhat odd error occurring when I try to use select_related() and annotate() in the same queryset. The application I'm working on is a blog-type app where posts can be a variety of types--article, book review, film review, etc. I use multi- table inheritance with a single base

Re: Faster Database?

2009-02-27 Thread Benjamin Sergeant
Disclaimer: No knowledge beyond tweaking ... This is the variable that you want to modify to improve performances if you're using PostGres. You'll have to be root on Linux because you'll have to modify some Linux runtime params too (shared memory). shared_buffers = (BIG number) 8 - Benjamin

Problem routing to certain i18n locales/languages

2009-02-27 Thread Scott
Hello, I'm working on an App Engine (using the Django helper) application that is to be presented in a number of different languages, and routing is managed primarily by cookie. The app is serving the correct pages in most cases, but a few languages default back to English, despite the cookie

purpose of formset hidden 'id' fields

2009-02-27 Thread Margie
I am using model formsets and seeing a hidden field get printed for the 'id' field. This is different than what I see if I use the same modelForm and just print that form. Let me use an example to clarify. Here's the model and form classes: class Publication(models.Model): title =

Re: UnicodeEncodeError with gettext

2009-02-27 Thread Scott
Updating this after problem resolution, the issue was with the translation (.po and .mo) files, not Django itself. Old gettext with Windows may have been the culprit, found using Linux to create the message files much more reliable. On Feb 12, 10:21 am, Scott wrote: > Hi

Problem with admin validation

2009-02-27 Thread Joshua Russo
I have a model admin page where I want to edit a ManyToMany relation model as an inline model but It is treating the extra entries for the inline relation as required. How do I make the inline model not required? --~--~-~--~~~---~--~~ You received this message

Found (and fixed?) a bug in ManyToManyField class

2009-02-27 Thread Joshua Russo
Think I found a bug in the ManyRelatedManager that occurs when you try to include a ManyToManyField relation in an admin edit page. I personally tried to have the relational table/module as an inline display of primary entity module. It seems to have been missing the __unicode__ / __str__

Re: Obtaining URL for an Admin page

2009-02-27 Thread Alex Gaynor
On Fri, Feb 27, 2009 at 3:13 PM, Paul Waldo wrote: > > - "Paul Waldo" wrote: > > > Hi all, > > > > I'm writing an app where most of my functionality is straight Admin > pages. When viewing the detail page for an object, I can select the "View > on

Re: Obtaining URL for an Admin page

2009-02-27 Thread Paul Waldo
- "Paul Waldo" wrote: > > Hi all, > > I'm writing an app where most of my functionality is straight Admin pages. > When viewing the detail page for an object, I can select the "View on site" > button. This will take me to some custom processing, but when this is

Re: Media Root & Templates

2009-02-27 Thread AKK
Sorry I must mean the media url. Are the media_root and the media_url automatically linked? In my settings.py i have: C:/Program Files/Apache2.2/myproject/ media/ as the root & http://localhost:8080/akonline/media/ as the url and i have an image (imgs/img.jpg) in my

Re: django query question

2009-02-27 Thread Alex Gaynor
On Fri, Feb 27, 2009 at 2:40 PM, Bobby Roberts wrote: > > hi all. I have a situation where I have two tables, auctions and > bids. I need to do a subquery as such: > > select distinct id from auctions_auction where Active=1 and id IN > (select distinct AuctionId_id from

django query question

2009-02-27 Thread Bobby Roberts
hi all. I have a situation where I have two tables, auctions and bids. I need to do a subquery as such: select distinct id from auctions_auction where Active=1 and id IN (select distinct AuctionId_id from auctions_bid where BidderId=6) how would I do this in django?

Re: Initializing a variable for each request

2009-02-27 Thread Alex Gaynor
On Fri, Feb 27, 2009 at 1:35 PM, Dennis wrote: > > Clarification: this variable needs to be accessible from all views > (and middleware). > The variable is a status notification to be optionally printed at the > top of the returned response page. > > > > On Feb 28, 2:16 am,

Re: Initializing a variable for each request

2009-02-27 Thread Dennis
Clarification: this variable needs to be accessible from all views (and middleware). The variable is a status notification to be optionally printed at the top of the returned response page. On Feb 28, 2:16 am, Dennis wrote: > I want a variable that I know will be

Obtaining URL for an Admin page

2009-02-27 Thread Paul Waldo
Hi all, I'm writing an app where most of my functionality is straight Admin pages. When viewing the detail page for an object, I can select the "View on site" button. This will take me to some custom processing, but when this is done, I want to go back to that original Admin page where I can

Initializing a variable for each request

2009-02-27 Thread Dennis
I want a variable that I know will be re-initialized on each http request. I'm not sure how to do that. One idea is to create middleware that resets the variable on each request. Just wondering if there is a simplier solution. --~--~-~--~~~---~--~~ You received

Re: Big Django site gone

2009-02-27 Thread Matt Bartolome
On Fri, Feb 27, 2009 at 8:41 AM, Matt Boersma wrote: > > More specifically, the RMN was an Ellington CMS site (pre-0.96 Django) > I believe.  The same infrastructure still powers several Colorado > newspapers, though: The Boulder Daily Camera, The Broomfield > Enterprise, and

Re: DEFAULT_FILE_STORAGE settings conflict

2009-02-27 Thread Jackson Torres
Thanx Alex :) On Thu, Feb 26, 2009 at 6:38 PM, Alex Gaynor wrote: > > > On Thu, Feb 26, 2009 at 6:13 PM, jacks...@gmail.com < > jackson.torr...@gmail.com> wrote: > >> >> I try to make my own custom storage like: >> >> from django.core.files.storage import Storage >> >>

mod_python error when debug=False

2009-02-27 Thread Michael Repucci
I've been trying to put my site up live, and keep coming across an error (on any page on the site) whenever I set debug=False in settings.py. With the development server, or with debug=True on the production server, I don't have this problem at all. I searched for a similar problem on

Re: Big Django site gone

2009-02-27 Thread Matt Boersma
More specifically, the RMN was an Ellington CMS site (pre-0.96 Django) I believe. The same infrastructure still powers several Colorado newspapers, though: The Boulder Daily Camera, The Broomfield Enterprise, and The Steamboat Pilot. We know because once in a while they've left DEBUG=True in

Re: populate a form from database and show all item fields in a template

2009-02-27 Thread MarcoS
> Try using a multiplemodelchoice field with a checkboxselectmultiple widget. > > Alex Ok thanks, I've changed forms.py like this: -- forms.py -- class BookForm(forms.Form): book_item = forms.ModelMultipleChoiceField (queryset=Book.objects.all(), widget=forms.CheckboxSelectMultiple)

Re: Cookie problem on multiple sites

2009-02-27 Thread Dids
I tried that, thanks for the input (it helped moving forward, see below). I've also changed the privacy settings in IE so I get prompted when cookies arrived. What I found is that on site1 (the working one), I get prompted for a cookie as soon as I request the Admin page. On site2, on the other

pyjamas + django media

2009-02-27 Thread alain31
Hello, I looked at pyjamas book to do ajax with django : http://pyjs.org/book/output/Bookreader.html and I understood how to use Json on django views and the client side. My question is about django forms and medias. In django's doc

Re: broken pipe urlpattern

2009-02-27 Thread Adonis
ok, by doing this: * (r'^appname/mama/(.*)/(.*)/(?P.*)$', 'django.views.static.serve', {'document_root': '/blah'}) * i managed to overcome the broken pipe issue. It was not able to read some images i had in a separate folder--> "blah/images/sth.jpg". I either had to give them a Global URL or put

Re: optional parameter url

2009-02-27 Thread Adonis
ok, seems i found a quick n dirty way to overcome the broken pipe. I just left it like this, * (r'^appname/mainpage/(.*)/(?P.*)$', 'django.views.static.serve', {'document_root': '/mesa'}) * and it loads the static files EXCEPT some images that where in a separate folder--> "mesa/images/sth.jpg".

Search on a related item's field causes an error

2009-02-27 Thread Affect
Hi: I have two models, publishing and entry, whose relationship is one to many (one entry can have many publishings). In the admin interface I have a ModelAdmin class (for Publishing) in which I specify the following: search_fields = ('entry__title',) I should now be able to view a list of

Re: populate a form from database and show all item fields in a template

2009-02-27 Thread Alex Gaynor
On 2/27/09, MarcoS wrote: > > Hi! wondering if someone could point me in the right > direction with this one: > > I'm trying to populate fields in a form with data from database: > i.e. suppose I've this model: > Try using a multiplemodelchoice field with a

populate a form from database and show all item fields in a template

2009-02-27 Thread MarcoS
Hi! wondering if someone could point me in the right direction with this one: I'm trying to populate fields in a form with data from database: i.e. suppose I've this model: -- models.py -- class Book(models.Model): title = models.CharField(max_length=100) pages = models.IntegerField()

Re: Cookie problem on multiple sites

2009-02-27 Thread Baxter
For each site, make sure you have SESSION_COOKIE_DOMAIN = 'whatever.com' in your settings. Otherwise your cookies will overwrite one another and cause no end of troubles. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Undocumented comment setting

2009-02-27 Thread Russell Keith-Magee
On Fri, Feb 27, 2009 at 11:59 PM, Tim Chase wrote: > >>> The COMMENTS_ALLOW_PROFANITIES setting is undocumented at >>> http://docs.djangoproject.com/en/dev/ref/contrib/comments/settings/ >> >> A known omission, with a purpose: >> >>

Re: Cookie problem on multiple sites

2009-02-27 Thread Dids
Unless it's a known issue, I'm not expecting anyone to know for sure what the problem is. Thing is, I'm no expert to Django and Apache, and I don't really know how to go about troubleshooting a cookie issue. Again, if anyone has any pointer, it would be much appreciated. Thanks, Dids,

Re: Undocumented comment setting

2009-02-27 Thread Tim Chase
>> The COMMENTS_ALLOW_PROFANITIES setting is undocumented at >> http://docs.djangoproject.com/en/dev/ref/contrib/comments/settings/ > > A known omission, with a purpose: > > http://code.djangoproject.com/ticket/9530 > http://code.djangoproject.com/ticket/8794 If the preference is to prevent

Big Django site gone

2009-02-27 Thread bax...@gretschpages.com
No question, just a quick RIP for the Rocky Mountain News (http:// www.rockymountainnews.com/) Its a shame they couldn't keep it going. Their online presence (built on Django) is/was really nice. --~--~-~--~~~---~--~~ You received this message because you are

Re: data clean issue [pls help to check]

2009-02-27 Thread andrew
Hi, Roseman Thank you very much for the explaination, problem solved! Applause & Cheers! On Feb 27, 10:10 pm, Daniel Roseman wrote: > On Feb 27, 12:37 pm, andrew wrote: > > > > > Hi, all , > > > CODE: > > > view.py > >

Re: ManyToMany widget in admin - the "user - permission way.."

2009-02-27 Thread Daniel Roseman
On Feb 27, 1:21 pm, Anders wrote: > Hi. > > In the users admin of Django admin there is a nice way of selecting > permissions for each user by adding and removing permissions from a > list of available permissions. () > > I have models set up similar to the

set_expiry(0)

2009-02-27 Thread Buddy
Hi. I use set_expiry(0) but it sets for session as default the value from global_settings.py not (user’s Web browser is closed). also I see table django_session via sql-shell and it not null for date field there too, but date as default from global_settings.py. Why is it happend?

Re: data clean issue [pls help to check]

2009-02-27 Thread Daniel Roseman
On Feb 27, 12:37 pm, andrew wrote: > Hi, all , > > CODE: > > view.py > - > def user_login(request): >         if request.method == 'POST': >                 form = UserLoginForm(request.POST)    # get the

Re: Manually parsing a URL and returning the view name and args

2009-02-27 Thread Andrew Ingram
That's a good point, I'll solve the problem by setting up redirects. Still it's nice to know about the resolve function. Regards, Andrew Ingram 2009/2/27 Ned Batchelder : > > I'm curious why you think view names and arguments will remain unchanged > in the future while

Re: Undocumented comment setting

2009-02-27 Thread Alex Gaynor
On Fri, Feb 27, 2009 at 8:23 AM, Russell Keith-Magee wrote: > > On Fri, Feb 27, 2009 at 8:02 PM, Chris McCormick > wrote: > > > > Hi, > > > > The COMMENTS_ALLOW_PROFANITIES setting is undocumented at > >

Re: Undocumented comment setting

2009-02-27 Thread Russell Keith-Magee
On Fri, Feb 27, 2009 at 8:02 PM, Chris McCormick wrote: > > Hi, > > The COMMENTS_ALLOW_PROFANITIES setting is undocumented at > http://docs.djangoproject.com/en/dev/ref/contrib/comments/settings/ A known omission, with a purpose: http://code.djangoproject.com/ticket/9530

ManyToMany widget in admin - the "user - permission way.."

2009-02-27 Thread Anders
Hi. In the users admin of Django admin there is a nice way of selecting permissions for each user by adding and removing permissions from a list of available permissions. () I have models set up similar to the ones used for users and permissions, but I am not able to get the nice "select from

Geodjango Linestring POST

2009-02-27 Thread Adonis
Hello, Being having trouble with linestring(). I am posting values like this: (a,b), (c,d) so the format is acceptable. When i try: * polycoords = request.POST['polygcoords'] poly = LineString(polycoords ) insert_info = polylines(geometry = poly) * i get "Invalid initialization input for

data clean issue [pls help to check]

2009-02-27 Thread andrew
Hi, all , CODE: view.py - def user_login(request): if request.method == 'POST': form = UserLoginForm(request.POST)# get the form from POST if form.cleaned_name():

Cookie problem on multiple sites

2009-02-27 Thread Dids
Hi, I have 2 sites running on apache. ( 2 VirtualHosts ). Everything works fine for the first one. The second is mostly fine too. The problem is that I cannot log into the system using Internet Explorer. I get the message : "Looks like your browser isn't configured to accept cookies.

Undocumented comment setting

2009-02-27 Thread Chris McCormick
Hi, The COMMENTS_ALLOW_PROFANITIES setting is undocumented at http://docs.djangoproject.com/en/dev/ref/contrib/comments/settings/ This really tripped me up on the website I am building which only allows users to compose comments made up entirely of swear words. Best, Chris.

Creating KML files for use in Google Maps

2009-02-27 Thread phoebebright
Took me a long long time to work out why the .kml file I created in django would parse as valid in Feedburner but googlemaps said it was an invalid kml file. Need to be sending as correct content-type of course. In case anyone else is stuck, here is how I did it: template ---

Re: Software for making screen mockups/application flow for django projects?

2009-02-27 Thread Kenneth Gonsalves
On Friday 27 February 2009 17:57:58 MrMuffin wrote: > My main goal is to have a complete spec and visual lay out of my > project before I start coding, instead of the old step-by-step-slowly- > into-complete-mess-approach I usually use. wont work ;-) django is geared for the old

Software for making screen mockups/application flow for django projects?

2009-02-27 Thread MrMuffin
I want to make some mockups and lay out application flow for my django project but cannot find any suitable software for linux. Do any of you have any good hints? Something like http://www.balsamiq.com/products/mockups, but free. My main goal is to have a complete spec and visual lay out of my

Re: Manually parsing a URL and returning the view name and args

2009-02-27 Thread Alex Koshelev
Of course within `reverse` function there is `resolve` function that parses path and return view function, positional arguments, and named arguments. On Fri, Feb 27, 2009 at 2:33 PM, Andrew Ingram wrote: > > Hi All, > > I'm trying to to build a model which can store a

Re: Postgis on Mac OS Leopard

2009-02-27 Thread Graham Dumpleton
On Feb 27, 10:23 pm, "omat * gezgin.com" wrote: > 'file' for liblwgeom.so and two of it dependencies (libgeos_c.1.dylib > and libproj.0.dylib) reveals they are built only for i386. > > Is this ok or should it be x86_64? as I built from source, how come > they are built for the

Manually parsing a URL and returning the view name and args

2009-02-27 Thread Andrew Ingram
Hi All, I'm trying to to build a model which can store a link to any page on the site. Ordinarily I'd just use a URLField, but I want to future- proof it. Instead I'd like to store the view name (including modules) and the parameter dict. Then I'd like to be able to retrieve these later and use

Re: Postgis on Mac OS Leopard

2009-02-27 Thread omat * gezgin.com
'file' for liblwgeom.so and two of it dependencies (libgeos_c.1.dylib and libproj.0.dylib) reveals they are built only for i386. Is this ok or should it be x86_64? as I built from source, how come they are built for the wrong architecture, if so? Thanks, omat On Feb 27, 11:16 am, Graham

python newbie easyInstall not so easy

2009-02-27 Thread kallep
Or it might be if i could find some instructions. Google give me hits like this one http://peak.telecommunity.com/DevCenter/EasyInstall where everything is explained except how to use easy_install. What I'm try to do is install pytz and this is the install instructions Installation

Re: Docstring documentation

2009-02-27 Thread Ned Batchelder
Inside a function, the function is known by its own name. Just as you can call a function recursively by name, you can access its properties by name: def myview(request): """ My docstring """ help = myview.__doc__ --Ned. motard wrote: > Hi, > > Thanks for the reference. >

Re: Docstring documentation

2009-02-27 Thread motard
Hi, Thanks for the reference. Access to the __doc__ property of a function is always done by first importing the function and then calling the property. What if I want to include the docstring of a function in the context this same function returns? should I simply import the views module

How to reverse lookup a RSS feed url?

2009-02-27 Thread Rama Vadakattu
i am using django feed syndication framework. 1) .in urls.py feeds = { 'category': LatestTopicsByCategory, } urlpatterns += patterns('', url(r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed' , {'feed_dict': feeds},name='djorum_feed_url') ,

Re: Postgis on Mac OS Leopard

2009-02-27 Thread Graham Dumpleton
On Feb 27, 8:13 pm, "omat * gezgin.com" wrote: > I am using the django's built-in development server. Odd then. All I can suggest is to run: otool -L /usr/local/pgsql_saved_0804141532/lib/liblwgeom.so This will tell you want other libraries that is dependent upon. Then

Re: Postgis on Mac OS Leopard

2009-02-27 Thread omat * gezgin.com
I am using the django's built-in development server. Thanks. On Feb 27, 12:48 am, Graham Dumpleton wrote: > On Feb 27, 12:29 am, "omat * gezgin.com" wrote: > > > Thanks for the pointer. > > > But I checked the architecture of the liblwgeom.so

Re: Faster Database?

2009-02-27 Thread Matej
I agree with Clifford. I was able to speed up my postgresql database by 200% just by changing configurations how much memory database can use. On Feb 27, 9:11 am, CLIFFORD ILKAY wrote: > Sean wrote: > > Anyone have any suggestion how can I make this process faster,

Re: Faster Database?

2009-02-27 Thread CLIFFORD ILKAY
Sean wrote: > Anyone have any suggestion how can I make this process faster, or > there is any other superfast database engine than MySql? We've found bulk loading data into PostgreSQL significantly faster. Come to think of it, we've found just about everything about PostgreSQL to be faster than

Re: UnicodeEncodeError pb

2009-02-27 Thread arbi
Thanks it worked fine. The changed made in the geopy doc didn't work. But the change in my views worked (I added .encode("utf-8") ) to my string. Arbi On 24 fév, 01:41, Karen Tracey wrote: > On Mon, Feb 23, 2009 at 7:10 PM, arbi wrote: > > > Here is the