Re: ascii decode error bites again

2007-10-31 Thread Kenneth Gonsalves
On 01-Nov-07, at 10:06 AM, Karen Tracey wrote: > svn head, postgres 7.4.x, python 2.4 > > Traceback? I cannot recreate in my setup (considerably different: > svn newforms-admin, MySql 5.0, Python 2.5.1). It's probably > significant that the quote character in that string is curly, > thou

Re: Request for Leopard users

2007-10-31 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 02:46 -0400, Wilson MacGyver wrote: > My bad. > > using MacPython, I get > > >>> import locale > >>> locale.getdefaultlocale() > (None, 'mac-roman') > > using the /usr/bin/python that came with leopard though, I get > >>> import locale > >>> locale.getdefaultlocale() > ('e

Re: Request for Leopard users

2007-10-31 Thread Wilson MacGyver
My bad. using MacPython, I get >>> import locale >>> locale.getdefaultlocale() (None, 'mac-roman') using the /usr/bin/python that came with leopard though, I get >>> import locale >>> locale.getdefaultlocale() ('en_US', 'UTF8') On 11/1/07, Karen Tracey <[EMAIL PROTECTED]> wrote: > On 11/1/0

Re: Obscure error installing Django

2007-10-31 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 04:50 +, Julio César Carrascal Urquijo wrote: > I'm installing Django on a shared hosting account but I've been > fighting the las two hours with this error: > > /home//django_src/django/contrib/sessions/middleware.py in > process_request(self= object>, request=, > POST

Re: Request for Leopard users

2007-10-31 Thread Karen Tracey
On 11/1/07, Wilson MacGyver <[EMAIL PROTECTED]> wrote: > > > I too can confirm this. > > echo $LANG gives en_US.UTF-8 > > but using both /usr/bin/python which is the one that came > with OSX Leopard, or using the MacPython downloaded > from www.python.org at the path > /Library/Frameworks/Python.fr

Re: Request for Leopard users

2007-10-31 Thread Wilson MacGyver
I too can confirm this. echo $LANG gives en_US.UTF-8 but using both /usr/bin/python which is the one that came with OSX Leopard, or using the MacPython downloaded from www.python.org at the path /Library/Frameworks/Python.framework/Versions/Current/bin/python in both cases, >>> import locale >

Re: Obscure error installing Django

2007-10-31 Thread Julio César Carrascal Urquijo
I'm sorry. I'm using: 1) Python 2.3, Django from SVN and django-admin.py reports 0.97-pre- SVN-6635. 2) Subversion checkout on an empty folder. 3) It's running through FCGI (mod_fcgi) and a new user just for Django so I don't think it is another installation. Thanks On Oct 31, 11:57 pm, Malco

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 15:55 +1100, Malcolm Tredinnick wrote: [...] > Unfortunately, SQLite and MySQL with the MyIsam > storage engine won't raise complaints (since they don't enforce the > integrity) and MySQL with the InnoDB engine has what is really a bug in > that you can't use normal SQL synt

Re: Obscure error installing Django

2007-10-31 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 04:50 +, Julio César Carrascal Urquijo wrote: > I'm installing Django on a shared hosting account but I've been > fighting the las two hours with this error: Before going any further, you're going to have to say: (1) Which version of Django? In particular, what does "dj

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 00:43 -0400, George Vilches wrote: > Karen Tracey wrote: > > On 10/31/07, *George Vilches* <[EMAIL PROTECTED] > > > wrote: > > > > Or (I just saw your follow-up e-mail), is all of this a moot point since > > something like this is going to

Obscure error installing Django

2007-10-31 Thread Julio César Carrascal Urquijo
I'm installing Django on a shared hosting account but I've been fighting the las two hours with this error: /home//django_src/django/contrib/sessions/middleware.py in process_request(self=, request=, POST:) 13 engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) 14 se

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
Karen Tracey wrote: > On 10/31/07, *George Vilches* <[EMAIL PROTECTED] > > wrote: > > Or (I just saw your follow-up e-mail), is all of this a moot point since > something like this is going to be made totally invalid in the future? > > > That's it. Targeting

