newforms validator_list

2008-01-19 Thread Daniel
Hello, As I understand it the model field paramater "validator_list" is now being phased out with newforms. I'm using newforms-admin, and am in need of a similar way of doing validation. Are there any hooks or even hacks available that could achieve this? I understand the preferred method is

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Karen Tracey
On Jan 20, 2008 12:31 AM, Roboto <[EMAIL PROTECTED]> wrote: > > whoops - here is the re-edited pastebin > > http://pastebin.com/m225477f8 > So is loginForm coming from beta.website.forms? It's the definition of loginForm that would be most helpful to see. Karen > On Jan 19, 11:36 pm, "Karen

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto
and here is the beta.website.forms code http://pastebin.com/m79fa445e On Jan 20, 12:31 am, Roboto <[EMAIL PROTECTED]> wrote: > whoops - here is the re-edited pastebin > > http://pastebin.com/m225477f8 > > On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > On Jan 19, 2008 2:02

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto
whoops - here is the re-edited pastebin http://pastebin.com/m225477f8 On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote: > > > > > > > I've made my own custom error list and the response I continue to get > > is this when

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto
Hey Karen, I've reapplied pastebin - the error that line 22 is pointing to is the call form = loginForm(data, error_class=pError) line On Jan 19, 11:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote: > > > > > > > I've made my own

Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde
Terrific; thank you. The book was right, I got got carried away with some copy and pasting. On Jan 19, 8:30 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 19, 2008 9:37 PM, Lee Hinde <[EMAIL PROTECTED]> wrote: > > > > > [snipped] > > > > from django.conf.urls.defaults import * > > > #

Re: Another database for unit tests

2008-01-19 Thread Jim Crossley
"James Bennett" <[EMAIL PROTECTED]> writes: > On Jan 19, 2008 10:24 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: >> Yes, I knew I could override the NAME, but I'd like to override the >> ENGINE,USER,PASSWORD,HOST, and PORT, too. Our settings are configured >> for mysql/innodb, to match our

Re: Another database for unit tests

2008-01-19 Thread James Bennett
On Jan 19, 2008 10:24 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: > Yes, I knew I could override the NAME, but I'd like to override the > ENGINE,USER,PASSWORD,HOST, and PORT, too. Our settings are configured > for mysql/innodb, to match our production environment. But as our > test suite and

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Karen Tracey
On Jan 19, 2008 2:02 PM, Roboto <[EMAIL PROTECTED]> wrote: > > I've made my own custom error list and the response I continue to get > is this when I try to use it. > > TypeError at /login/ > __init__() got an unexpected keyword argument 'error_class' > Request Method: POST > Request URL:

Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Karen Tracey
On Jan 19, 2008 9:37 PM, Lee Hinde <[EMAIL PROTECTED]> wrote: > > [snipped] > > > from django.conf.urls.defaults import * > > # from winesite.winecomp import views > > > > urlpatterns = patterns('', > > # Example: > > # (r'^winesite/', include('winesite.foo.urls')), > > > > # Uncomment this for

Re: Another database for unit tests

2008-01-19 Thread Jim Crossley
Thanks, but... "James Bennett" <[EMAIL PROTECTED]> writes: > On Jan 19, 2008 5:05 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: >> What's the common way of making unit tests use a different database >> than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}? > >

Re: ImageField Example

2008-01-19 Thread Kenneth Gonsalves
On 19-Jan-08, at 6:02 PM, Darthmahon wrote: > Does anyone have a working example of uploading images using Django? > I've looked extensively and haven't found anything - any idea how I > save images using Django? I've put an ImageField in my model with the > path to where it should save, but

Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde
On Jan 19, 6:25 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > On Jan 19, 6:06 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > > > > > Hi; > > > I have the admin site working, now I'm trying to add my first > > standalone form. > > > Working from the 'simple' example from Chapter 7 of the book. I've > >

Re: Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde
On Jan 19, 6:06 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > Hi; > > I have the admin site working, now I'm trying to add my first > standalone form. > > Working from the 'simple' example from Chapter 7 of the book. I've > adapted it to my practice project. > > After modifying the urls.py file I

Problem with url conf from chapter 7 of djangobook

2008-01-19 Thread Lee Hinde
Hi; I have the admin site working, now I'm trying to add my first standalone form. Working from the 'simple' example from Chapter 7 of the book. I've adapted it to my practice project. After modifying the urls.py file I get this error when trying to access anything, including admin: Error

Re: Another database for unit tests

2008-01-19 Thread James Bennett
On Jan 19, 2008 5:05 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: > What's the common way of making unit tests use a different database > than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}? http://www.djangoproject.com/documentation/settings/#test-database-name -- "Bureaucrat

Another database for unit tests

2008-01-19 Thread Jim Crossley
What's the common way of making unit tests use a different database than what's in settings.DATABASE_{ENGINE,USER,PASSWORD,HOST,PORT}? Thanks, Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Incorrect ImageField get_file_url() output on Windows?

