Re: Import Errors - Development vs. Production

2007-04-28 Thread James Bennett
On 4/29/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > Now, if I'm trying to use the development server... it doesn't > recognize any of the applications without relative names and the only > way to fix that is to move those apps inside "applications/" then add > the prefix. All of the manage.py u

Import Errors - Development vs. Production

2007-04-28 Thread Bryan Veloso
Problems are only getting weirder for me. So I'm using a few external applications, such as django-tagging and template_utils: Now, if I am viewing my production (mod_python) admin, I have to configure INSTALLED_APPS this way in order to be clear of ImportErrors: INSTALLED_APPS = ( 'tagging'

Re: django

2007-04-28 Thread Kenneth Gonsalves
On 28-Apr-07, at 5:16 PM, k.s.rathore wrote: > everyone. i am new here in django and the purpose of being here is > i want some help and support regarding django framework. we are > launching a large enterprise portal and after going through some > suggestions , decided to work on this frame

Django Aggregator

2007-04-28 Thread [EMAIL PROTECTED]
Hi everyone, Newbie to Django/Python but I'm lovin' it so far...! I'm working on an aggregator based off of http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/aggregator that I want to be something like http://news.originalsignal.com I'm unsure of how the logic in rel

Re: TIME_ZONE Error? Anyone ever get this?

2007-04-28 Thread Roboto
Hmm. Alright.. lol. I'm not sure how I"ll be able to solve this problem, but thanks! I'll definitely try examining the issue thoroughly! On Apr 28, 9:56 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 4/28/07, Roboto <[EMAIL PROTECTED]> wrote: > > > I'm using Piotr Diamanda MyghtyBoard and

User and generic views

2007-04-28 Thread Ryan K
Hi all...quick question. If I have the auth app enabled, is the user object automatically exposed to templates used with generic views? I want to display a login link if no one is logged in and a logout link if a user is. Thanks, Ryan --~--~-~--~~~---~--~~ You re

Django Aggregator

2007-04-28 Thread [EMAIL PROTECTED]
Hi everyone, Newbie to Django/Python but I'm lovin' it so far...! I'm working on an aggregator based off of http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/aggregator How does the code in /bin run...mentioned as hourly? Does it run as cron job? If so how would I wr

Re: TIME_ZONE Error? Anyone ever get this?

2007-04-28 Thread James Bennett
On 4/28/07, Roboto <[EMAIL PROTECTED]> wrote: > I'm using Piotr Diamanda MyghtyBoard and I keep running into this > error when I try this 1 particular view... I've asked Piotr directly > and he indicated it could be a django/server issue. Any thoughts? If you search on the Django ticket tracker

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Tim Chase
> be quick and easy. If Joe adds Murray as a friend, and > uses the pre- filled description "We worked together" when > adding him, Murray simply wants to be able to press > "Confirm", and the relationship is set up on both their > profiles. This is where the symmetrical M2M is really > handy - it

TIME_ZONE Error? Anyone ever get this?

2007-04-28 Thread Roboto
I'm using Piotr Diamanda MyghtyBoard and I keep running into this error when I try this 1 particular view... I've asked Piotr directly and he indicated it could be a django/server issue. Any thoughts? Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.

Re: startproject woes

2007-04-28 Thread cfriedalek
After some sleep, I upgraded from python 2.5 to python 2.5.1 and the command worked. Strange how karma works. Hope to have some fun with django now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Problem sorting columns in Admin