Re: ascii decode error bites again

2007-10-31 Thread Karen Tracey
On 10/31/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > ... I was able to replicate the > error when I cut and pasted the words 'users' group' from this web page: > > http://www.linuxindore2007.com/contact-linux-indore-2007/ > > svn head, postgres 7.4.x, python 2.4 Traceback? I cannot recr

Re: Request for Leopard users

2007-10-31 Thread Karen Tracey
On 10/31/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Can anybody using Apple's Leopard OS confirm #5846 exists by default? > > This is either a mistake on the part of the reporter or a total bozo bug > on Apple's part. I'd like to establish which. Though I'm not a Leopard user I've seen

Re: ascii decode error bites again

2007-10-31 Thread Kenneth Gonsalves
On 01-Nov-07, at 8:15 AM, Malcolm Tredinnick wrote: >> hi, >> am on unicode, unicode postgresql and unicode everywhere. When trying >> to save a model in admin, if it has ' or " in the text i get the >> programming error - ascii cannot decode etc ... Any clues? > > Based on the complete lack of

Re: Request for Leopard users

2007-10-31 Thread Lavoie Francis
I don't know how to reproduce this error. But If I check the comment : This is really a bug in Leopard. UTF-8 doesn't look like a valid value for the LANG environment variable. It should be something of the form language[_territory][.codeset], where UTF-8 is only the codeset part. LANG on my

Re: Request for Leopard users

2007-10-31 Thread Steve Lianoglou
Hi Malcom, > Can anybody using Apple's Leopard OS confirm #5846 exists by default? >From what you describe, it looks as if Leopard is doing the correct thing. You mention in the ticket comments: """ This is really a bug in Leopard. UTF-8 doesn't look like a valid value for the LANG environment

Request for Leopard users

2007-10-31 Thread Malcolm Tredinnick
Can anybody using Apple's Leopard OS confirm #5846 exists by default? This is either a mistake on the part of the reporter or a total bozo bug on Apple's part. I'd like to establish which. Thanks, Malcolm -- I don't have a solution, but I admire your problem. http://www.pointy-stick.com/blog/

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Karen Tracey
On 10/31/07, George Vilches <[EMAIL PROTECTED]> wrote: > Or (I just saw your follow-up e-mail), is all of this a moot point since > something like this is going to be made totally invalid in the future? > That's it. Targeting a non-unique column in a ForeignKey field is invalid. It's invalid now

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 23:05 -0400, George Vilches wrote: > Malcolm Tredinnick wrote: > >> > >> >>> Assembly.objects.select_related() > >> [, , >> Assembly object>, , >> object>, ] > >> >>> len(Assembly.objects.select_related()) > >> 6 > >> >>> Assembly.objects.select_related().count() > >> 2L

Re: Off Topic: Slug regular expression

2007-10-31 Thread Kristinn Örn Sigurðsson
It says the last slash is optional. On 11/1/07, cjl <[EMAIL PROTECTED]> wrote: > > > Thanks all. > > What is the second '?' for...I don't have it in my regular expression, > and it seems to be working fine. > -cjl > > > > > --~--~-~--~~~---~--~~ You received this m

Re: Model Validation - Best practices

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 18:05 -0700, Ken wrote: > > > On Oct 31, 6:07 pm, Ken <[EMAIL PROTECTED]> wrote: > > > > > I have a similar thing I wish to accomplish. It's not quite model > > validation, rather model completion. The form provides a field that > > fills one model field but has to be mu

Re: UnicodeError in admin in latest django

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 10:10 -0700, Bert Heymans wrote: > Malcolm, > > I found this thread, someone who claims to maintain the Python FAQ > says it's OK to use the routine but(!) only in sitecustomize.py: By "that routine", I guess you meant setdefaultencoding() [see the problem with top-posting.

Re: Off Topic: Slug regular expression