2008-01-19 Thread Alex Koshelev
What path is saved into field? On 19 янв, 23:38, tom <[EMAIL PROTECTED]> wrote: > I'm doing local development on XP, and with the exeception of this, it > has worked really well. In my settings.py, I have > > MEDIA_ROOT = 'C:/worker/cms/media/' > MEDIA_URL = 'http://localhost:8000/docs/' >

Re: tagging

2008-01-19 Thread Chris
Never mind had a brain fart. I should use models.ForeignKey(ContentType,). On Jan 19, 4:36 pm, Chris <[EMAIL PROTECTED]> wrote: > Hello I wrote a tagging app and it is not validating when I attempt to > install it into my database. The error is related to the TAG_FILTER > tuple located in my

tagging

2008-01-19 Thread Chris
Hello I wrote a tagging app and it is not validating when I attempt to install it into my database. The error is related to the TAG_FILTER tuple located in my models file. Its not validating b/c the table does not exist. Does anyone know of a better way of doing what I am trying to accomplish.

Re: limit_choices_to in ModelForm

2008-01-19 Thread James Bennett
On Jan 19, 2008 3:51 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > I have a limit_choices_to in my model - but this does work on my > ModelForm. How do I do this? Either set up the ModelChoiceField manually and specify the QuerySet, or hang on while I get around to adding tests to the patch

Re: How sublcass a form and get the fields not on top?

2008-01-19 Thread Pigletto
> However, if I subclass this form this fields get on TOP of it (I > prefer have it on bottom or in the middle). Exist a way to control > this? If you're talking about fields order then try: class AnotherCityForm(CityForm): def __init__(self, *args, **kwargs): super(AnotherCityForm,

Re: Strange Many-to-Many relationship question

2008-01-19 Thread Darthmahon
Ahh thanks for the reply Alex - didn't realise you could use get_profile within the template! :) Working perfectly now. On Jan 19, 7:46 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > If you try to iterate through `friends` then you can access to avatar > like so: > {{friend.get_profile.avatar}}

Incorrect ImageField get_file_url() output on Windows?

2008-01-19 Thread tom
I'm doing local development on XP, and with the exeception of this, it has worked really well. In my settings.py, I have MEDIA_ROOT = 'C:/worker/cms/media/' MEDIA_URL = 'http://localhost:8000/docs/' ADMIN_MEDIA_PREFIX = '/media/' and then in a model: imagefile =

Re: Strange Many-to-Many relationship question

2008-01-19 Thread Alex Koshelev
In your template people_list is list of UserProfile instances so avatar is accessed by {{people.avatar}} If you try to iterate through friends that you can access to avatar like so: {{friend.get_profile.avatar}} Of course if you set proper AUTH_PROFILE_MODULE setting. On 19 янв, 22:24,

Re: Strange Many-to-Many relationship question

2008-01-19 Thread Alex Koshelev
If you try to iterate through `friends` then you can access to avatar like so: {{friend.get_profile.avatar}} Of course if you set proper AUTH_PROFILE_MODULE setting. On 19 янв, 22:24, Darthmahon <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using the built in authentication of Django, so new users

Strange Many-to-Many relationship question

2008-01-19 Thread Darthmahon
Hi, I'm using the built in authentication of Django, so new users who register go through the User model. I also have a custom UserProfile model that links directly to the User model via a ForeignKey. This is my completed UserProfile model: # File: people/models.py

How sublcass a form and get the fields not on top?