2007-04-28 Thread David Hancock
Thanks. The patch with 1576 worked fine. I understand about not wanting to patch current admin--makes perfect sense. Thanks also to Marcelo for identifying the problem and fix. On Apr 28, 7:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-04-28 at 17:49 -0400, Hancock, David (

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Henrik Lied
Thanks for the quick reply! On 29 Apr, 02:02, Tim Chase <[EMAIL PROTECTED]> wrote: > This also meets your criterion that, X can consider Y a friend, > but Y doesn't have to consider X a friend. I'm sorry, maybe I haven't been clear enough on what I want to achieve. This little problem is part of

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Henrik Lied
Thanks Malcolm! One question: In my example, it would be very easy to add and display friends. If Joe added Murray as a friend, I would simply get Joe's friends by doing something like: v = Profile.objects.get(user=request.user) v.friends.all() And the approach would be the exact same for Murray.

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Tim Chase
> I'm sorry, but the problem with it is that it isn't symmetrical. > > A part of my Profile-model looks like this: > class Profile(models.Model): > user = models.ForeignKey(User) > friends = models.ManyToManyField("self") > > This makes it very easy to create and maintain a relationship

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 23:27 +, Henrik Lied wrote: > Thank you for your example, Tim. > I'm sorry, but the problem with it is that it isn't symmetrical. > > A part of my Profile-model looks like this: > class Profile(models.Model): > user = models.ForeignKey(User) > friends = models.Ma

Re: Problem sorting columns in Admin

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 17:49 -0400, Hancock, David (DHANCOCK) wrote: > Django 0.96, OS X 10.4, MySQL 5.1, Python 2.4.2. > > I'm using the automatic admin, and when I click on a column heading, I > get a traceback: > > OperationalError at /admin/trips/leg/ > (1054, "Unknown column 'trips_t

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Henrik Lied
Thank you for your example, Tim. I'm sorry, but the problem with it is that it isn't symmetrical. A part of my Profile-model looks like this: class Profile(models.Model): user = models.ForeignKey(User) friends = models.ManyToManyField("self") This makes it very easy to create and maintai

Re: cannot get REQUEST_URI

2007-04-28 Thread Graham Dumpleton
On Apr 29, 1:42 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-04-28 at 15:22 +, omat * gezgin.com wrote: > > Because request.META['PATH_INFO'] is only available when running the > > test server. > > > This is also a point of inconvenience and I think the test server > > shou

Problem sorting columns in Admin

2007-04-28 Thread Hancock, David (DHANCOCK)
Django 0.96, OS X 10.4, MySQL 5.1, Python 2.4.2. I'm using the automatic admin, and when I click on a column heading, I get a traceback: OperationalError at /admin/trips/leg/ (1054, "Unknown column 'trips_trip.-start_date' in 'order clause'") The leg class has a foreign key to the trip c

Re: Friendship_type on symmetrical M2M

2007-04-28 Thread Tim Chase
> Scenario: User A goes to User B's profile. User A know User B, > so User A adds User B as his friend. He then specifies their > friendship as "Colleagues". > > How can I make this work? I have extended the User-model to > include a friends-field (ManyToManyField("self")), but I have > no idea h

Re: Setting up psycopg2

2007-04-28 Thread Brian Luft
You're welcome. It may be too late, but FYI: [EMAIL PROTECTED]:/usr/local/lib/python2.5$ apt-cache search psycopg2 python-psycopg2 - Python module for PostgreSQL python-psycopg2-dbg - Python module for PostgreSQL (debug extension) python-psycopg2da - Zope database adapter based on python-psycopg

Friendship_type on symmetrical M2M

2007-04-28 Thread Henrik Lied
Hi there! Scenario: User A goes to User B's profile. User A know User B, so User A adds User B as his friend. He then specifies their friendship as "Colleagues". How can I make this work? I have extended the User-model to include a friends-field (ManyToManyField("self")), but I have no idea how

Re: Strange error with tutorial code

2007-04-28 Thread TechnoFreak
Malcolm Tredinnick wrote: > Are you using a Python 2.5 final release and not a pre-release? > > The reason I'm asking is because there was a bug in Python-2.5.1 > pre-releases (including the 2.5.1c1 version that shipped with betas of > Ubuntu Feisty) that caused problems with Django. It's not som

Re: Strange error with tutorial code

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 22:55 +0530, Parthan SR wrote: > > Hello, > > I was trying to do the tutorial again and was in tutorial 2 when I met > with a strange error. As per the tutorial I was adding the choices on > to the edit polls page. Now, when I select an existing poll (which was > created wi

Strange error with tutorial code

2007-04-28 Thread Parthan SR
Hello, I was trying to do the tutorial again and was in tutorial 2 when I met with a strange error. As per the tutorial I was adding the choices on to the edit polls page. Now, when I select an existing poll (which was created with the shell) and try to add another choice, it gives me a type error

startproject woes

2007-04-28 Thread cfriedalek
Its late, eyes hanging out of my head . Just installed django from svn. Copied django-admin.py in c: \python25\scripts so its in my search path for windows. Created a directory for a tutorial project and from there typed: django-admin.py startproject chart (this is a cut and

Re: django

2007-04-28 Thread Christian Markwart Hoeppner
Rest asured we will find your answers. Django is a good choice, even though it's still not above 1.0. Welcome, Karni. El s�b, 28-04-2007 a las 04:46 -0700, k.s.rathore escribi�: > hi > everyone. i am new here in django and the purpose of being here is > i want some help and support regarding

Re: Dev Server - Being Denied Admin Media

2007-04-28 Thread Christian Markwart Hoeppner
Sure. I also suggested him making the place readable by the apache user, but making a quick 777 and back is a fine way to know where the problem is. If with that permission everything works, you know your user hasn't got the right permissions. Though you gotta remember to chmod back to something s

Re: cannot get REQUEST_URI

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 15:22 +, omat * gezgin.com wrote: > Because request.META['PATH_INFO'] is only available when running the > test server. > > This is also a point of inconvenience and I think the test server > should be made more compatible with apache. Apache is not the only web server

Re: cannot get REQUEST_URI

2007-04-28 Thread omat * gezgin.com
Because request.META['PATH_INFO'] is only available when running the test server. This is also a point of inconvenience and I think the test server should be made more compatible with apache. On 28 Nisan, 17:28, Sam <[EMAIL PROTECTED]> wrote: > Why don't you also use request.META['PATH_INFO']

Re: cannot get REQUEST_URI

2007-04-28 Thread Sam
Why don't you also use request.META['PATH_INFO'] at production level ? uri = request.META.get('PATH_INFO') On 28 avr, 12:53, "omat * gezgin.com" <[EMAIL PROTECTED]> wrote: > I need to use the current request URI in a template. Thus, I am > passing the uri as a context variable, which is: > > uri

cPickle.loads error

2007-04-28 Thread mojo
Hi. After moving data from one db to another using django.core.serializers I am getting cPickle error: "invalid load key, '\'" when trying to unpickle. Model sample follow: class SomeModel( models.Model ): data_pickle = models.TextField( blank=True, null=True ) def unpack( self ):

Syntax highlighting

2007-04-28 Thread Ivan Sagalaev
I am developing a non-intrusive javascript syntax highlighter for use in blogs. Recently I've added support for highlighting Django templates and now I feel it can be indeed useful for people writing about Django. Check it out: http://softwaremaniacs.org/soft/highlight/en/ --~--~-~--~-

Re: psycopg2 error in django

2007-04-28 Thread li liren
postgresql-8.2.3 and psycopg2-2.0.5.1.win32-py2.5-pg8.2.0 2007/4/28, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > > On Sat, 2007-04-28 at 20:39 +0800, li liren wrote: > > In django I use psycopg2 to connect to postgresql > > I test the DB setting in setting.py: > > >>> from django.db import connne

Re: psycopg2 error in django

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 20:39 +0800, li liren wrote: > In django I use psycopg2 to connect to postgresql > I test the DB setting in setting.py: > >>> from django.db import connnection > >>> cursor = connection.cursor() > > psyco_connect: dsn = 'user= dbname=test password=''' > connec

psycopg2 error in django

2007-04-28 Thread li liren
In django I use psycopg2 to connect to postgresql I test the DB setting in setting.py: >>> from django.db import connnection >>> cursor = connection.cursor() psyco_connect: dsn = 'user= dbname=test password=''' connection_setup: init connection object at 01460568, refcnt = 1 conn_connec

Re: can'tr start django server

2007-04-28 Thread Gerry Steele
Are you sure it isn't this http://code.djangoproject.com/ticket/4179 Which we discussed this morning? Grigory Fateyev wrote: > Hello Grigory Fateyev! > On Fri, 27 Apr 2007 17:24:24 +0400 you wrote: > > >> Hello! >> >> I use django on Debian Sarge and after a while (upgrade django to >> Revisi

Re: can'tr start django server

2007-04-28 Thread Grigory Fateyev
Hello Grigory Fateyev! On Fri, 27 Apr 2007 17:24:24 +0400 you wrote: > > Hello! > > I use django on Debian Sarge and after a while (upgrade django to > Revision: 5007) init script not running. First problem was in > mysqldb-python library, it was update anhd now runserver starts well. > What it

django

2007-04-28 Thread k.s.rathore
hi everyone. i am new here in django and the purpose of being here is i want some help and support regarding django framework. we are launching a large enterprise portal and after going through some suggestions , decided to work on this framework. i ll be glade to receive your response and nee

Re: Dev Server - Being Denied Admin Media

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 12:02 +0100, Christian Markwart Hoeppner wrote: > Make sure you have an allow all directive in your apache configuration > for that folder, and just in case, you might set your unix permissions > to 777 Please don't suggest that sort of change. Making files writable by every

Re: Dev Server - Being Denied Admin Media

2007-04-28 Thread Christian Markwart Hoeppner
Make sure you have an allow all directive in your apache configuration for that folder, and just in case, you might set your unix permissions to 777 or make sure the apache user is able to read that folder. Chris El s�b, 28-04-2007 a las 09:14 +, Bryan Veloso escribi�: > Permission denied: /

cannot get REQUEST_URI

2007-04-28 Thread omat * gezgin.com
I need to use the current request URI in a template. Thus, I am passing the uri as a context variable, which is: uri = request.META.get('REQUEST_URI') or request.META.get('PATH_INFO') When I use this expression in the test server, which uses the request.META.get('PATH_INFO'), everything is fine

Re: !NotSupportedError on latest SVN update

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 11:25 +0100, Gerry Steele wrote: > Malcolm Tredinnick wrote: > > Updated from how long ago? Last week? 0.95? 0.91? > > > Well > I've always been using SVN and i ran SVN update this morning. > > 4759 is the most recent update i can run. Okay, so that's a little bit before

Re: !NotSupportedError on latest SVN update

2007-04-28 Thread Gerry Steele
Malcolm Tredinnick wrote: > Updated from how long ago? Last week? 0.95? 0.91? > Well I've always been using SVN and i ran SVN update this morning. 4759 is the most recent update i can run. --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: !NotSupportedError on latest SVN update

2007-04-28 Thread Malcolm Tredinnick
On Sat, 2007-04-28 at 10:40 +0100, Gerry Steele wrote: > I just upgraded to latest SVN to get some new functionality and > everything broke: Updated from how long ago? Last week? 0.95? 0.91? > NotSupportedError at /vection/projects/ > server is too old to set charset > ... > Exception Value: >

!NotSupportedError on latest SVN update

2007-04-28 Thread Gerry Steele
I just upgraded to latest SVN to get some new functionality and everything broke: NotSupportedError at /vection/projects/ server is too old to set charset ... Exception Value: server is too old to set charset Exception Location: /usr/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-linux-i

Dev Server - Being Denied Admin Media

2007-04-28 Thread Bryan Veloso
Permission denied: /usr/local/lib/python2.5/site-packages/django/ contrib/admin/media/ Getting this message when I'm trying to access the admin. It's odd, because I didn't do any changing of permissions. Any reason this would happen -other- than the obvious? --~--~-~--~~

Re: Setting up psycopg2

2007-04-28 Thread HenrikG
Thanks for the tip Brian! I checked with pg_config --configure and found out that Postgresql was indeed built with "enable-thread- safety". (I had to install libpq-dev with apt-get to get the pg_config-command) About psycopg, on this site: http://www.initd.org/tracker/psycopg it says that you're