Re: Forms - Widget - Radioselect - how to set initial value on a static form

2010-06-23 Thread euan.godd...@googlemail.com
Karen's suggestion is great. You can also pass initial data into the form constructor. So using the example above if you do (in your view): my_form = F1(initial=dict(rs_field='N')) you'll achieve the same result. Don't think there's much to be said for either way other the way I just suggest migh

Re: How to options by limited_choices_to ?

2010-06-23 Thread euan.godd...@googlemail.com
First of all you might want to reconsider not using the name "type" for one of your fields as it is a builtin in python. I guess what you could do it limit the choices using the choices keyword in the field constructor. However, since this appears to be dynamic you would need to set it in the mode

Re: Django-Mysql

2010-06-23 Thread Eduan
Thanks to everyone that replied. I got an friend that knows more about these stuff and he fixed it. Not sure how -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe f

Re: virtual currency / check-in apps

2010-06-23 Thread Daniel Hilton
No but you can do 'badges' or awards with this: http://bitbucket.org/jiaaro/django-badges/src HTH Dan On 23 June 2010 00:28, Greg Pelly wrote: > Can anyone recommend any apps/tools for implementing either virtual currency > or "check-ins" in Django? > Thanks, > > Greg > > -- > You received this

An idea for a serialization framework

2010-06-23 Thread Andy Kelley
I am coming up with a framework that helps serialization of models. My idea is for each field to have a view permissions level: PUBLIC, OWNER, or ADMIN. I want to have a model to dict function that takes 2 arguments, permission_level and serialize_chain. Firstly, let me explain how it would change

Re: An idea for a serialization framework

2010-06-23 Thread Andy Kelley
God damn it, the most dangerous thing about Dvorak is hitting tab instead of or along with apostrophe. "don't " translates into "don'" Anyways, I think this idea has merit - even alongside a role-based security system. Feedback? On Jun 23, 3:29 am, Andy Kelley wrote: > I am coming up with a fr

Re: An idea for a serialization framework

2010-06-23 Thread Andy Kelley
I posted this to django-developers instead, so if you want to reply go find that thread and do it there. On Jun 23, 3:33 am, Andy Kelley wrote: > God damn it, the most dangerous thing about Dvorak is hitting tab > instead of or along with apostrophe. "don't " translates into > "don'" > > Anyways

trouble with many to many form

2010-06-23 Thread netremo
Hi all. I'm new to django. Help me pls. Situation: Need form on web page that look like this: --- Item order form Your name: [___] Tel : [] etc. item1_name_here | count [___] item2_name_here | count [___] ... it

mysql fulltext search

2010-06-23 Thread Henrik Genssen
Hi, is there more information/examples available on fulltext with mysql as the statement here, that it exists as __search: http://docs.djangoproject.com/en/1.1/ref/models/querysets/ I would like to do something like this: http://dev.mysql.com/doc/refman/5.1/de/fulltext-search.html having more th

Re: trouble with many to many form

2010-06-23 Thread Casey S. Greene
I am also pretty new to django but I think that what you are looking for is the many to many through relationship: http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships Maybe someone else can provide more information if that doesn't get you started.

Re: trouble with many to many form

2010-06-23 Thread Василий Паньшин
It's not casual form 2010/6/23 Casey S. Greene > I am also pretty new to django but I think that what you are looking for is > the many to many through relationship: > > > http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships > > Maybe someone else

Limiting choices in an admin inline

2010-06-23 Thread Dan Fairs
Hi, I'm trying to limit choices in an admin inline foreign key dropdown. I have a models.py and admin.py roughly as follows: # models.py class Trip(object): title = models.CharField(max_length=50) class Departure(object): trip = models.ForeignKey('Trip') price_window = models.Foreig

Problem with DateField input_formats

