Re: FormWizard Passing Data between forms

2009-10-13 Thread nabucosound
It is a common practice to pass extra parameters to the __init__ function of the form and save them as properties of the object that can be later on accessed by any method like the clean method: class MyForm(forms.Form): def __init__(self, extra_param=None, *args, **kwargs): self.ext

popup forms

2009-10-13 Thread andreas schmid
hi, how can i achieve a behaviour like in the admin backend where i can add a related object through a popup window and have it selectable after i saved the related form? for example: im copleting the form book and i have to select the author but it doesnt exist yet... so i click on the + (add)

Re: Rendering - too many values to unpack

2009-10-13 Thread Daniel Roseman
On Oct 13, 3:09 am, LuisC wrote: > Hi!!! > > I am having some trouble trying to output a database record to a > form > > **My form: > class ClientesFIForm(forms.Form): >     ClienteCodigo = forms.IntegerField(label='Codigo Cliente') >     ClienteNombre = forms.CharField(label='Nombre Cliente'

dilemma with urls and templates

2009-10-13 Thread rvandam
I am working on a site with a static part (i use the Djano tempate system to separate menu's and header from the content), and a dynamic part. For the static part i have a directory structure like: index.html page1.html page2.html request for / will load index.html A part of my urls.py: (r

Re: new permission

2009-10-13 Thread elminio
hi, It didnt help :/ On Oct 9, 10:33 am, "Bogdan I. Bursuc" wrote: > Try to delete the auth_permissions table the sync db > see if it helps > > On Fri, 2009-10-09 at 01:29 -0700,elminiowrote: > > Up Up > > > On Oct 8, 12:10 pm,elminio wrote: > > > Hi, > > > I've extended my model with new permi

Re: How to "convert" data of anonymous users who then sign up

2009-10-13 Thread Ned Batchelder
vpotter wrote: > Hm.. Using IP for this doesn't seem to be a good idea. What about > proxy users who will have proxy's IP or users of one subnetwork behind > the NAT? > I'd store some kind of id in user's cookies and then use it to detect > posts made by user anonymously > Yes, cookies are the

Re: Distance across a LineString in GeoDjango

2009-10-13 Thread Jani Tiainen
buttman kirjoitti: ls.srs.name > 'WGS 84' srs.units > (0.017453292519943282, 'degree') ls.length > 0.88329271346608429 > > So how do I go from degrees to miles? According to the docs, Distance > does not handle 'degrees' as a unit. Should I somehow convert to > another srs before I

authorization

2009-10-13 Thread elminio
Hi, By admin I can choose what users can do with model objects. And what about certain pages. Do I have to write if in everyone view method (to check is current user may access given view ? Or is there any built in tool that makes it possible to restrict access to given pages. thanks for help -

Re: authorization

2009-10-13 Thread Daniel Roseman
On Oct 13, 11:42 am, elminio wrote: > Hi, > > By admin I can choose what users can do with model objects. And what > about certain pages. Do I have to write if in everyone view method (to > check is current user may access given view ? > > Or is there any built in tool that makes it possible to r

django.admin custom action registration not working

2009-10-13 Thread DrKJam
Hi, I'm following the advice here :- http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ to try and add a custom action to the list display of one of my models in the admin interface. Sadly, as hard as I try, the option is not appearing in the drop down list. Anyone else have this p

Re: django.admin custom action registration not working

2009-10-13 Thread Daniel Roseman
On Oct 13, 11:55 am, DrKJam wrote: > Hi, > > I'm following the advice here :- > > http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ > > to try and add a custom action to the list display of one of my models in > the admin interface. > > Sadly, as hard as I try, the option is not app

Re: popup forms

2009-10-13 Thread nabucosound
This is the default behaviour in Django Admin, dude... On Oct 13, 9:43 am, andreas schmid wrote: > hi, > > how can i achieve a behaviour like in the admin backend where i can add > a related object through a popup window and have it selectable after i > saved the related form? > > for example: >

Re: authorization

2009-10-13 Thread nabucosound
And specifically the @login_required decorator... On Oct 13, 12:51 pm, Daniel Roseman wrote: > On Oct 13, 11:42 am, elminio wrote: > > > Hi, > > > By admin I can choose what users can do with model objects. And what > > about certain pages. Do I have to write if in everyone view method (to > >

Re: popup forms

2009-10-13 Thread andreas schmid
thx mate... but i need it on the front end ;) nabucosound wrote: > This is the default behaviour in Django Admin, dude... > > On Oct 13, 9:43 am, andreas schmid wrote: > >> hi, >> >> how can i achieve a behaviour like in the admin backend where i can add >> a related object through a popup wi

Re: How to "convert" data of anonymous users who then sign up

2009-10-13 Thread nabucosound
With Django sessions I think this can be done easily: http://docs.djangoproject.com/en/dev/topics/http/sessions/ On Oct 13, 12:08 pm, Ned Batchelder wrote: > vpotter wrote: > > Hm.. Using IP for this doesn't seem to be a good idea. What about > > proxy users who will have proxy's IP or users of

Re: popup forms

2009-10-13 Thread Andrew Ingram
I'm assuming you are doing this somewhere other than the admin, or in custom views, so I'll explain how the admin stuff works. Basically, when you create the popup window you give it a name which can be used the uniquely identify the field that is using the popup (some variant on the field id wou

Re: django.admin custom action registration not working

2009-10-13 Thread DrKJam
2009/10/13 DrKJam > > > 2009/10/13 Daniel Roseman > >> >> On Oct 13, 11:55 am, DrKJam wrote: >> > Hi, >> > >> > I'm following the advice here :- >> > >> > http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ >> > >> > to try and add a custom action to the list display of one of my mo

Re: django.admin custom action registration not working

2009-10-13 Thread DrKJam
2009/10/13 Daniel Roseman > > On Oct 13, 11:55 am, DrKJam wrote: > > Hi, > > > > I'm following the advice here :- > > > > http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ > > > > to try and add a custom action to the list display of one of my models in > > the admin interface. > >

Re: popup forms

2009-10-13 Thread andreas schmid
thank you very much for pointing me to the right path!! ill try to understand the behaviour and report about my progress... Andrew Ingram wrote: > I'm assuming you are doing this somewhere other than the admin, or in > custom views, so I'll explain how the admin stuff works. > > Basically, when y

Re: popup forms

2009-10-13 Thread Héctor García
Oh all right, sorry, I misread first paragraph On Tue, Oct 13, 2009 at 1:57 PM, andreas schmid wrote: > > thx mate... but i need it on the front end ;) > > nabucosound wrote: >> This is the default behaviour in Django Admin, dude... >> >> On Oct 13, 9:43 am, andreas schmid wrote: >> >>> hi, >>>

Re: popup forms

2009-10-13 Thread Emily Rodgers
On Oct 13, 1:20 pm, andreas schmid wrote: > thank you very much for pointing me to the right path!! > ill try to understand the behaviour and report about my progress... > > Andrew Ingram wrote: > > I'm assuming you are doing this somewhere other than the admin, or in > > custom views, so I'll

RE: showing user data in a view

2009-10-13 Thread Ed Kawas
Thanks, I guess I made it out to be harder than it was. Eddie -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Brian McKeever Sent: October-12-09 1:20 PM To: Django users Subject: Re: showing user data in a view You could write

Re: popup forms

2009-10-13 Thread andreas schmid
Emily Rodgers wrote: > > On Oct 13, 1:20 pm, andreas schmid wrote: > >> thank you very much for pointing me to the right path!! >> ill try to understand the behaviour and report about my progress... >> >> Andrew Ingram wrote: >> >>> I'm assuming you are doing this somewhere other than the

Re: dilemma with urls and templates

2009-10-13 Thread Bayuadji
Hi, Imho there's a MEDIA_URL field in settings, so you could use that, and uset {% MEDIA_URL %} in your template (you could also add template context processors) -djibon- On 10/13/09, rvandam wrote: > > I am working on a site with a static part (i use the Djano tempate > system to separate men

Re: dilemma with urls and templates

2009-10-13 Thread rvandam
I had to use {{ MEDIA_URL }} instead of {% MEDIA_URL %} (gave me a template error) Adding a template context processor was not option for me because for the static part i have no views/models defined. Thanks for the answer! I didnt think of solving it this way. Rob --~--~-~--~~-

displaying fields from 2 related models

2009-10-13 Thread grimmus
Hi, I have a model called Link that allows the user to save a URL with a title and description. The website i am making is full of Links users have added (like a bookmarking service) class Link(models.Model): user = models.ForeignKey(User) title = models.CharField(max_length=200) lin

Re: displaying fields from 2 related models

2009-10-13 Thread Héctor García
Once you have passed your links queryset to the template context, you can just do: {% for saved_link in links %} {{ saved_link.link.title }} {{ saved_link.link.pub_date }} {% endfor %} (embed your HTML dress and you're done) Cheers! Hector Garcia - Web developer, musician NomadBlue URI

Re: displaying fields from 2 related models

2009-10-13 Thread Tom Evans
On Tue, 2009-10-13 at 07:23 -0700, grimmus wrote: > Hi, > > I have a model called Link that allows the user to save a URL with a > title and description. The website i am making is full of Links users > have added (like a bookmarking service) > > class Link(models.Model): > user = models.For

error with limit_choices_to with complex queries (Q object) and raw_id_fields

2009-10-13 Thread fsaintma
hello I have a model.py like this : class secondaryGroup(models.Model): id = models.AutoField(primary_key = True) idGroup = models.ForeignKey(Group,db_column = 'idGroup',verbose_name = 'Groupe',limit_choices_to = Q(state='valid') | Q(state='modify')) idUser = models.ForeignKey(User,db_c

Re: displaying fields from 2 related models

2009-10-13 Thread grimmus
It's so simple, thanks alot for the speedy replies ! On Oct 13, 4:31 pm, Héctor García wrote: > Once you have passed your links queryset to the template context, you > can just do: > > {% for saved_link in links %} >     {{ saved_link.link.title }} >     {{ saved_link.link.pub_date }} > {% endfo

Check Constrains in Django

2009-10-13 Thread Geobase Isoscale
Hi All, I'm working with PostgreSQL database. I wonder how Django handles Check Constraints both (range and value based). To ensure integrity of data in the database as postresql does. How are they implemented in models and views. Please assist in this direction Many Thanks Isoscale --~--~-

Re: Apache WSGI DJANGO

2009-10-13 Thread Florian Strzelecki
I think the problem is not in your wsgi file, but in your apache's vhost configuration. You should have this in your vhost configuration, to use your django application with mod_wsgi : WSGIScriptAlias / /var/www/conf/myconf.wsgi So, you should add this line (if your admin/media is url /admin/medi

Re: compilemessages invalid multibyte sequence error

2009-10-13 Thread Bill Freeman
This may be a matter of using the correct encoding in the file. Be sure that the editor that you are using is treating the file as UTF-8. (I presume from the headers that the compile step is treating the file as UTF-8, but the editor may not look at that header, and may, for example, be using lati

directory name with space

2009-10-13 Thread luca72
Hello i have a small application where in the urls i have this : (r'^scarico/(\d+)/(\w+)/$', 'sitonorme.gestnorme.views.scarico'), the problem is that in the \w+ sometimes i have name with space li dir one that i can't rename. the folder that i pass for example is this: Request URL: http://12

Re: directory name with space

2009-10-13 Thread Михаил Лукин
Maybe you should try smth like this: (r'^scarico/(\d+)/(.+)/$', 'sitonorme.gestnorme.views.scarico'), On Tue, Oct 13, 2009 at 7:59 PM, luca72 wrote: > > Hello i have a small application where in the urls i have this : > > (r'^scarico/(\d+)/(\w+)/$', 'sitonorme.gestnorme.views.scarico'), > > the

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Arthur Metasov
Ok, moving this code to decoration function really good. And now do you want to add this template selection logic into third-party apps you using in this project? I have no idea. As i remember this is called monkey-patching >>> import test >>> def heh(func): ... def helper(): ... print "y" ..

Re: directory name with space

2009-10-13 Thread Tim Chase
>> Hello i have a small application where in the urls i have >> this : >> >> (r'^scarico/(\d+)/(\w+)/$', >> 'sitonorme.gestnorme.views.scarico'), >> >> the problem is that in the \w+ sometimes i have name with >> space li dir one that i can't rename. > > Maybe you should try smth like this: > >

Re: directory name with space

2009-10-13 Thread Михаил Лукин
Well, I don't know what is under scarico/(\d+)/ - single file or a directory tree. In case of directory tree ".+" seems to be the best way, which is also documented at http://docs.djangoproject.com/en/dev/howto/static-files/ In case of single file "[^/]+" instead of ".+" can be used. I think ther

Re: directory name with space

2009-10-13 Thread Tim Chase
Михаил Лукин wrote: > Well, I don't know what is under scarico/(\d+)/ - single file or a directory > tree. > > In case of directory tree ".+" seems to be the best way, which is also > documented at > http://docs.djangoproject.com/en/dev/howto/static-files/ > > In case of single file "[^/]+" inst

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Nan
Making request global definitely sounds like a potentially fragile solution. I noticed that the template loaders take a directory list argument, but it doesn't seem to ever get passed in -- it's not even an argument for loader.get_template() or loader.select_template(). One possibility might be

Re: Uploading an Image.

2009-10-13 Thread Arthur Metasov
2009/10/13 Chirolo > > Hi Arthur. > I'm not so experience with linux. > I can get to the directories and files of apparmor, but how do I > stopped. > Thank you. > Something like this > u...@host$ sudo /etc/init.d/apparmor stop > * Unloading AppArmor profiles

Re: authorization

2009-10-13 Thread Arthur Metasov
2009/10/13 elminio > > Hi, > > By admin I can choose what users can do with model objects. And what > about certain pages. Do I have to write if in everyone view method (to > check is current user may access given view ? > > Or is there any built in tool that makes it possible to restrict > acces

Re: new permission

2009-10-13 Thread Nan
Try deleting the table for the model in whose Meta class you're defining the permission. I believe permissions are added only when the table for the model they're defined in is created. On Oct 13, 5:08 am, elminio wrote: > hi, > > It didnt help :/ > > On Oct 9, 10:33 am, "Bogdan I. Bursuc" >

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Arthur Metasov
2009/10/13, Nan : > > Making request global definitely sounds like a potentially fragile > solution. I noticed that the template loaders take a directory list > argument, but it doesn't seem to ever get passed in -- it's not even > an argument for loader.get_template() or loader.select_template()

Re: compilemessages invalid multibyte sequence error

2009-10-13 Thread celopes
That was it. Eclipse was treating the file with the default encoding (in my case MacRoman). As soon as I changed the file properties to UTF-8 compilemessages worked fine (though I did have to fix every single encoded character in the file). Thanks for your help. CE On Oct 13, 11:45 am, Bill Fr

Re: directory name with space

2009-10-13 Thread Михаил Лукин
You're definitely right, that's why I mentioned additional tests in view function. I'm not sure about win and NTFS, but on *nix os.path.exists() will likely return False on such weird things as '\x01\x02', while whitelisting characters may lead to problems with internationalization (or we'll get a

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Grant Livingston
This wouldn't work? def view(request): if request.user.theme = "blue": --~--~-~--~~~---~--~~ 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 u

Display different widget in many-to-many intermediary class inline

2009-10-13 Thread Benjamin
Hello all, I have roughly the following model: class Room(models.Model): number = models.IntegerField(unique=True) def __unicode__(self): return str(int(self.number)) class Desk(models.Model): room = models.ForeignKey('Room', related_name="desks") people = models.ManyToM

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Grant Livingston
This wouldn't work? def view(request): if request.user.theme = "blue": template = "app/blue/template.html" elif request.user.theme = "yellow": template = "app/yellow/template.html" return render_to_response(template) --~--~-~--~~~---~--~~

Re: new permission

2009-10-13 Thread Михаил Лукин
Try ./manage reset auth On Tue, Oct 13, 2009 at 1:08 PM, elminio wrote: > > hi, > > It didnt help :/ > > On Oct 9, 10:33 am, "Bogdan I. Bursuc" > wrote: > > Try to delete the auth_permissions table the sync db > > see if it helps > > > > On Fri, 2009-10-09 at 01:29 -0700,elminiowrote: > > > Up

How to get ./manage.py test to stop spewing "Installing index for whatever"

2009-10-13 Thread Phlip
Djangoids: Unit tests should run as silent as possible, so we don't get too familiar with their spew. Ideally, any spew should raise your index of suspicion, and a test batch that always spews the same things might make you complacent to any exceptional spew. So, how to turn off the spew reporti

Re: Command "python manage.py runserver" causes import error

2009-10-13 Thread Ken
Thanks Karen for your reply, and sorry for the delay in my reply. It did turn out to be a PYTHONPATH issue. I finally solved it by 1. making sure the XP PYTHONPATH system variable exists and includes at least: C:\python26;C:\python26\Lib\site-packages\dd_django;C: \Python26\Lib;C:\Python26;C:\p

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Nan
The trouble is that I've got third-party apps that have their own views that don't include the template logic. so in thirdpartymodule.views.py: def thirdpartyview(request, vars): # Do lots of fancy processing return render_to_response('template.html', context) In my project, I need a

Re: How to get ./manage.py test to stop spewing "Installing index for whatever"

2009-10-13 Thread Михаил Лукин
./manage.py help test Does changing verbosity help? On Tue, Oct 13, 2009 at 10:59 PM, Phlip wrote: > > Djangoids: > > Unit tests should run as silent as possible, so we don't get too > familiar with their spew. Ideally, any spew should raise your index of > suspicion, and a test batch that alway

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Nan
True. I'd like to find a solution with as few places as possible to maintain changes, though. > Even if you patch django and add request argument to get_template you > also should rewrite all aplication views to push their requests into > get_template. > > It's quite simple to only patch views

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Михаил Лукин
Seems that any solution would be dirty, so why don't you set threadlocal variable with request and monkey-patch template loader? On Tue, Oct 13, 2009 at 11:03 PM, Nan wrote: > > > The trouble is that I've got third-party apps that have their own > views that don't include the template logic. > >

Re: How to get ./manage.py test to stop spewing "Installing index for whatever"

2009-10-13 Thread Phlip
Михаил Лукин wrote: > ./manage.py help test > Does changing verbosity help? Da! Thanks! and my theory was correct - I wasn't even noticing this one: Failed to install custom SQL for searchable.Searchable model: near "(": syntax error Don't worry about me I will fix it... But note the fixture

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Nan
Definitely one possibility. I've heard threadlocals is unreliable, though. Is that correct? Here's another option I'm considering Say thirdpartyview renders 'template.html'. I can write my own template.html that looks like so: {% extends 'template.html'|theme %} {% block someblock %}

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Nan
As an aside, it seems curious to me that in a generally flexible framework like Django a problem like this should have only a dirty solution. I've encountered a few instances where it would be useful to have access to request variables, but there's no way to pass them. On Oct 13, 3:10 pm, Миха

Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Михаил Лукин
Using template filters doesn't guarantee that given template is rendered in RequestContext, not in Context. so, you still have to use threadlocal to pass request through. You may look at middleware framework to save request variable at threadlocal in less dirty way. Also you may subclass template l

Re: Check Constrains in Django

2009-10-13 Thread Brian McKeever
Are you asking about the technical details of how it's done, or just how to do it? If the latter, django uses field and form level validation. http://docs.djangoproject.com/en/dev/ref/models/fields/#field-options http://docs.djangoproject.com/en/dev/ref/forms/fields/#ref-forms-fields On Oct 13

How to confirm a successfull/failed database insert call to the user

2009-10-13 Thread Sonal Breed
Hi all, I need to show a confirm message when the data is saves successfully in the database. My view function snippet is as following: def itemSave(request, id=None, d={}): if request.method == "POST": if request.method == "POST" and form.is_valid(): if action == 'Save

Re: Rendering - too many values to unpack

2009-10-13 Thread LuisC
Daniel, .get() was one of the several options I tried before with no results... When I use .get() the form only displays the submit button... I am asuming that that is because the template is specting a dictionary and I am only supplying a value... Also, .get() only returs the" __str__" value,

Re: How to confirm a successfull/failed database insert call to the user

2009-10-13 Thread Михаил Лукин
First of all, you don't need to check request.method == 'POST' twice; you don't need to check action here. Finally, you can use user messages to add and display confirmations: in view: http://docs.djangoproject.com/en/dev/topics/auth/#messages Put messages in base template and you can see them eve

Re: How to confirm a successfull/failed database insert call to the user

2009-10-13 Thread Sonal Breed
Thanks a lot Mihail :-) Really appreciate it. Thanks, Sincerely, Sonal. On Oct 13, 1:53 pm, Михаил Лукин wrote: > First of all, you don't need to check request.method == 'POST' twice; you > don't need to check action here. > Finally, you can use user messages to add and display confirmations: >

Re: Rendering - too many values to unpack

2009-10-13 Thread Daniel Roseman
On Oct 13, 9:41 pm, LuisC wrote: > Daniel, > .get() was one of the several options I tried before with no > results...  When I use .get() the form only displays the submit > button...  I am asuming that that is because the template is specting > a dictionary and I am only supplying a value... Wh

Re: Rendering - too many values to unpack

2009-10-13 Thread LuisC
Hi!!, well, I am trying to bind the form... It seems that I was a little harsh. You are right... your bind works perfectly and now the forms displays the data to be updated. OK with the get()... Thank You for your time and patience On Oct 13, 5:27 pm, Daniel Roseman wrote: > On Oct 13,

Re: Check Constrains in Django

2009-10-13 Thread Matt Schinckel
On Oct 14, 12:55 am, Geobase Isoscale wrote: > Hi All, > > I'm working with PostgreSQL database. > I wonder how Django handles Check Constraints both (range and value based). > To ensure integrity of data in the database as postresql does. > > How are they implemented in models and views. > Djan

in modeladmin - show a field to edit only if superuser

2009-10-13 Thread Sergio A.
I'd like to show for editing the 'owner' field only to superuser; I'm using django 1.0: class ProductAdmin(admin.ModelAdmin): form = ProductForm fieldsets = [ ('Product Identification', {'fields': ['owner', 'code', ...), ('Product Description', {'fields': ['...]

Re: Check Constrains in Django

2009-10-13 Thread Geobase Isoscale
Matt, I too prefer enforcing check constraints at database level ( database and model) as opposed to GUI(graphical user interface) i.e. (Forms). Do your mean that its not possible for Django to recognize postgreSQL defined Check constraints when data is entered in the Form? (or what do u mean by

Re: FormWizard Passing Data between forms

2009-10-13 Thread valhalla
Thanks for the reply... This is the kind of thing I am looking for. However I have tried this approach and I could not get it working exactly right. Along this line I have tried the following: class MyForm(forms.Form): def __init__(self, extra_param=None, *args, **kwargs): self.e

Re: Check Constrains in Django

2009-10-13 Thread Christophe Pettus
On Oct 13, 2009, at 4:46 PM, Geobase Isoscale wrote: > Do your mean that its not possible for Django to recognize > postgreSQL defined Check constraints when data is entered in the Form? That's correct. CHECK constraints on the PostgreSQL database are not automatically enforced at the form

Errors with forms submitted with whitespace

2009-10-13 Thread coolis_willis
Has anyone run into this a problem with forms throwing 500 errors when forms are submitted with just whitespace for a text field? Django 1.1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: trying to do ip based resolve

2009-10-13 Thread Kurt Neufeld
I'm replying to my own message because I was getting some strange behaviour and this is how I fixed it. I would occasionally see unformatted debug_toolbar output after my "under construction" page. I could reliably reproduce this "bug" (I think it's a bug but I have no idea where) via the

Re: Errors with forms submitted with whitespace

2009-10-13 Thread Michael
On Tue, Oct 13, 2009 at 8:03 PM, coolis_willis wrote: > > Has anyone run into this a problem with forms throwing 500 errors > when forms are submitted with just whitespace for a text field? > > Django 1.1 > Not here. What is the error? It would help to figure out a diagnoses. Michael --~--~

Re: error with limit_choices_to with complex queries (Q object) and raw_id_fields

2009-10-13 Thread Russell Keith-Magee
On Tue, Oct 13, 2009 at 10:43 PM, fsaintma wrote: > > hello > > I have a model.py like this : > > class secondaryGroup(models.Model): >   id = models.AutoField(primary_key = True) >   idGroup = models.ForeignKey(Group,db_column = > 'idGroup',verbose_name = 'Groupe',limit_choices_to = Q(state='val

Re: Check Constrains in Django

2009-10-13 Thread Matt Schinckel
On Oct 14, 9:57 am, Christophe Pettus wrote: > On Oct 13, 2009, at 4:46 PM, Geobase Isoscale wrote: > > > Do your mean that its not possible for Django to recognize   > > postgreSQL defined Check constraints when data is entered in the Form? > > That's correct.  CHECK constraints on the PostgreSQ

settings.configure vs DJANGO_SETTINGS_MODULE

2009-10-13 Thread Doug Blank
I'm trying to use django without resorting to setting the environment variable, by doing this: from django.conf import settings import mysettings settings.configure(mysettings, DEBUG=True) The mysettings.py originally just contained those in the default settings.py file. However, I keep getting

Re: Display different widget in many-to-many intermediary class inline

2009-10-13 Thread Benjamin
Please help :( On Oct 13, 1:52 pm, Benjamin wrote: > Hello all, > > I have roughly the following model: > > class Room(models.Model): >     number = models.IntegerField(unique=True) >     def __unicode__(self): >         return str(int(self.number)) > > class Desk(models.Model): >     room = mod

need hlep

2009-10-13 Thread Gin
when i set my test webserver root C:\app>django-admin.py startproject mysite I got a error msg Traceback (most recent call last): File "C:\Django\build\scripts-3.1\django-admin.py", line 2, in from django.core import management ImportError: No module named django.core what's wrong with

Re: need hlep

2009-10-13 Thread Rama Vadakattu
make sure you have installed the django properly. open a python shell: type : import django import django.core if the import does not work it means django has not installed properly. http://docs.djangoproject.com/en/dev/ On Oct 14, 9:32 am, Gin wrote: > when i set my test webserver root > > C:

Re: need hlep

2009-10-13 Thread Gin
Thanks a lot, i found the problem. I have a PY3.1 before,but the appengine tools doesn't work with it, so I uninstall it, and setup the PY2.5 now i have setup again, and it works now~ THANKS RAMA~! On Oct 14, 12:35 pm, Rama Vadakattu wrote: > make sure you have installed the django properly.

Re: Automatic user association, and confirmation page

2009-10-13 Thread Andrew Pendleton
Sorry for my lack of prompt response. Mostly, we want to hide the underlying user mechanism from the people that are going to use this admin interface. We want email addresses to be the unique identifiers in the system, and for records with the same email address to be automagically associated w

Just upgraded to 1.1, can't start development server, TypeError

2009-10-13 Thread eculver
I just tried upgrade to django 1.1, ran ./manage.py runserver, but was promptly halted due to this exception: ... File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/django/utils/translation/trans_real.py", line 180, in _fetch app = import_module(appname) F