Re: Django-Apache configuration in Fedora 9

2008-09-23 Thread Graham Dumpleton
On Sep 24, 3:27 pm, Harish <[EMAIL PROTECTED]> wrote: > hi folks, > >         i am trying to configure a project which is developed using > django. > Now I am trying to host it in web server (using Apache2), which is > running in  Fedora 9. > > I tried with the instruction given in the

Django-Apache configuration in Fedora 9

2008-09-23 Thread Harish
hi folks, i am trying to configure a project which is developed using django. Now I am trying to host it in web server (using Apache2), which is running in Fedora 9. I tried with the instruction given in the following link,

Re: order_by clause to preserve order in list?

2008-09-23 Thread coan
On Sep 24, 5:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-09-23 at 07:01 -0700, coan wrote: > > > I want to fetch a list of items in my database, and I have their id > > ready: > > my_ids_to_get = [ 1, 3, 2, ] > > > In mysql I would fetch them like this: > > SELECT * FROM

upgrading old sites

2008-09-23 Thread Kenneth Gonsalves
hi, I have a bunch of old sites - pre MR. Some of them do not need much work, but now a couple need a lot of new stuff. Question is: should I go through all the backward incompatible fixes to the database, or should I create a fresh db and import the old data into it? -- regards KG

Re: locale aware number formats

2008-09-23 Thread Malcolm Tredinnick
On Tue, 2008-09-23 at 08:51 -0700, pihentagy wrote: > On Sep 23, 12:28 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > Wiadomość napisana w dniu 2008-09-23, o godz. 12:21, przez pihentagy: > > > > > How can I print a number using the locale's thousand separator and > > > decimal? > > > > >

Re: django-admin.py init ....an integer is required

2008-09-23 Thread Malcolm Tredinnick
On Tue, 2008-09-23 at 08:05 -0700, KillaBee wrote: > I am working with .90 and when I run django-admin.py init I get this > error on the command line: > > Error: The database couldn't be initialized. > an integer is required > > I was thinking that it was a port number or host, but I get it if

Re: order_by clause to preserve order in list?

2008-09-23 Thread Malcolm Tredinnick
On Tue, 2008-09-23 at 07:01 -0700, coan wrote: > > I want to fetch a list of items in my database, and I have their id > ready: > my_ids_to_get = [ 1, 3, 2, ] > > In mysql I would fetch them like this: > SELECT * FROM table WHERE id IN (1, 3, 2) ORDER BY FIELD( id, 1, 3, > 2 ) > > This would

Re: docutils extra

2008-09-23 Thread Malcolm Tredinnick
On Mon, 2008-09-22 at 16:45 -0700, aleray wrote: > Hey, > > I installed docutils svn version and I couldn't get the documention > working (was in the python path) until I found I needed to register in > my pythonpath the "extra" directory in the docutils package. Docutils > team apparently

Re: No logging with lighttpd + fastcgi