2007-10-31 Thread cjl
Thanks all. What is the second '?' for...I don't have it in my regular expression, and it seems to be working fine. -cjl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
Malcolm Tredinnick wrote: >> >> >>> Assembly.objects.select_related() >> [, , > Assembly object>, , > object>, ] >> >>> len(Assembly.objects.select_related()) >> 6 >> >>> Assembly.objects.select_related().count() >> 2L >> >> >> Since I'm using select_related(), I would expect it to follow the I

Re: Searches Across Many-to-Many with Intermediate Table

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 16:46 -0700, Andy Brody wrote: > Hi all, > > I'm using an intermediate table of Activities to relate Musicians, > Instruments, and Groups. Is there a good way to select groups from the > musician's activities? I've been doing stuff like [act.group for act > in theMusician.ac

Re: djangoAMF authentication, requests aren't carrying user credential

2007-10-31 Thread Tiger Uppercut
Any thoughts on this one? To summarize - using djangoAMF - want to login user through flex UI - flex UI method calls function authAndLoginVisitor(request,this_email,raw_password) - authAndLoginVisitor calls login(request,this_user) once this_user with this_email and raw_password is found in th

Re: Default value for ForeignKey

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 16:56 +, Dan Ellis wrote: > I have a model that contains a field, severity, that is a ForeignKey. > When I create a new instance, I'd like that field to have the id of > the Severity instance with the name 'Low'. What is the best way to do > this? Putting default=1 in the

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 18:45 -0400, George Vilches wrote: > First of all, thank you for the well thought-out response, I appreciate > your efforts. :) > > Here is the crux of the matter, without any examples, and you phrased it > best: > > "You've overridden that by > > specifying a to_field w

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 11:09 -0400, George Vilches wrote: > Stated simply: > queryset.select_related().count() with no filter criteria generates a > wrong query across a ForeignKey relationship. > > The problem: A QuerySet operation that involves a .count() across a > ForeignKey relationship doe

