Re: Django for internationalized sites - are models.User internationalized?

2010-10-01 Thread Torsten Bronger
Hallöchen! Andy writes: > According to documentation (http://docs.djangoproject.com/en/dev/ > topics/auth/), models.User contains: > > first_name > Optional. 30 characters or fewer. > last_name > Optional. 30 characters or fewer. > email > Optional. E-mail address. > > Are

Django for internationalized sites - are models.User internationalized?

2010-10-01 Thread Andy
According to documentation (http://docs.djangoproject.com/en/dev/ topics/auth/), models.User contains: first_name Optional. 30 characters or fewer. last_name Optional. 30 characters or fewer. email Optional. E-mail address. Are "first_name" & "last_name" limited to alphanumeric

Re: [Announcement] Vim for Python and Django

2010-10-01 Thread David M. Besonen
On Sun, 26 Sep 2010 11:36:06 +0200 Antoni Aloy wrote: > http://code.google.com/p/trespams-vim/ i assume you've seen Alain's webpage: VIM as Python IDE http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/ -- You received this message because you are subscribed to

Re: Full Text Search

2010-10-01 Thread m1chael
maybe i misunderstood your question, but maybe it will help On Fri, Oct 1, 2010 at 8:19 PM, m1chael wrote: > Hello! > > I use PostgreSQL, and this is how I accomplished a full text search: > > def search(request): >  # how to set up postgresql for full text searching >  #alter

Re: Full Text Search

2010-10-01 Thread m1chael
Hello! I use PostgreSQL, and this is how I accomplished a full text search: def search(request): # how to set up postgresql for full text searching #alter table quote_quote add column body_tsv tsvector; #CREATE TRIGGER quote_quote_tsvectorupdate BEFORE INSERT OR UPDATE ON quote_quote FOR

Re: Full Text Search

2010-10-01 Thread Andrej
Check this out: http://www.julienphalip.com/blog/2008/08/16/adding-search-django-site-snap/ On Oct 1, 6:52 am, Alessandro Ronchi wrote: > On Fri, Oct 1, 2010 at 3:35 AM, Steve Holden wrote: > > On 9/30/2010 8:26 PM, Nick Arnett wrote: > > >

Re: Vim for Python and Django

2010-10-01 Thread Antoni Aloy
2010/9/27 flebber : > OKay thanks for the tortoisehg link.I get an error when trying to use > the hg command > > > C:\>hg clone https://trespams-vim.googlecode.com/hg/ trespams-vim > requesting all changes > adding changesets > adding manifests > adding file changes > added

Re: Error

2010-10-01 Thread Steve Holden
On 10/1/2010 1:12 PM, Tsolmon Narantsogt wrote: > Hi there > > i got this error > > *Exception RuntimeError: 'maximum recursion depth exceeded while calling > a Python object' in > help me > Was this *really* the only output you got? [I suppose it's possible, given the nature of the error].

Re: Error

2010-10-01 Thread Jonathan Endersby
Hi You have a function or method that is calling itself. Something like this: def foo(): print "fun" bar = foo() print "never going to happen" J. On 01 Oct 2010 9:49 PM, "Tsolmon Narantsogt" wrote: > So how fix it ? > > On Sat, Oct 2, 2010 at 1:37 AM, Brandon

View to edit many-to-many relationship with extra fields

2010-10-01 Thread ses1984
http://docs.djangoproject.com/en/1.2/topics/db/models/#extra-fields-on-many-to-many-relationships I have two models with a many-to-many relationship through another table with extra fields. In this case, I have one extra field which represents the weight of the relationship. I'm working on a

Re: Error

2010-10-01 Thread Tsolmon Narantsogt
So how fix it ? On Sat, Oct 2, 2010 at 1:37 AM, Brandon Taylor wrote: > Sounds like you have an infinite loop. > > On Oct 1, 12:12 pm, Tsolmon Narantsogt wrote: > > Hi there > > > > i got this error > > > > *Exception RuntimeError: 'maximum recursion

Re: Change auth User display name in admin interface

2010-10-01 Thread Nathan
You, sir, are awesome. It worked perfectly. In case anyone else is wondering what I did: In models.py: # import the auth User from django.contrib.auth.models import User # Create the proxy model, inherits from User: class myUser(User): class Meta: proxy = True def

Re: [Announcement] Vim for Python and Django

2010-10-01 Thread Piotr Zalewa
Answering to ,yself... Just installed vim 7.3 colorcolumn=80 is perfect for that zalun On 10/01/10 17:40, Piotr Zalewa wrote: > It is great and I'm using it - I was using minibuf before, but somehow > your config convinced me to use NerdTree. > One question thought - I'd like to have the 80+

Need suggestions for autocomplete profile

2010-10-01 Thread Detectedstealth
Hi, I am using autocomplete on my site for country, state/province and city. Problem: Some people type USA instead of United States. NY instead of New York etc... Question: How can I make an auto complete field not accept anything except the data that is pulled from the database? -- You

Re: Error

2010-10-01 Thread Brandon Taylor
Sounds like you have an infinite loop. On Oct 1, 12:12 pm, Tsolmon Narantsogt wrote: > Hi there > > i got this error > > *Exception RuntimeError: 'maximum recursion depth exceeded while calling a > Python object' in > help me > > Thank you > Tsolmon -- You received this

PyDev create new project wizard creates two folders in Aptana Studio 3?

2010-10-01 Thread Brandon Taylor
Hi everyone, I'm used to organizing my Django projects in one folder for the project and then sub folders for app modules... /my_project -__init__.py -settings.py /some_app and so on. However, when I create a new Django project using the PyDev wizard, I get: /my_project

Error

2010-10-01 Thread Tsolmon Narantsogt
Hi there i got this error *Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in http://groups.google.com/group/django-users?hl=en.

Re: How do I troubleshoot mod_wsgi 404 admin issues

2010-10-01 Thread Bill Freeman
And thank you for the pointer to the modwsgi debugging page. On Fri, Oct 1, 2010 at 12:39 PM, dclaar wrote: > Just as a follow-up, > http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Python_Interactive_Debugger > was pretty helpful. In the end, it turned out to be

Re: [Announcement] Vim for Python and Django

2010-10-01 Thread Piotr Zalewa
It is great and I'm using it - I was using minibuf before, but somehow your config convinced me to use NerdTree. One question thought - I'd like to have the 80+ characters highlighted somehow. I found this: http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns but I guess it's

Re: How do I troubleshoot mod_wsgi 404 admin issues

2010-10-01 Thread dclaar
Just as a follow-up, http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Python_Interactive_Debugger was pretty helpful. In the end, it turned out to be one of those incredibly frustrating Regular Expression things, where the fix was to add a "^" anchor to a single RE. Without an “^”

Re: Full Text Search

2010-10-01 Thread Nick Arnett
On Fri, Oct 1, 2010 at 3:52 AM, Alessandro Ronchi < alessandro.ron...@soasi.com> wrote: > > > On Fri, Oct 1, 2010 at 3:35 AM, Steve Holden wrote: > >> On 9/30/2010 8:26 PM, Nick Arnett wrote: >> > Brain is mush, though. >> >> > Thank you. I'm waiting with hope :) > Brain

Re: Configuring URLs for different views

2010-10-01 Thread bruno desthuilliers
On 1 oct, 16:07, simon_saffer wrote: (snip) > My attempt at doing > this was to put the following in > urls.py in urlpatterns > > (r'^(?P[a-zA-Z0-9]*?\.html?)$', 'mysite.views.showPage') hint : named urls are cool > and then have a views.py in the mysite 'root' with

Re: Configuring URLs for different views

2010-10-01 Thread Carlton Gibson
On 1 Oct 2010, at 15:07, simon_saffer wrote: > In the web site I'm creating many of the pages will not be database > driven. > I am trying to set up my urls.py so that all pages that all extend the > base.html template > can be rendered in the same way. I'm sure that I shouldn't need a > unique

Configuring URLs for different views

2010-10-01 Thread simon_saffer
Hi, I'm completely new to Django so forgive me if this is a dumb question. In the web site I'm creating many of the pages will not be database driven. I am trying to set up my urls.py so that all pages that all extend the base.html template can be rendered in the same way. I'm sure that I

Re: UnicodeEncodeError

2010-10-01 Thread Benedict Verheyen
On 30/09/2010 18:47, jean polo wrote: > ok, thanks to everybody for the help but unfortunately nothing works > for my issue. > (except Karen one that solves it on one of my local machines but not > the other which has the same linux system... weird..). > > I guess I'll ask my client to rename

Re: UnicodeEncodeError

2010-10-01 Thread Klaas van Schelven
Hi all, I just ran into the same problem. Locally it doesn't occur, but it does on the server. I share Karen's analysis that the variable path of type unicode cannot be encoded into ascii. However, sys.getfilesystemencoding is also "UTF-8", so I don't see why os.stat would try to encode using

Re: With apache2 and mod_python I can't get static files loading in admin

2010-10-01 Thread Karim Gorjux
On Fri, Oct 1, 2010 at 15:17, Daniel Roseman wrote: > Either use > a DocumentRoot directive Thanks! I solved the problem using the directive. Thanks really a lot! :-) -- K. Blog Personale: http://www.karimblog.net -- You received this message because you are subscribed

Re: A better way of checking if a record exists

2010-10-01 Thread bruno desthuilliers
On 1 oct, 12:34, ALJ wrote: > ... what is the infamous obj.__dict__.update() hack? http://docs.python.org/library/stdtypes.html#mapping-types-dict http://docs.python.org/reference/datamodel.html http://www.google.fr/search?q=obj.__dict__.update() -- You received

Re: A better way of checking if a record exists

2010-10-01 Thread Thomas Guettler
Hi, I really would love the see this dictionary like access: obj=MyModel.objects.get(primary_key) if obj is None: ... does not exist. But the ticket was closed: http://code.djangoproject.com/ticket/5741 Thomas ALJ wrote: > I'm running through a spreadsheet to update customer info. It

Re: Full Text Search

2010-10-01 Thread Alessandro Ronchi
On Fri, Oct 1, 2010 at 3:35 AM, Steve Holden wrote: > On 9/30/2010 8:26 PM, Nick Arnett wrote: > > Brain is mush, though. > > Thank you. I'm waiting with hope :) -- Alessandro Ronchi http://www.soasi.com -- You received this message because you are subscribed to the

Re: A better way of checking if a record exists

2010-10-01 Thread ALJ
... what is the infamous obj.__dict__.update() hack? On Oct 1, 11:57 am, bruno desthuilliers wrote: > On 1 oct, 10:29, Shawn Milochik wrote: > > > > > For what it's worth, I use the get_or_create with the 'default' keyword to > > do this: > >

Re: Separating application media from project media

2010-10-01 Thread Thomas Weholt
>> I'm developing on Windows so i don't have the luxury of a nicely working >> symlink system :) > > ??? Windows is STILL not able to properly handle symlinks ??? > > OMG :( mklink might work. Didn`t know of this myself before I googled "symlinks in windows":

Re: A better way of checking if a record exists

2010-10-01 Thread bruno desthuilliers
On 1 oct, 10:29, Shawn Milochik wrote: > For what it's worth, I use the get_or_create with the 'default' keyword to do > this: > > for record in reader: > >     new_values = { >         'product_code': slugify(record['Product Code']), >         'msrp': record['Suggested

Re: Separating application media from project media

2010-10-01 Thread bruno desthuilliers
On 1 oct, 10:55, Benedict Verheyen wrote: > I found a solution that works for me. > In the application dir, i've made a media\calltracking directory where > the static files go. > I need the extra dirname in the path (the trailing calltracking), otherwise > i end up

Re: Separating application media from project media

2010-10-01 Thread Benedict Verheyen
On 1/10/2010 10:06, bruno desthuilliers wrote: > I don't think that's the case, and FWIW the OP's layout makes perfect > sense to me. His point is that even while all apps are in a same > project and share a common auth, they are otherwise totally (or > mostly ?) independent so it doesn't really

Re: Separating application media from project media

2010-10-01 Thread Ian Lewis
> FWIW, even for a more canonical "integrated" website / webapp composed > of distinct django apps, "assets" (app specific css, js, images and > whatnot) management can sometimes be a pain. My own solution so far is > to keep all app-specific static stuff in a /medias/ subir of > the app and

Re: Separating application media from project media

2010-10-01 Thread Thomas Weholt
On Fri, Oct 1, 2010 at 10:06 AM, bruno desthuilliers wrote: > On 30 sep, 22:45, Carles Barrobés wrote: >> If the ideal solution for you is different sites, one authentication, > > I don't think that's the case, and FWIW the OP's layout makes

Re: A better way of checking if a record exists

2010-10-01 Thread Shawn Milochik
For what it's worth, I use the get_or_create with the 'default' keyword to do this: for record in reader: new_values = { 'product_code': slugify(record['Product Code']), 'msrp': record['Suggested Retail'], #etc... } product, was_created =

A better way of checking if a record exists

2010-10-01 Thread ALJ
I'm running through a spreadsheet to update customer info. It takes quite a while and I was just trying to optimize things a bit. I want to check if the record is already there and if so update it with the newer data. If not append it to the table. Two code snippets below ... try: customer

Re: Unable to login to admin site in localhost

2010-10-01 Thread bruno desthuilliers
On 30 sep, 19:05, mamcx wrote: > As reported on :http://stackoverflow.com/questions/3817808/unable-to- > login-to-admin-site-in-localhost > > I can't login to the admin site on localhost. > > I try with firefox, IE. > > I try using the 127.0.0.1:8000 address. Also, I set

Re: Separating application media from project media

2010-10-01 Thread bruno desthuilliers
On 30 sep, 22:45, Carles Barrobés wrote: > If the ideal solution for you is different sites, one authentication, I don't think that's the case, and FWIW the OP's layout makes perfect sense to me. His point is that even while all apps are in a same project and share a common

Re: url not going to view

2010-10-01 Thread Carlton Gibson
On 30 Sep 2010, at 16:38, Bradley Hintze wrote: > OH, they're regular expressions, right? Ok, I need to try to > understand RE but they still escape any meaning for me somehow. Yeah, I think that's a meme. I can't really offer any advice beyond: - Just learn enough to get the URLs you need

Quirky tabular display for customized inline models?

2010-10-01 Thread Derek
I have a field which I need to reference in an override of the save() function (as part of the class MyModelInlineForm(forms.ModelForm)). However, I don't want that same field to appear in the inline tabular display. In the __init__ for form class, I have this: def __init__(self, *args,

Re: Possible backwards incompatibility introduced by change 12950 (in upgrade from 1.1.1 to 1.1.2)

2010-10-01 Thread Jyrki Pulliainen
On Oct 1, 3:30 am, Russell Keith-Magee wrote: > Not really -- I've tried to reproduce the 2 apps and three models you > describe, but I don't see any errors on 1.1.1 or 1.1.2. > > I appreciate that you can't release your actual source code, but if > you can generate a