2010-06-23 Thread bax...@gretschpages.com
I have: DATE_INPUT_FORMATS = ( '%n/%j/%Y', '%n/%j/%y', # '10/25/2006', '10/25/06' '%n-%j-%Y', '%n-%j-%y', # '10-25-2006', '10-25-06' '%M %j %Y', '%M %j, %Y', # 'Oct 25 2006', 'Oct 25, 2006' '%b %j %Y', '%b %j, %Y', # 'oct 25 2006', 'oct 25, 2006' '%F %j %Y', '%F %j, %Y', # 'O

Django logging

2010-06-23 Thread thusjanthan
Hi, I am creating a new django framework and figured django would come with its own logging feature. I found this one that Fraser wrote but is no longer in development (http://code.google.com/p/django-logging/ wiki/Overview) Can anyone suggest me a django logging project to log debug/error message

root_path in admin sites is None

2010-06-23 Thread Filip Gruszczyński
After migrating to 1.2 I encountered a problem in admin panel. My change password ang logout links look like this: https://example.com/admin/Nonelogout/ https://example.com/admin/Nonepassword_change/ I have taken a look into django source and it seems, that root_path is None (at least this variab

django-tagging registering

2010-06-23 Thread Jonathan Hayward
I have, in my code: import tagging class Entity(models.Model): ... tagging.register(Entity) I'm getting an error. So far as I can tell, this is the only time tagging.register() is called, although I do call admin.site.register(Entity). Any ideas how I might be making a redundant request? I

Re: Problem with DateField input_formats

2010-06-23 Thread Karen Tracey
On Wed, Jun 23, 2010 at 11:34 AM, bax...@gretschpages.com < mail.bax...@gmail.com> wrote: > I have: > > DATE_INPUT_FORMATS = ( >'%n/%j/%Y', '%n/%j/%y', # '10/25/2006', '10/25/06' >'%n-%j-%Y', '%n-%j-%y', # '10-25-2006', '10-25-06' >'%M %j %Y', '%M %j, %Y', # 'Oct 25 2006', 'Oct 25, 2

Re: django-tagging registering

2010-06-23 Thread Karen Tracey
On Wed, Jun 23, 2010 at 11:52 AM, Jonathan Hayward < christos.jonathan.hayw...@gmail.com> wrote: > what is an appropriate way to guarantee that Entity is only registered > once? > Yes, it happens because models.py may be imported more than once. You should put admin registrations in an admin.py

Django ModelAdmin doesn't seem to save m2m fields with save_model

2010-06-23 Thread Xavier Ordoquy
Hi, I have some trouble understanding how ModelAdmin do save models when those have many to many fields. Long story: I have for one of my application overridden ModelAdmin class and the save_model. Basicaly, the save_model is: def save_model(self, request, obj, form, change): super(Transla

Re: root_path in admin sites is None

2010-06-23 Thread carlos
i have the same problem i fixed: in urls.py root proyect before: ('^admin/(.*)', admin.site.root), after: (r'^admin/', include(admin.site.urls)), it work good now!!! bye 2010/6/23 Filip Gruszczyński > After migrating to 1.2 I encountered a problem in admin panel. My > change password ang logo

Re: root_path in admin sites is None

2010-06-23 Thread Filip Gruszczyński
> before: ('^admin/(.*)', admin.site.root), > > after: (r'^admin/', include(admin.site.urls)), Well, I had to change it before and about two weeks ago I changed it too (this is how my urls.py looks like): (r'^admin/doc/', include('django.contrib.admindocs.urls')), # (r'^admin/(.*)', admin

Re: Django logging

2010-06-23 Thread David De La Harpe Golden
On 23/06/10 16:48, thusjanthan wrote: Hi, I am creating a new django framework and figured django would come with its own logging feature. I found this one that Fraser wrote but is no longer in development (http://code.google.com/p/django-logging/ wiki/Overview) That's wasn't really for loggin

djangocon hotel question

2010-06-23 Thread ffffff
I bought a early bird ticket a few days ago. It said that the hotel was going to cost $104. Is that value per night, or is it for all 7 days of the conference? It doesn't say. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

authenticate problem with multiple db ?

2010-06-23 Thread Keats
Hi, when authenticate is called i get this error http://dpaste.com/210674/ though the user exist in database... is authenticate known to not work with multiple database context ? my register function was working fine before that... i've tried with @transaction.autocommit in place of @transaction.c

import django : error

2010-06-23 Thread Jagdeep Singh Malhi
$import django error : import: unable to open X server `' @ import.c/ImportImageCommand/361. i am working on ubuntu 10.04 server version -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegr

SVN Problems

2010-06-23 Thread Martin 'golodhrim' Scholz
Hi List, I try to sync with the svn repo of django but all I get is # svn co http://code.djangoproject.com/svn/django/trunk django-trunk svn: The server responded in an anwaited way(504 Gateway Time-out) to the question PROPFIND for »/svn/django/trunk« someone an idea how to solve this? Greeti

Re: import django : error

2010-06-23 Thread Jagdeep Singh Malhi
On Jun 23, 11:00 pm, Jagdeep Singh Malhi wrote: > $import django > error : > import: unable to open X server `' @ import.c/ImportImageCommand/361. > > i am working on ubuntu 10.04 server  version And ./manage.py runserver Error: No module named messages how handle this error ??? -- You rece

How to access the request inside a model manager's get_query_set?

2010-06-23 Thread derek
I would like to define a default manager for MyModel that always filters all records (when the model is accessed from anywhere in my application) based on data from the request: e.g. on the lines of: class MyModelManager(models.Manager): #override default def get_query_set(self, request):

from a template how to access the request object

2010-06-23 Thread thusjanthan
Hi all. >From a template suppose base.html in your templates how do I access the request object without actually passing it via the view. Cause I can access the user object using {{ user }} but I can't access the get_full_path using something like {{ request.get_full_path }} Any thoughts? Nathan

Generate image and send to template

2010-06-23 Thread Waleria
Hi all, I need generate a image and send to template, but I'm not getting ...see my code http://paste.pocoo.org/show/OtwMsOEhe8c9b7jF0elw/ I'm not getting to understand the def generate_graph (request): -- You received this message because you are subscribed to the Google Groups "Django user

Re: SVN Problems

2010-06-23 Thread Karen Tracey
On Wed, Jun 23, 2010 at 2:08 PM, Martin 'golodhrim' Scholz < scholz@googlemail.com> wrote: > Hi List, > > I try to sync with the svn repo of django but all I get is > > # svn co http://code.djangoproject.com/svn/django/trunk django-trunk > svn: The server responded in an anwaited way(504 Gatew

Re: import django : error

2010-06-23 Thread Karen Tracey
On Wed, Jun 23, 2010 at 2:26 PM, Jagdeep Singh Malhi < singh.malh...@gmail.com> wrote: > > > On Jun 23, 11:00 pm, Jagdeep Singh Malhi > wrote: > > $import django > > error : > > import: unable to open X server `' @ import.c/ImportImageCommand/361. > > > > i am working on ubuntu 10.04 server vers

Re: from a template how to access the request object

2010-06-23 Thread Karen Tracey
On Wed, Jun 23, 2010 at 3:04 PM, thusjanthan wrote: > From a template suppose base.html in your templates how do I access > the request object without actually passing it via the view. Cause I > can access the user object using {{ user }} but I can't access the > get_full_path using something lik

Re: SVN Problems

2010-06-23 Thread Martin 'golodhrim' Scholz
On Wed, 23 Jun 2010 15:23:44 -0400, Karen Tracey wrote: > On Wed, Jun 23, 2010 at 2:08 PM, Martin 'golodhrim' Scholz < > scholz@googlemail.com> wrote: > >> Hi List, >> >> I try to sync with the svn repo of django but all I get is >> >> # svn co http://code.djangoproject.com/svn/django/trunk d

Would like to modify request.user and have it be the changed value through out site

2010-06-23 Thread thusjanthan
Hi, Basically within my application for whatever reason I am changing the user and doing something like this: Ex: at first the request.user = UserA request.user = Users.objects.get(some exp) After this the request.user = UserB However once the page redirects to another page the request.user go

noob syntax question

2010-06-23 Thread Sector7B
Hi, In the tutorial 1. It has this: # Give the Poll a couple of Choices. The create call constructs a new # choice object, does the INSERT statement, adds the choice to the set # of available choices and returns the new Choice object. Django creates # a set to hold the "other side" of a ForeignKey

Re: Would like to modify request.user and have it be the changed value through out site

2010-06-23 Thread Daniel Roseman
On Jun 23, 9:14 pm, thusjanthan wrote: > Hi, > > Basically within my application for whatever reason I am changing the > user and doing something like this: > > Ex: at first the request.user = UserA > > request.user = Users.objects.get(some exp) > > After this the request.user = UserB > > However

Re: noob syntax question

2010-06-23 Thread Michael Schade
(Sorry in advance for the brevity and any typos, I am typing this from my aging Windows Mobile). It's quite Django-specific actually. If you take a look at http://docs.djangoproject.com/en/dev/topics/db/queries/ it says, "Django also creates API accessors for the "other" side of the relationship

Re: Django logging

2010-06-23 Thread Russell Keith-Magee
On Thu, Jun 24, 2010 at 1:07 AM, David De La Harpe Golden wrote: > On 23/06/10 16:48, thusjanthan wrote: >> >> Hi, >> >> I am creating a new django framework and figured django would come >> with its own logging feature. I found this one that Fraser wrote but >> is no longer in development (http:/

Re: djangocon hotel question

2010-06-23 Thread Russell Keith-Magee
On Thu, Jun 24, 2010 at 1:08 AM, ff wrote: > I bought a early bird ticket a few days ago. It said that the hotel > was going to cost $104. Is that value per night, or is it for all 7 > days of the conference? It doesn't say. It doesn't say because it's pretty much implied -- it's $104 a night

Re: Question regarding subdomains of a single project

2010-06-23 Thread Micky Hulse
> Check out this from djangosnippets: http://djangosnippets.org/snippets/1509/ > It allows you to specify multiple URLconfs and then choose which you > .. Anyone know if the ticket mentioned in the comments (#5034) of the above djangosnippet has been resolved? -- You received this message be

Re: authenticate problem with multiple db ?

2010-06-23 Thread Russell Keith-Magee
On Thu, Jun 24, 2010 at 1:25 AM, Keats wrote: > Hi, > when authenticate is called i get this error http://dpaste.com/210674/ > though the user exist in database... is authenticate known to not work > with multiple database context ? I'm not aware of any problems. The authenticate code doesn't do

Re: djangocon hotel question

2010-06-23 Thread ffffff
oh i see. I thought that it may be a possibility that ticket prices would maybe offset the cost a little so they could charge a little less for the rooms... thanks for the clarification... I've never been to a conference like this, so I have no idea how these things work. On Jun 23, 7:41 pm, Russe

Re: Django logging

2010-06-23 Thread Andy McKay
On 2010-06-23, at 8:48 AM, thusjanthan wrote: > I am creating a new django framework and figured django would come > with its own logging feature. I found this one that Fraser wrote but > is no longer in development (http://code.google.com/p/django-logging/ > wiki/Overview) Can anyone suggest me a

trying to do console testing of my models, "no module named X"

2010-06-23 Thread robinne
I have a django project running on local linux machine with apache. I run this at localhost:8081 and I use import statements to import my models in my views (e.g. "from DjangoSite.ManageProducts.models import Member"). For testing, I want to be able to import my models into python console and run

Re: import django : error

2010-06-23 Thread Jagdeep Singh Malhi
On Jun 24, 12:26 am, Karen Tracey wrote: > On Wed, Jun 23, 2010 at 2:26 PM, Jagdeep Singh Malhi < > > > > singh.malh...@gmail.com> wrote: > > > On Jun 23, 11:00 pm, Jagdeep Singh Malhi > > wrote: > > > $import django > > > error : > > > import: unable to open X server `' @ import.c/ImportImageC

Re: import django : error

2010-06-23 Thread Kenneth Gonsalves
On Wednesday 23 June 2010 23:30:14 Jagdeep Singh Malhi wrote: > $import django > error : > import: unable to open X server `' @ import.c/ImportImageCommand/361. > > i am working on ubuntu 10.04 server version > you are trying to import from the bash shell - please open a python shell and try t

Re: import django : error

2010-06-23 Thread Teemu Perheentupa
Hi $import django error : import: unable to open X server `' @ import.c/ImportImageCommand/361. i am working on ubuntu 10.04 server versio you're using shell command import, which is for capturing X-windows to images. You should start python shell first, with python command: $python Python