Re: ascii decode error bites again

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 19:47 +0530, Kenneth Gonsalves wrote: > hi, > am on unicode, unicode postgresql and unicode everywhere. When trying > to save a model in admin, if it has ' or " in the text i get the > programming error - ascii cannot decode etc ... Any clues? Based on the complete lack

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 20:35 +, mamcxyz wrote: > I don't call count manually. > > I'm doing: > > self.assertContains(self.response,u'Fallo el ingreso. Revise su clave > y usuario') > > assertContains is part of Django Test framework. ie: > > def assertContains(self, response, text, coun

Re: Off Topic: Slug regular expression

2007-10-31 Thread Kenneth Gonsalves
On 01-Nov-07, at 7:41 AM, Kristinn Örn Sigurðsson wrote: > r'^accounts/(?P[\w\-]+)/?$' r'^accounts/(?P[\w-]+)/?$' works for me - no need to escape the '-' if it is at the end -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~-

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-31 Thread girzel
Whoops, sorry, ignore that last... On Nov 1, 10:16 am, [EMAIL PROTECTED] wrote: > Ulf, did you ever figure this out? I don't use pgsql/psycopg, but I've > had the same issues with mod_python and competing framework/MacPort > installations of Python. And I didn't even know there was a > $PYTHONHOM

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-31 Thread girzel
Ulf, did you ever figure this out? I don't use pgsql/psycopg, but I've had the same issues with mod_python and competing framework/MacPort installations of Python. And I didn't even know there was a $PYTHONHOME variable. I've done everything I can to change paths and reroute framework- Python to

Re: MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX? Differences?

2007-10-31 Thread Kenneth Gonsalves
On 31-Oct-07, at 9:47 PM, Stupid Dustbin wrote: > MEDIA_ROOT the directory where you upload media > MEDIA_URL the url where your site media - css, js, icons etc live > ADMIN_MEDIA_PREFIX the alias to where the admin media lives - django/contrib/admin/media -- regards kg http://lawgon.livej

Re: Off Topic: Slug regular expression

2007-10-31 Thread Kristinn Örn Sigurðsson
I'm just replying to the first post. I would write it as follows: r'^accounts/(?P[\w\-]+)/?$' On 11/1/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > On 31-Oct-07, at 9:08 PM, cjl wrote: > > > Will these two regular expressions match the same strings? The both > > seem to work for me, bu

Re: Off Topic: Slug regular expression

2007-10-31 Thread Kenneth Gonsalves
On 31-Oct-07, at 9:08 PM, cjl wrote: > Will these two regular expressions match the same strings? The both > seem to work for me, but I couldn't find any information about the > importance of order between square brackets. dont put '-' between any letters in square brackets - to be on the saf

Re: Recommendations on running Django on Leopard

2007-10-31 Thread Kenneth Gonsalves
On 31-Oct-07, at 7:50 PM, Francis Lavoie wrote: > If you only plan to do developpement or testing, why is the > included web server not enought? if development and testing is the goal, then it is enough. But if you have plans of putting your app in production, it makes sense to duplicate

Re: TestCase breaks on contenttypes - possible bug in trunk?

2007-10-31 Thread appenz
Quick Addendum: The issue may be Mac only, on Linux behaviour seems to differ. Both Mac and Linux run Python 2.5.1 (self-compiled, not from the OS). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Model Validation - Best practices

2007-10-31 Thread Ken
On Oct 31, 6:07 pm, Ken <[EMAIL PROTECTED]> wrote: > > I have a similar thing I wish to accomplish. It's not quite model > validation, rather model completion. The form provides a field that > fills one model field but has to be munged to fill a second model > field. I thought the appropriat

TestCase breaks on contenttypes - possible bug in trunk?

2007-10-31 Thread appenz
Our team is currently developing our first project with Django, and so far (~10k lines of Django) it has been pure coding bliss. We recently hit a snag trying to use the python unit test framework. It seems that the error that we are seeing occurs even for an essentially empty Django project (see

Searches Across Many-to-Many with Intermediate Table

2007-10-31 Thread Andy Brody
Hi all, I'm using an intermediate table of Activities to relate Musicians, Instruments, and Groups. Is there a good way to select groups from the musician's activities? I've been doing stuff like [act.group for act in theMusician.activity_set.all()]. This works pretty well, except that there are

Re: serving django project through ssl and without ssl at the same time?!

2007-10-31 Thread Graham Dumpleton
On Nov 1, 3:15 am, lmierzej <[EMAIL PROTECTED]> wrote: > Thank you for your answer! To be more specific - I need to serve some > parts of the same > django project: > > a) through SSL > b) without SSL > c) with SSL and client certificates authentication (SSLVerifyClient) > > Is it possible without

Re: Model Validation - Best practices

2007-10-31 Thread Ken
On Oct 24, 12:11 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > In the interim, doing things in the save() method is possible, although > it's not a brilliantly nice design, since save() should never > raisevalidationerrors and, if it does, you won't get feedback to, say, the > admin inte

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
First of all, thank you for the well thought-out response, I appreciate your efforts. :) Here is the crux of the matter, without any examples, and you phrased it best: > "You've overridden that by > specifying a to_field whose value is not unique (allowing that may be > a bug in Django)." T

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread Karen Tracey
On 10/31/07, George Vilches <[EMAIL PROTECTED]> wrote: [snip] Here is what I want to count: > > "All the quantity of items necessary to complete all the selected > assemblies". > > That's not thinking in SQL, that's very much thinking about the objects > at hand. I have Assemblies, and I need to

Re: Search MySQL Full-Text