2008-01-19 Thread mamcxyz
Hi, I have a community website where is important set the city of difierent things (events, news, etc...). So, I have this form: class CityForm(forms.Form): country = forms.ModelChoiceField(queryset=Country.objects.all(), help_text=u'País del evento. Para eventos en internet o en varias

How to check if my 1-1 record is there?

2008-01-19 Thread John M
I am using a one-to-one relationship (I know I know...), and i'm using the Super() to create the record in one of my save() routines. My question is, how do I check to see if a record is already linked to an existing 1-1 record? For example Model A(): Field 1 = charfield() field 2 =

Help with either setting or lack of knowledge of Custom error_class

2008-01-19 Thread Roboto
I've made my own custom error list and the response I continue to get is this when I try to use it. TypeError at /login/ __init__() got an unexpected keyword argument 'error_class' Request Method: POST Request URL:http://beta.ready-ready.org/login/ Exception Type: TypeError

Re: Running django+apache on my macbook

2008-01-19 Thread John M
sng, Thank you for the offer. Thats a great idea, and one I will probably purse, and if I have any issues, I'll post them here, but thanks for the phone offer, thats is most generous. John On Jan 19, 10:30 am, luxagraf <[EMAIL PROTECTED]> wrote: > Since I wrote that little guide Heather links

Re: Running django+apache on my macbook

2008-01-19 Thread luxagraf
Since I wrote that little guide Heather links to, I should point out that while the mod_python bit works fine, the real problem on a macbook with Leopard installed ends up being mysqldb (see ). I never have been able to successful compile a

admin page seg faults

2008-01-19 Thread Heather
Has anyone had this problem and fixed it? This is happening using apache2, mod_python, & mysql on ubuntu. The rest of the site works just fine. I have the same exact project on my development machine (os x, apache2, mod_python, mysql) and there is no problem at all w/ the admin. I am at a

Re: Running django+apache on my macbook

2008-01-19 Thread Heather
You have to do some editing to make it work for 64 bit. If you google mod_python leopard 64 bit you'll find some pages. Here is one... http://blog.wired.com/monkeybites/2007/11/tips-and-tricks.html I have a macbook pro and am running django w/ mod_python and the built in apache2 and mysql. On

ANN: Django meetup @Bangalore, India on 26th Jan

2008-01-19 Thread Ramdas S
The Bangalore Python User Group, BangPypers is planning a Django special meetup on the 26th of January 2008, Saturday. The venue is *ThoughtWorks Technologies (India) Pvt Ltd. 2nd Floor, Tower C, Corporate Block, Diamond District Airport Road, Bangalore - 560 008, India t: +91 80 2508 9572 f:

Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]
Yes, you are right. i use Editplus, i found this is a big problem. thanks! > indentation matters in Python. > > for the above code to work, the return statement should be aligned with > the "if" statement, not the "results = []" > > judging from your post, you've used spaces for some of the

manage.py dbshell not working

2008-01-19 Thread shabda
I am trying to use the manage.py dbshell call. I give the command, F:\djangoprojects\polls>manage.py dbshell This is giving me an error like F:\djangoprojects\polls> ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) However in my settings.py I have set the user

Re: best practices for a production site

2008-01-19 Thread Ned Batchelder
Updating to just a particular revision may work, but it is very easy for the trunk to get into a state where it would be hard to pick out just the fixes by updating specific files to specific revisions. This is labor intensive and confusing, and therefore error prone. Other people in this

Re: svn hook to update dev server svn & restart server.

2008-01-19 Thread dall
also I get this error when I commit: Warning: 'post-commit' hook failed with error output: svn: Can't open file '.svn/lock': Permission denied --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

svn hook to update dev server svn & restart server.

2008-01-19 Thread dall
Hello, Now I'm trying to create svn post-commit hook, who will update dev server svn and restart server. post-commit #!/bin/bash PROJDIR="/opt/system/chill" PIDFILE="$PROJDIR/chill.pid" SOCKET="$PROJDIR/chill.sock" cd $PROJDIR && svn update && ./restart.sh restart.sh #!/bin/bash #

ImageField Example

2008-01-19 Thread Darthmahon
Hey, Does anyone have a working example of uploading images using Django? I've looked extensively and haven't found anything - any idea how I save images using Django? I've put an ImageField in my model with the path to where it should save, but how do I tell Django to save it when a form is

Re: Django Tutorial02 / TEMPLATE_DIRS

2008-01-19 Thread code_berzerker
This was one of my most stupid problems. PyDev with RSE was not saving file fo linux virtual machine correctly and this caused the problem. Thank you for all the help. I hope, I'll come up with wiser problems next time ;) --~--~-~--~~~---~--~~ You received this

Free softwares & more only @... ns-ismail.page.tl

2008-01-19 Thread [EMAIL PROTECTED]
Hai friends Log on to http://ns-ismail.page.tl/ to get (download) software's and all other accessories for free in http://ns-ismail.page.tl/ . To get free gift's Log on to http://ns-ismail.page.tl/ and so on. The site consist of many useful material's like Google search, games, and etc. Download

limit_choices_to in ModelForm

2008-01-19 Thread Kenneth Gonsalves
hi, I have a limit_choices_to in my model - but this does work on my ModelForm. How do I do this? -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ Foss Conference for the common man: http://registration.fossconf.in/web/

Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > all code came from here: > http://djangobook.com/en/1.0/chapter07/ > in my view: > def search(request): > query = request.GET.get('q', '') > if query: > qset = ( > Q(title__icontains=query) | > Q(forum__title__icontains=query) |

Re: got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]
it is ok now, due to aligning of return render_to_response("groups/ search.html", { On 1月19日, 下午4时28分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > all code came from here:http://djangobook.com/en/1.0/chapter07/ > > in my view: > def search(request): > query = request.GET.get('q',

got error when use code of djangobook chapter 7 for searching

2008-01-19 Thread [EMAIL PROTECTED]
all code came from here: http://djangobook.com/en/1.0/chapter07/ in my view: def search(request): query = request.GET.get('q', '') if query: qset = ( Q(title__icontains=query) | Q(forum__title__icontains=query) | Q(color__icontains=query)