2008-09-23 Thread erny
This problem still exists with django-1.0. I've been researching a bit: http://code.djangoproject.com/changeset/7297 does some changes. It works if I comment out the os.dup2 lines, but that may not be very robust. I'm using threaded model, not fork. On 12 ago, 18:51, Brian Victor <[EMAIL

Re: An academic journal's site

2008-09-23 Thread Malcolm Tredinnick
On Tue, 2008-09-23 at 19:41 -0700, Rodrigo Culagovski wrote: > I'm starting work on a site for an academic journal that will both > publish the articles from the paper version and also allow authors to > submit new articles for review and publication. Looking for specific > advice as well as

An academic journal's site

2008-09-23 Thread Rodrigo Culagovski
I'm starting work on a site for an academic journal that will both publish the articles from the paper version and also allow authors to submit new articles for review and publication. Looking for specific advice as well as general experience with this kind of site. Question 1 The articles' text

Re: Two Django visions running at once.

2008-09-23 Thread David Durham, Jr.
On Wed, Sep 17, 2008 at 3:21 PM, KillaBee <[EMAIL PROTECTED]> wrote: > > Is it possible to have two versions of django running at the same time > on an Ubuntu server(9.0 and 1.0)? > It is taking to long to recode, and until I do I wanted It up and > running with the old version. > I got the

Verbose names of fields in admin object history

2008-09-23 Thread zendak
The change_messages logged in the admin site's object history use the actual Python model field names. Is there a more or less trivial way to force it to use the fields' verbose_names instead? This would make history pages more meaningful for non-developers who use the admin site. Additionally,

Re: url capture + query set and generic views

2008-09-23 Thread aleray
Ok, It is solved. for those interested I did so: (mysite/urls.py) urlpatterns += patterns('mysite.views', (r'^news/(?P\w+)/$', 'news_category', {}) ) (mysite/views.py) from mysite.news.models import New, NewCategory from django.views.generic.list_detail import object_list def

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Graham Dumpleton
How are you hosting Django? It would help to know if you are using builtin development server or whether you are hosting under Apache using mod_python or mod_wsgi. If under Apache then use of certain Apache configuration settings can cause 500 errors to be returned instead of 404 errors. No point

Re: Admin redirecting to wrong URL?

2008-09-23 Thread Graham Dumpleton
On Sep 24, 5:43 am, Allan <[EMAIL PROTECTED]> wrote: > My application is working well at mysite.com/django/, and I get > an admin login at            mysite.com/django/admin/ -- but when I > enter my credentials, I seem to be redirected to            mysite.com/ > admin/ (which is a 404 error).

Re: python-ldap + Apache causing errors

2008-09-23 Thread Graham Dumpleton
On Sep 24, 4:39 am, Jashugan <[EMAIL PROTECTED]> wrote: > Hello, > > I am having a problem when using python-ldap with Apache. I added an > authentication backend based on ldapauth.py, and it works fine when > running from the Django server. However, when I use Apache I get the > following

Re: geodjango apache vs lighttpd

2008-09-23 Thread Graham Dumpleton
On Sep 24, 6:47 am, Jashugan <[EMAIL PROTECTED]> wrote: > Did you switched from Apache + mod_python to Lighttpd + FCGI? If so, > are you sure it wasn't a problem with mod_python versus Apache in > general? I'm having some issues with mod_python unrelated to > geodjango. It seems there are certain

url capture + query set and generic views

2008-09-23 Thread aleray
Hi, I'm trying capture urls patterns with generic views, something like this: info_dict = { 'queryset': New.objects.filter(category__slug=cat_slug).exclude(is_active=False).order_by('pub_date'), 'template_name': 'news.html', 'paginate_by': 1, } urlpatterns +=

GeoDjango / GIS Garbage Collection Error

2008-09-23 Thread Andrew Fong
When a Django process terminates, I get the following error message: Exception exceptions.TypeError: "'NoneType' object is not callable" in ignored I poked around and there appears to be a problem with garbage collecting instances of django.contrib.gis.geos.base.GEOSGeometry objects. To

get_query_set in admin/views/main trying to split a list

2008-09-23 Thread Jigsaw
Hello, After upgrading from svn 8322 to 9084, I received: 'list' object has no attribute 'split' /usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py in get_query_set, line 187 I modified line 186 from: if key.endswith('__in'): to: if key.endswith('__in') and

Re: Cannot assign "": "Character.user_profile" must be a "UserProfile" instance.

2008-09-23 Thread Simon Forman
Thanks Karen, I must have gotten it just as you posted your reply, Thanks anyhow, ~Simon On Sep 23, 2:59 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 23, 2008 at 5:47 PM, Simon Forman <[EMAIL PROTECTED]> wrote: > > > I'm getting an error I can't figure out. > > > I have a

Re: Cannot assign "": "Character.user_profile" must be a "UserProfile" instance.

2008-09-23 Thread Simon Forman
profile = user.get_profile() D'oh, got it. ~Simon On Sep 23, 2:47 pm, Simon Forman <[EMAIL PROTECTED]> wrote: > I'm getting an error I can't figure out. > > I have a "UserProfile" class that is the AUTH_PROFILE_MODULE setting, > but then when I am trying to create an object from a model

Re: Cannot assign "": "Character.user_profile" must be a "UserProfile" instance.

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 5:47 PM, Simon Forman <[EMAIL PROTECTED]> wrote: > > I'm getting an error I can't figure out. > > I have a "UserProfile" class that is the AUTH_PROFILE_MODULE setting, > but then when I am trying to create an object from a model class that > has a ForeignKey for that

Re: geodjango apache vs lighttpd

2008-09-23 Thread Ben Eliott
Yup as you say, it was apache + mod_python switched to lighttpd + fastcgi. Sounds like it could well be mod_python / Apache issue at the root of it. On 23 Sep 2008, at 21:47, Jashugan wrote: > > Did you switched from Apache + mod_python to Lighttpd + FCGI? If so, > are you sure it wasn't

Cannot assign "": "Character.user_profile" must be a "UserProfile" instance.

2008-09-23 Thread Simon Forman
I'm getting an error I can't figure out. I have a "UserProfile" class that is the AUTH_PROFILE_MODULE setting, but then when I am trying to create an object from a model class that has a ForeignKey for that UserProfile class char = Character( user_profile = request.user.profile, ... where

Re: ModelChoiceField with Unique Results

2008-09-23 Thread Daniel Roseman
On Sep 23, 4:44 pm, BobZ <[EMAIL PROTECTED]> wrote: > Thanks Daniel.  I've found solutions similar to yours in other threads > on the net, and everytime I test them, I literally get no form at all > in my rendered template. > My template appears to have all the correct code in it as you can see >

Re: Many-To-Many with extra fields

2008-09-23 Thread akonsu
this is untested: m = Membership.objects.select_related().get(person__name='ringo') ringo = m.person i agree, this is not as convenient as could be. may be it will be in the next version? konstantin On Sep 23, 5:16 pm, Nate Thelen <[EMAIL PROTECTED]> wrote: > Yeah, that would work, too.  I

Re: Re: Two Django visions running at once.

2008-09-23 Thread ra21vi
just extract & put them in diff directories.open two shells, add python path to django dir, and runserver. in other term, do the same, define python path to othr django,and run the servr.on apache2, you can do the same with two diff virtua'l host defined. hope this will work fine. try google

Re: Many-To-Many with extra fields

2008-09-23 Thread Nate Thelen
Yeah, that would work, too. I was thinking more like if you got the ringo like this: ringo = Person.objects.select_related(depth=2).get(name='ringo') how could you get the data without having to make another DB call. Ideas? Thanks, Nate On Sep 23, 2:04 pm, akonsu <[EMAIL PROTECTED]> wrote:

Re: Many-To-Many with extra fields

2008-09-23 Thread akonsu
hello, how about for m in Membership.objects.filter(person=ringo) : print m.date_joined konstantin On Sep 23, 4:58 pm, Nate Thelen <[EMAIL PROTECTED]> wrote: > So if I have a Person object "ringo" and I want to get info about the > Groups he is a member of, I would do this: > > for group in

Re: Many-To-Many with extra fields

2008-09-23 Thread Nate Thelen
So if I have a Person object "ringo" and I want to get info about the Groups he is a member of, I would do this: for group in ringo.group_set.all() print( group.name ) My question is, how do I print the "date_joined" without having to do this: for group in ringo.group_set.all() print(

Re: geodjango apache vs lighttpd

2008-09-23 Thread Jashugan
Did you switched from Apache + mod_python to Lighttpd + FCGI? If so, are you sure it wasn't a problem with mod_python versus Apache in general? I'm having some issues with mod_python unrelated to geodjango. It seems there are certain modules that work in the python interpreter that will cause

Re: denormalized data in single field

2008-09-23 Thread akonsu
hello, you can override the model's save() method. konstantin On Sep 23, 3:05 pm, "Владимир Сидоренко" <[EMAIL PROTECTED]> wrote: > hi > > i need to process a set of denormalized data in single model field. > for example, > > class Place(Model): >     location = LocationField() > > it's

Re: strategy for deploying to production server

2008-09-23 Thread akonsu
hello, i set up an SVN repository and checked out the files on to my dev machine as well as in to the directory where the web server can find them. i do not have setting.py in my repository, and i have different versions of settings.py on my dev machine and on the server. so al the differences

Re: Impact of a CustomManager on the RelatedManager

2008-09-23 Thread bruno desthuilliers
On 23 sep, 01:26, gaz <[EMAIL PROTECTED]> wrote: > Thanks Bruno, > > I'd already tried that - I noticed that with or without the > use_for_related_field FWIW, it's a plural, ie "use_for_related_field*s*" - but I assume the typo wasn't in your code. Out of curiousity, which Django version are

Re: OS path in python

2008-09-23 Thread bruno desthuilliers
On 23 sep, 02:42, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > import os > > os.environ['SERVER_NAME'] > > > See how that goes. > > I get: > KeyError: 'SERVER_NAME' > > So i'm assuming we aren't You mean you don't know which web development solution you're using ???

geodjango apache vs lighttpd

2008-09-23 Thread [EMAIL PROTECTED]
I found apache stalled pages whenever i tried to touch a geodjango field in the templates. Switched to lighttpd and everything is perfect. Anyone else find this, or know the reason? I confess i didn't try reinstalling apache so it could have been a bad install, but otherwise apache was working no

Admin redirecting to wrong URL?

2008-09-23 Thread Allan
My application is working well at mysite.com/django/, and I get an admin login atmysite.com/django/admin/ -- but when I enter my credentials, I seem to be redirected tomysite.com/ admin/ (which is a 404 error). Did I miss an admin config setting somewhere? A relevant

denormalized data in single field

2008-09-23 Thread Владимир Сидоренко
hi i need to process a set of denormalized data in single model field. for example, class Place(Model): location = LocationField() it's rendered as one single text field, where we insert address, then by this address we find out corresponding district and nearest subway station and write

python-ldap + Apache causing errors

2008-09-23 Thread Jashugan
Hello, I am having a problem when using python-ldap with Apache. I added an authentication backend based on ldapauth.py, and it works fine when running from the Django server. However, when I use Apache I get the following error in the Apache error.log: child pid 2941 exit signal Bus error (10)

Re: Django 1.0 and Stdimage does not work

2008-09-23 Thread Iapain
picture = Picture(gallery = gallery, image = request.FILES['image']) Should be picture = Picture(gallery = gallery, image = request.FILES['image'].name) On Sep 23, 4:55 pm, mwebs <[EMAIL PROTECTED]> wrote: > Hello, > I am using Stdimage instead of the native models.ImageField to have >

Re: A question about spaces and passing variables...

2008-09-23 Thread djandrow
Ok, thanks Karen, i;ll have a go with messing about. If someone else with more time could explain it to me that would be great, otherwise i'll just try playing about with it. regards, Andrew --~--~-~--~~~---~--~~ You received this message because you are

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Ramiro Morales
On Tue, Sep 23, 2008 at 1:36 PM, h <[EMAIL PROTECTED]> wrote: > > I suspect you have something like this in your urls.py and your static > media is not being served > > > if not settings.DEBUG: >urlpatterns += patterns('',(r'^media/(.*)$', > 'django.views.static.serve', {'document_root':

Re: strategy for deploying to production server

2008-09-23 Thread Dmitry Dzhus
sotirac wrote: > Just trying to get a feel for what other developers are doing when > deploying to a production server. There are some differences between > my development machine and production server such as the location of > my media files, the database settings, and if I want to enable

Re: strategy for deploying to production server

2008-09-23 Thread Norman Harman
sotirac wrote: > Just trying to get a feel for what other developers are doing when > deploying to a production server. There are some differences between > my development machine and production server such as the location of > my media files, the database settings, and if I want to enable

Re: Sending HTML email

2008-09-23 Thread Berco Beute
> You might try reading the > documentation:http://docs.djangoproject.com/en/dev/topics/email/#sending-alternativ... Oops, completely overlooked that. Thanks for the pointer. 2B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Sending HTML email

2008-09-23 Thread Matthias Kestenholz
On Tue, Sep 23, 2008 at 7:38 PM, Berco Beute <[EMAIL PROTECTED]> wrote: > > Currently I'm sending plain text mails using: > > ### > from django.core.mail import EmailMessage > email = EmailMessage('hi', 'howdy', host, to) > email.send() > ### > > But now I want to use HTML in the body of the

Re: Sending HTML email

2008-09-23 Thread Jeff Gentry
On Tue, 23 Sep 2008, Berco Beute wrote: > But now I want to use HTML in the body of the email. How do I format > such a message and can I just send it like above? Emails should be plain text, not HTML ;) --~--~-~--~~~---~--~~ You received this message because

Sending HTML email

2008-09-23 Thread Berco Beute
Currently I'm sending plain text mails using: ### from django.core.mail import EmailMessage email = EmailMessage('hi', 'howdy', host, to) email.send() ### But now I want to use HTML in the body of the email. How do I format such a message and can I just send it like above? 2B

Re: strategy for deploying to production server

2008-09-23 Thread Jay Parlar
On Tue, Sep 23, 2008 at 1:22 PM, sotirac <[EMAIL PROTECTED]> wrote: > > Just trying to get a feel for what other developers are doing when > deploying to a production server. There are some differences between > my development machine and production server such as the location of > my media

Re: using forloop variable to get the provide special tags for the 4th element.

2008-09-23 Thread sotirac
Hi Steve, the cycle tag fixed the issue. Thanks. On Sep 15, 1:00 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Lee Hinde wrote: > > > On Sun, Sep 14, 2008 at 10:00 PM, sotirac <[EMAIL PROTECTED] > > > wrote: > > >     In the django template where I am using a for loop,

strategy for deploying to production server

2008-09-23 Thread sotirac
Just trying to get a feel for what other developers are doing when deploying to a production server. There are some differences between my development machine and production server such as the location of my media files, the database settings, and if I want to enable caching or not. Right now

Re: Postgresql 'missing FROM-clause entry in subquery for table' error on lookup that spans relationships

2008-09-23 Thread cfobel
Malcolm, I've posted a new ticket and assigned it to you at: http://code.djangoproject.com/ticket/9188 I look forward to hearing from you. Thanks again! Christian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Updates not working

2008-09-23 Thread Rajesh Dhawan
Hi Adam, On Sep 22, 6:05 pm, "Adam Findley" <[EMAIL PROTECTED]> wrote: > So I have a pretty simple case here in a view: > > event = Event.Objects.get(id='23') > event.end_date = datetime.now() > event.save() > > It should just work right? Yes. > > When looking at the queries, the UPDATE

MySQLdb installation problems on mac leopard

2008-09-23 Thread Nico
Hello, I've installed Django 1.0, and have Python 2.5 running fine on my Intel Mac with Leopard. I have downloaded and installed the latest package from the official MySQL site, and I'm trying to install MySQLdb to get it working with python, but its not working I have followed these

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 18:16:19 barbara shaurette wrote: > Question 1: What are you using in your template to display the errors? In the render to response I put {'formbugs': form.non_field_errors() } and in the template {{formbugs}}. It really looks like the self.validate_unique() in

Re: Postgresql 'missing FROM-clause entry in subquery for table' error on lookup that spans relationships

2008-09-23 Thread cfobel
Thanks for your quick reply. I will submit a bug report. Thanks! Christian On Sep 22, 9:45 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-22 at 18:22 -0700, cfobel wrote: > > Hello, > > > I'm encountering anerrorwhen performing a lookup that spans > > relationships.  The

Re: A question about spaces and passing variables...

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 12:22 PM, djandrow <[EMAIL PROTECTED]>wrote: > > Thanks Karen, how does urlencode work though? > I imangine its a filter, but what does it do? > > Yes well the doc is a bit sparse for that filter, but if you do a little playing around with it and research into how spaces

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread h
I suspect you have something like this in your urls.py and your static media is not being served if not settings.DEBUG: urlpatterns += patterns('',(r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),) On Sep 23, 5:29 pm, "Karen Tracey" <[EMAIL

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 12:14 PM, Huuuze <[EMAIL PROTECTED]> wrote: > > There are no tracebacks in this instance. I can see the non-descript > 500 errors appearing in my terminal window. > I don't understand. Are you saying you have configured ADMINS, etc. in settings.py so that 500 error

Re: A question about spaces and passing variables...

2008-09-23 Thread djandrow
Thanks Karen, how does urlencode work though? I imangine its a filter, but what does it do? regards, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Changing field error messages

2008-09-23 Thread barbara shaurette
Question 1: What are you using in your template to display the errors? Question 2: Did you start working on this app on Talk Like a Pirate Day? On Sep 23, 3:13 am, Donn <[EMAIL PROTECTED]> wrote: > On Tuesday, 23 September 2008 11:42:19 Daniel Roseman wrote:> The __all__ > error messages are

Re: ModelChoiceField with Unique Results

2008-09-23 Thread BobZ
I had SOME luck with "queryset=Vehicle.objects.filter(year=True)" in that the form actually rendered in my template, but the year select box is empty now. All other select boxes load fine (Make and Model) with their data...only year still won't work. On Sep 23, 10:44 am, BobZ <[EMAIL

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Huuuze
There are no tracebacks in this instance. I can see the non-descript 500 errors appearing in my terminal window. On Sep 23, 12:06 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 23, 2008 at 11:53 AM, Huuuze <[EMAIL PROTECTED]> wrote: > > > I'm preparing to deploy my Django app and I

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 11:53 AM, Huuuze <[EMAIL PROTECTED]> wrote: > > I'm preparing to deploy my Django app and I noticed that when I change > the "DEBUG" setting to False, all references to static files (i.e., > JavaScript, CSS, etc..) result in HTTP 500 errors. > > Any idea what's causing

Re: locale aware number formats

2008-09-23 Thread Karen Tracey
2008/9/23 pihentagy <[EMAIL PROTECTED]> > > On Sep 23, 12:28 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > Wiadomość napisana w dniu 2008-09-23, o godz. 12:21, przez pihentagy: > > > > > How can I print a number using the locale's thousand separator and > > > decimal? > > > > > Basically I hoped

Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-23 Thread Huuuze
I'm preparing to deploy my Django app and I noticed that when I change the "DEBUG" setting to False, all references to static files (i.e., JavaScript, CSS, etc..) result in HTTP 500 errors. Any idea what's causing that issue (and how to fix it)?

Re: locale aware number formats

2008-09-23 Thread pihentagy
On Sep 23, 12:28 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-09-23, o godz. 12:21, przez pihentagy: > > > How can I print a number using the locale's thousand separator and > > decimal? > > > Basically I hoped ther is a template filter, but floatformat doesn't > >

Re: A question about spaces and passing variables...

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 11:23 AM, djandrow <[EMAIL PROTECTED]>wrote: > > I have a list of categories, which entries are filed into, then some > can click a category link in a template and it will take them to a > list of entries in that particular category. The problem is one of > this categories

Re: ModelChoiceField with Unique Results

2008-09-23 Thread BobZ
Thanks Daniel. I've found solutions similar to yours in other threads on the net, and everytime I test them, I literally get no form at all in my rendered template. My template appears to have all the correct code in it as you can see in the link "search.html" at the bottom of this post. Looking

Re: limit the foreign key select in admin

2008-09-23 Thread Ottavio Campana
On 23 Set, 13:41, Ottavio Campana <[EMAIL PROTECTED]> wrote: > Hi, I just started studying django and I'm having a problem with its > admin interface. In my model I have two classes, let's say > > class ClassA (models.Model): >     user = models.ForeignKey(User, help_text=_('ClassA owner')) >    

A question about spaces and passing variables...

2008-09-23 Thread djandrow
I have a list of categories, which entries are filed into, then some can click a category link in a template and it will take them to a list of entries in that particular category. The problem is one of this categories is "About Me", what I have so far in my view is: current_entries =

Re: Slow uploading at Webfaction?

2008-09-23 Thread worksology
Yes, same issue here. Very very slow at times. Yesterday I uploaded a 60mb file in less than 2 minutes, but today I've been waiting over an hour for an 80mb file to upload. Ridiculous. Not sure what's going on, but I'd like to find a fix. On Aug 6, 1:07 pm, David Zhou <[EMAIL PROTECTED]>

django-admin.py init ....an integer is required

2008-09-23 Thread KillaBee
I am working with .90 and when I run django-admin.py init I get this error on the command line: Error: The database couldn't be initialized. an integer is required I was thinking that it was a port number or host, but I get it if they are filled or blank. Please help!!! setting.py

Django 1.0 and Stdimage does not work

2008-09-23 Thread mwebs
Hello, I am using Stdimage instead of the native models.ImageField to have scaling and thumbnail support. With the former 0.97 release Stdimage just worked perfect. Now I tried to use it with Django 1.0, and of course I also updated Stdimage to the newest svn-release. But when uploading an Image

Django 1.0 and Stdimage does not work

2008-09-23 Thread mwebs
Hello, I am using Stdimage instead of the native models.ImageField to have scaling and thumbnail support. With the former 0.97 release Stdimage just worked perfect. Now I tried to use it with Django 1.0, and of course I also updated Stdimage to the newest svn-release. But when uploading an Image

order_by clause to preserve order in list?

2008-09-23 Thread coan
I want to fetch a list of items in my database, and I have their id ready: my_ids_to_get = [ 1, 3, 2, ] In mysql I would fetch them like this: SELECT * FROM table WHERE id IN (1, 3, 2) ORDER BY FIELD( id, 1, 3, 2 ) This would preserve their order. Can I build this query with the native django

Re: Auto Discover on MediaTemple

2008-09-23 Thread krylatij
make sure that you use Django 1.0 this mechanizm was changed since 0.96 --~--~-~--~~~---~--~~ 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: Auto Discover on MediaTemple

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 8:31 AM, <[EMAIL PROTECTED]> wrote: > > Using the gs and Django container on MediaTemple, got my project > installed, it works when I don't have the admin info in the URLS.py, > when I add all of the info in the URLS.py and go to the site I get > this error: > >

Re: MySQLdb + AMD64

2008-09-23 Thread Alex
Try using Linux then. I just created an Ubuntu dev platform for Django on my AMD64 and everything worked very easily. You can even install Ubuntu from windows using Wubi -- practically a one-click install. Python, MySQL, and all the libs are all ready to go for AMD64, you just install using

Fwd: GeoDjango, installation error

2008-09-23 Thread Владимир Сидоренко
ok, if ound it class District(models.Model): point = gis_models.PointField() objects = gis_models.GeoManager() -- Forwarded message -- From: Владимир Сидоренко <[EMAIL PROTECTED]> Date: 2008/9/23 Subject: GeoDjango, installation error To: django-users@googlegroups.com

Re: Error in : Porting your apps from Django 0.96 to 1.0

2008-09-23 Thread Karen Tracey
On Tue, Sep 23, 2008 at 3:55 AM, laspal <[EMAIL PROTECTED]> wrote: > > Hi, > I am trying to port my apps from django 0.96 to 1.0. > I have made all the changes required for it but when I run > > /usr/bin/python manage.py runserver > I am getting error : > > Error: Can't find the file

Re: Pre-empting Fixture execution in Django with nosetests.

2008-09-23 Thread Russell Keith-Magee
On Tue, Sep 23, 2008 at 4:07 PM, proteus guy <[EMAIL PROTECTED]> wrote: > Here's a fun one for you testing gurus! I have a Django app that uses an > irc server to communicate events to a system. My models utilize the django > model save signal to post an irc message when something is updated.

Re: View error in tutorial 3 (URLCONF)

2008-09-23 Thread Caisys
Thanks a lot !! On Sep 22, 6:19 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 22, 2008 at 11:52 AM, Caisys <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am following the tutorials on django website. My problem is that > > when i create url conf for views that do not exist, the admin

Access help_text in template (for a custom form field)

2008-09-23 Thread Berco Beute
I have one custom field in my form and I can't get the help_text in a template. In the admin the help_text shows up fine so I assume it has something todo with my custom field: ###template {{ form.guests.help_text }} #where 'guests' is a CommaSeparatedEmailField as specified

Re: OS path in python

2008-09-23 Thread Bobby Roberts
I wasn't aware of that group. Thanks for posting the info. On Sep 23, 5:08 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 23 sep, 02:01, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > > On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > > > > Shouldn't that be

Auto Discover on MediaTemple

2008-09-23 Thread mccomas . chris
Using the gs and Django container on MediaTemple, got my project installed, it works when I don't have the admin info in the URLS.py, when I add all of the info in the URLS.py and go to the site I get this error: AttributeError at / 'module' object has no attribute 'autodiscover' Here's my URLS

GeoDjango, installation error

2008-09-23 Thread Владимир Сидоренко
hi i have a model: from django.contrib.gis.db import models as gis_models class District(models.Model): point = gis_models.PointField() and then: > d = District() > d.point = "POINT(1 2)" > d.save() > d2 = District.objects.get(pk=1) > d2.point ... : String or unicode input unrecognized as

limit the foreign key select in admin

2008-09-23 Thread Ottavio Campana
Hi, I just started studying django and I'm having a problem with its admin interface. In my model I have two classes, let's say class ClassA (models.Model): user = models.ForeignKey(User, help_text=_('ClassA owner')) ... class ClassB (models.Model): classa =

Re: name '_' is not defined

2008-09-23 Thread Daniel Hepper
from django.utils.translation import ugettext_lazy as _ HTH, Daniel Am Dienstag, den 23.09.2008, 04:12 -0700 schrieb laspal: > Hi, > I am using 1.0 version ran into problem. > > My model : > from django.db import models > > from django.contrib.auth.models import User > > > > IPSecurity =

name '_' is not defined

2008-09-23 Thread laspal
Hi, I am using 1.0 version ran into problem. My model : from django.db import models from django.contrib.auth.models import User IPSecurity = True class IPAccess(models.Model): ip = models.IPAddressField(_('ip'), unique=True, db_index=True) location = models.CharField(max_length

Re: foreign key exception where objects manager is customized

2008-09-23 Thread Gio
I had a similar issue, solved with a trick. Try to explicit a save() method for your SuperDelegate this way: def save(self, *args, **kwargs): super(SuperDelegate, self).save(*args, **kwargs) Giovanni On 6 Set, 12:09, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > A foreignkey in

Re: How to simulate recursive inlines in admin?

2008-09-23 Thread Itai Tavor
On Sep 23, 7:05 am, "Petar Marić" <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm creating a Django based web application for my Master thesis and I've got > a hard problem. This is my model (greatly simplified): > > class Questionnaire(models.Model): > title = models.CharField() >

Re: locale aware number formats

2008-09-23 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-23, o godz. 12:21, przez pihentagy: > How can I print a number using the locale's thousand separator and > decimal? > > Basically I hoped ther is a template filter, but floatformat doesn't > have thousand separator, and seems to use decimal point always. Take

locale aware number formats

2008-09-23 Thread pihentagy
Hi all! How can I print a number using the locale's thousand separator and decimal? Basically I hoped ther is a template filter, but floatformat doesn't have thousand separator, and seems to use decimal point always. thanks Gergo --~--~-~--~~~---~--~~ You

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 11:42:19 Daniel Roseman wrote: > The __all__ error messages are available via form.non_field_errors(). I sent that along to the template, but it's still oddly silent. Some code: def clean(self): try: self.validate_unique() except

Re: Changing field error messages

2008-09-23 Thread Daniel Roseman
On Sep 23, 10:08 am, Donn <[EMAIL PROTECTED]> wrote: > On Tuesday, 23 September 2008 08:47:10 Daniel Roseman wrote:> meantime maybe > you could define a clean() method and catch and re- > > raise the ValidationError there. > > I tried that idea of yours and it has no effect on the error message.

Re: OS path in python

2008-09-23 Thread bruno desthuilliers
On 23 sep, 02:01, Bobby Roberts <[EMAIL PROTECTED]> wrote: > On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > > > Shouldn't that be os.path.abspath(os.path.dirname(__file__)) instead > > just in case the .py file is executed with a relative path? > > > And Bobby, I would instead use

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 08:47:10 Daniel Roseman wrote: > meantime maybe you could define a clean() method and catch and re- > raise the ValidationError there. I tried that idea of yours and it has no effect on the error message. Looking at the source I see it's adding an error for a field

  1   2   >