2007-10-31 Thread dunia
jacoberg2 wrote: > Hey I was just reading the tutorial about expanding the > search capability of django by using the full text search > of MySQL. At the end of the articale the author informs > us that there is a boolean search operator in the data > base api, this is the link he gave: > > http:/

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread guettli . google
> But all of this is besides the point, because one way or the other, > Django is doing *something* wrong. Sometimes the .count() returns 6, > and sometimes it returns 2 in the provided examples. About .distinct(): Django does not count: It uses 'SELECT count(*) ...'. The results you see are

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
koenb wrote: > First things first: I would either define a separate Group object > here, or use a many2manyfield if you don't need to know the group > numbers. The example was crafted because the actual models and data are part of a internal application that I am not allowed to publish the sourc

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread koenb
First things first: I would either define a separate Group object here, or use a many2manyfield if you don't need to know the group numbers. Second thing: why use the assembly object if you want to count items ? You are thinking to much in SQL instead of ORM. If you say Assembly.objects.count(),

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-31 Thread mamcxyz
I don't call count manually. I'm doing: self.assertContains(self.response,u'Fallo el ingreso. Revise su clave y usuario') assertContains is part of Django Test framework. ie: def assertContains(self, response, text, count=None, status_code=200): """ Asserts that a response

Looking for a developer

2007-10-31 Thread Adam Jenkins
The Institute of Design of Chicago, IL is seeking a Python developer to implement a contact and networking management application in Django. Most of the time you should be able to work from home, we will required a few meetings involving design and planning. Our office is at Institute of Design 3

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
[EMAIL PROTECTED] wrote: > On Wed, Oct 31, 2007 at 11:09:49AM -0400, George Vilches wrote: >> Stated simply: >> queryset.select_related().count() with no filter criteria generates a >> wrong query across a ForeignKey relationship. > > Hi, > > do you get the correct results, if you use .distinct

Re: QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread guettli . google
On Wed, Oct 31, 2007 at 11:09:49AM -0400, George Vilches wrote: > > Stated simply: > queryset.select_related().count() with no filter criteria generates a > wrong query across a ForeignKey relationship. Hi, do you get the correct results, if you use .distinct()? Distinct is not enabled by def

Re: MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX? Differences?

2007-10-31 Thread jacoberg2
Hey, You have the media root correct, it points to a file in the system that contains the media. It is good for file upload use. The media url is basically what serves up the files and media for you, it is basically a site url, like if ur in the develpoment server it owuld be something like http

Re: Recommendations on running Django on Leopard

2007-10-31 Thread Dmitri Fedortchenko
I am using the fink build of python and django works perfectly after an archive and install of leopard. I just did a fink selfupdate and update-all. //D On Oct 31, 6:38 pm, jeffself <[EMAIL PROTECTED]> wrote: > I had a lot of issues with Python under Macports previously. I > installed Python fr

Re: django.contrib.auth.views.password_change how to

2007-10-31 Thread Nathaniel Whiteinge
It's really as simple as including the view in your urlconf and copying the relevant template parts from Django. Here are two stripped- down examples. http://dpaste.com/23815/ http://dpaste.com/23814/ You can use the built-in login in much the same way. Just copy the relevant parts of the templa

Search MySQL Full-Text

2007-10-31 Thread jacoberg2
Hey I was just reading the tutorial about expanding the search capability of django by using the full text search of MySQL. At the end of the articale the author informs us that there is a boolean search operator in the data base api, this is the link he gave: http://www.djangoproject.com/documen

Re: Recommendations on running Django on Leopard

2007-10-31 Thread jeffself
I had a lot of issues with Python under Macports previously. I installed Python from source and I think I did the same thing with psycopg2. On Oct 31, 10:14 am, "Igor Kramer" <[EMAIL PROTECTED]> wrote: > You can see solution for psycopg2 herehttp://djangosearch.com/go-to-news/3588/ > > 2007/10/3

Re: Off Topic: Slug regular expression

2007-10-31 Thread Jeremy Dunck
On 10/31/07, cjl <[EMAIL PROTECTED]> wrote: ... > > > > Welcome to the transition between steps #1 and #2 ;) > > Actually, I think I'm still at step 0.5, the one where I wish someone > would post a library of frequently used Django URLconf regular > expressions, so I could 'borrow' them. > This i

Re: Off Topic: Slug regular expression

2007-10-31 Thread cjl
Thank you for the informative reply. > As you learn regular expressions, you'll go through a couple phases: > > 1) what the #$%^ is all this line-noise? > > 2) regexps rock! they'll solve any problem I throw at them! > > 3) regexps rock! I now know what types of problems the solve > well withou

Re: UnicodeError in admin in latest django

2007-10-31 Thread Bert Heymans
Malcolm, I found this thread, someone who claims to maintain the Python FAQ says it's OK to use the routine but(!) only in sitecustomize.py: http://groups.google.com/group/comp.lang.python/browse_frm/thread/464dc112819e0098/75748feab89498bd?lnk=gst&q=sys.setdefaultencoding#75748feab89498bd I'm

Default value for ForeignKey

2007-10-31 Thread Dan Ellis
I have a model that contains a field, severity, that is a ForeignKey. When I create a new instance, I'd like that field to have the id of the Severity instance with the name 'Low'. What is the best way to do this? Putting default=1 in the model breaks encapsulation. I could manually set it to Seve

Re: order_by problem passing dynamic parameters

2007-10-31 Thread [EMAIL PROTECTED]
Ok, now it works!! Thanks a lot On 31 Ott, 16:57, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > for example the field 'order' is set to: -publish_date,section > > > I know that in my view I can't do this: > > > Story.objects.filter(id

Re: "No fixtures found" error in tutorial

2007-10-31 Thread James Bennett
On 10/31/07, rhett <[EMAIL PROTECTED]> wrote: > Loading 'initial_data' fixtures... > No fixtures found. This is not an error. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message becaus

django.contrib.auth.views.password_change how to

2007-10-31 Thread Gigs_
can anyoune give me simple example how to use: django.contrib.auth.views.password_change? 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-u

"No fixtures found" error in tutorial

2007-10-31 Thread rhett
Hi List! I am a newbie to Python and Django and am trying to go through the tutorial. I am running Django 0.96. I have created a MySQL database but when I run "python manage.py syncdb" I get the following error: Loading 'initial_data' fixtures... No fixtures found. Also, I can't access the Welco

MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX? Differences?

2007-10-31 Thread Stupid Dustbin
Hi, I'm new to django and there is something that is confusing me about the differences between MEDIA_ROOT MEDIA_URL ADMIN_MEDIA_PREFIX from what I read so far, media_root seem to be the folder that django upload media files to. however for MEDIA_URL seem to be something like url/and ADMIN_ME

Re: serving django project through ssl and without ssl at the same time?!

2007-10-31 Thread lmierzej
Thank you for your answer! To be more specific - I need to serve some parts of the same django project: a) through SSL b) without SSL c) with SSL and client certificates authentication (SSLVerifyClient) Is it possible without mod_wsgi? Can use 3 VirtualHost configuration containers with plain m

Re: Off Topic: Slug regular expression

2007-10-31 Thread Tim Chase
>> Is there any difference between: >> >> r'^accounts/(?P[\w-]+)/$' >> >> and >> >> r'^accounts/(?P[-\w]+)/$' > > they match the same. To expand on Paul's answer, yes they're the same. The only time order matters is detailed at [1] where the character-set "[...]" notation is detailed. Namely

Re: Off Topic: Slug regular expression

2007-10-31 Thread Paul Rauch
On Wed, 31 Oct 2007 15:38:34 - cjl <[EMAIL PROTECTED]> wrote: > > I know next-to-nothing about regular expressions, so I apologize in > advance if my question is stupid. I am trying to match a slug field. > Is there any difference between: > > r'^accounts/(?P[\w-]+)/$' > > and > > r'^accou

Re: order_by problem passing dynamic parameters

2007-10-31 Thread Marty Alchin
On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > for example the field 'order' is set to: -publish_date,section > > I know that in my view I can't do this: > > Story.objects.filter(id_site=Site.objects.get_current().id).select_related().order_by(order) > > so...how can I do? You could

Re: order_by problem passing dynamic parameters

2007-10-31 Thread [EMAIL PROTECTED]
Hi, I resolver my first problem, but now I've another question... I need to specify in the 'order' field of Widget a list with multiple fields.. for example the field 'order' is set to: -publish_date,section I know that in my view I can't do this: Story.objects.filter(id_site=Site.objects.get_c

Off Topic: Slug regular expression

2007-10-31 Thread cjl
I know next-to-nothing about regular expressions, so I apologize in advance if my question is stupid. I am trying to match a slug field. Is there any difference between: r'^accounts/(?P[\w-]+)/$' and r'^accounts/(?P[-\w]+)/$' Will these two regular expressions match the same strings? The both

QuerySet.count() inaccurate across ForeignKey relationships

2007-10-31 Thread George Vilches
Stated simply: queryset.select_related().count() with no filter criteria generates a wrong query across a ForeignKey relationship. The problem: A QuerySet operation that involves a .count() across a ForeignKey relationship does not actually join in the ForeignKey tables to do the select_relate

Re: Customize Admin Object elements

2007-10-31 Thread äL
I would like to do the same. But if I try class Meta: ordering = ['name'] the drop down menu is still ordered by ID and not by name. Because name is in an other model (foreign key). This is my code: ### CODE ### class Person(models.Model): nameLast = models.CharField ('Nachnam

email example

2007-10-31 Thread Carl Karsten
I need to send email to a set of users. for now, let's assume all. What I have in mind: class MessageTemplate(models.Model): subject = models.CharField(maxlength=60, blank=False) body = models.TextField() User enters subject and body, hits "Save/Send" and some view code spins through

Re: ANN: Satchmo 0.6 Released

2007-10-31 Thread Jeremy Dunck
On 10/31/07, Chris Moffitt <[EMAIL PROTECTED]> wrote: > > There have been some spurious routing issues but it looks fine now. > Are you still not seeing it? Yep, up now. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: save() datefield

2007-10-31 Thread äL
No, I do not get any traceback. If any statement fails the exeption will redirect me back to the edit form. How can I force a traceback? It would be more helpfully if an error message will be returned. I will check soon if I can solve the problem with your hints. On 26 Okt., 14:01, Thomas Guettl

Re: Build the _complete_ aboslute URI...

2007-10-31 Thread Jens Diemer
[EMAIL PROTECTED] schrieb: > On Wed, Oct 31, 2007 at 09:06:58AM +0100, Jens Diemer wrote: >> >> With get_absolute_url() [1] we can build a URL of a model entry. The Problem >> is, >> this is not really a _complete_ URL. The protocol and domain is absent. >> >> I implemented this: >> ... > > The

Re: Recommendations on running Django on Leopard

2007-10-31 Thread Francis Lavoie
If you only plan to do developpement or testing, why is the included web server not enought? I upgrade to Leopard yesterday night. I'll reinstall django tonight, but I don't use apache or mod_python since it only a developpement front end. 2007/10/31, jeffself <[EMAIL PROTECTED]>: > > > I just i

ascii decode error bites again

2007-10-31 Thread Kenneth Gonsalves
hi, am on unicode, unicode postgresql and unicode everywhere. When trying to save a model in admin, if it has ' or " in the text i get the programming error - ascii cannot decode etc ... Any clues? -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~

Re: the old django-in-a-subdirectory problem

2007-10-31 Thread Kenneth Gonsalves
On 31-Oct-07, at 7:24 PM, [EMAIL PROTECTED] wrote: >> main apache, you *must* put it in ./webapps/ directory): > > One last question then I'll let this drop: Kenneth you mention putting > things directly into your webapps directory: I don't have write > permission in my webapps directory, how di

Re: Dictionnary problem trough session

2007-10-31 Thread Francis Lavoie
But Isn't the same thing as saving the object in the request["session"]["myobject"] ?. The dictionnary is not being erase entirely, but it is the associate value that are reset to empty string. I though at first that I might trigger the __init__ , but when I trace it, the object is not being reini

Re: Recommendations on running Django on Leopard

2007-10-31 Thread Igor Kramer
You can see solution for psycopg2 here http://djangosearch.com/go-to-news/3588/ 2007/10/31, jeffself <[EMAIL PROTECTED]>: > > > I just installed Leopard last night and haven't gotten around to > installing Django yet. Should I use the default Python installation > or should I install Python mysel

Recommendations on running Django on Leopard

2007-10-31 Thread jeffself
I just installed Leopard last night and haven't gotten around to installing Django yet. Should I use the default Python installation or should I install Python myself like I did in Tiger? Any issues with psycopg2 or the egenix stuff? I'm not worried about mod python yet since I'm still in the l

Re: the old django-in-a-subdirectory problem

2007-10-31 Thread girzel
> for what its worth, here is part of the httpd.conf file (smedia is > where the uploaded media is put, if you want to serve it from the > main apache, you *must* put it in ./webapps/ directory): One last question then I'll let this drop: Kenneth you mention putting things directly into your

login page?

2007-10-31 Thread Gigs_
hi im trying to use generic password_change. i log in and i go to change password. when i click on pass change link im redirected to login page, but im already loged in. so i think that something is not good with my login page. here is views.py login funct def login_page(request): if reques

Re: Build the _complete_ aboslute URI...

2007-10-31 Thread guettli . google
On Wed, Oct 31, 2007 at 09:06:58AM +0100, Jens Diemer wrote: > > > With get_absolute_url() [1] we can build a URL of a model entry. The Problem > is, > this is not really a _complete_ URL. The protocol and domain is absent. > > I implemented this: > ... The URL is absolute, since it starts w

Re: @login_required and sending user back to original page

2007-10-31 Thread crybaby
I added the hidden input "next" in my login.html and it works. Problem now is, I need to go back to the original page. The steps as follows: 1) user at original page 2) if user not logged in, then user logs in (@login_required decorator). 3) sent to a html view with form submission (http://1

Re: ANN: Security fix to i18n framework

2007-10-31 Thread Malcolm Tredinnick
On Wed, 2007-10-31 at 13:40 +0800, Jason Cui wrote: > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote: > > When I update my site from 0.96 to 0.96.1,my > internationalize function > > won't work fo

Re: ANN: Satchmo 0.6 Released

2007-10-31 Thread Chris Moffitt
That's embarrassing. It's up for me now. There have been some spurious routing issues but it looks fine now. Are you still not seeing it? -Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Vaga para programador(a) Django

2007-10-31 Thread Contratacao de Mao de Obra Tecnica em Sao Paulo - SP
Saudacoes a Todos, Surgiu 1(uma) vaga para programador Django em nossa equipe. Somos uma empresa localizada entre a Avenida Faria Lima e a Avenida Reboucas na cidade de Sao Paulo(SP) Trabalhamos com Django e gostariamos de aumentar o quadro de funcionarios com profissionais com experiencia em p

Re: ANN: Security fix to i18n framework

2007-10-31 Thread Jason Cui
2007/10/31, Jeremy Dunck <[EMAIL PROTECTED]>: > > > On 10/31/07, Jason Cui <[EMAIL PROTECTED]> wrote: > > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > > > > > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote: > > > > When I update my site from 0.96 to 0.96.1,my internationalize > funct

Re: ANN: Security fix to i18n framework

2007-10-31 Thread Jason Cui
2007/10/31, Jeremy Dunck <[EMAIL PROTECTED]>: > > > On 10/31/07, Jason Cui <[EMAIL PROTECTED]> wrote: > > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > > > > > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote: > > > > When I update my site from 0.96 to 0.96.1,my internationalize > funct

Build the _complete_ aboslute URI...

2007-10-31 Thread Jens Diemer
With get_absolute_url() [1] we can build a URL of a model entry. The Problem is, this is not really a _complete_ URL. The protocol and domain is absent. I implemented this: --- def get_absolute_uri(self):