Class coverage report for automated tests in django apps

2009-02-05 Thread ranjan.Kumar
hi all.. I am trying to automate tests for my website and i need to know the way in which i can get the code coverage report of the tests. I found 'coverage.py' which gives the coverage report of 'statements' but couldn't find any way that gives 'method/class coverage' report. Can anyone help?

Re: 'blocktrans' doesn't allow other block tags (seen u'plural') inside it

2009-02-05 Thread Tipan
Thanks Arien. It's a subtle difference but clearly I'd read and not understood. Duh! Looks obvious now. Much appreciated.Tim > > You want to use "count" instead of "with" in the blocktrans tag: > >   >>> from django.template import Context, Template >   >>> t = Template(""" >   ... {% load i18n

converting a string object into class object

2009-02-05 Thread Saurav
Hi, I want to know if its possible to convert a string object into class object. Basically Im trying to make some generic methods for changing the data in the models For your convinience, Im providing you the link to the code where Im facing the problem http://dpaste.com/117323/ at line no

Re: Retrieving Model Names in an app

2009-02-05 Thread Saurav
Hi, I want to know if its possible to convert a string object into class object. Basically Im trying to make some generic methods for changing the data in the models For your convinience, Im providing you the link to the code where Im facing the problem http://dpaste.com/117323/ at line no

Re: Serialization

2009-02-05 Thread issya
Thanks for showing me the code. I guess you really did not need my example at all. So sorry about that. :) This was all for a project I had to finish by tonight and learning time wasn't included. I ended up using jQuery's ajax load. Calls out to a url and replaces whatever my original content

Re: Retrieving Model Names in an app

2009-02-05 Thread Saurav
Thanks Bruno for the tip. On Feb 5, 2:15 pm, bruno desthuilliers wrote: > On 5 fév, 09:20, Saurav wrote: > > > Is there any way to retrieve all the model names in an app ?? > > from django.core.db.loading import get_models > import myapp > for

Re: request.GET Problem

2009-02-05 Thread min
Yes, thanks! On Feb 6, 1:19 pm, Malcolm Tredinnick wrote: > On Thu, 2009-02-05 at 17:22 -0800, min wrote: > > [...] > > > > > > > If use request.GET['selectM'].strip() in the following example, we can > > only get the the 'value' of selected item. > > > > > > > > >  

Re: Design Question

2009-02-05 Thread Rishabh Manocha
On Fri, Feb 6, 2009 at 5:48 AM, mguthrie wrote: > > Anybody? > > On Feb 3, 9:41 am, mguthrie wrote: > > I'm looking at creating an application that would use Django Auth for > > managing users but once logged in the user will "belong" only to a >

Re: request.GET Problem

2009-02-05 Thread Malcolm Tredinnick
On Thu, 2009-02-05 at 17:22 -0800, min wrote: [...] > If use request.GET['selectM'].strip() in the following example, we can > only get the the 'value' of selected item. > > > > > > >bbb >ccc >ddd > >

Re: request.GET Problem

2009-02-05 Thread min
Thanks a lot! Regard min On Feb 6, 12:49 pm, Alex Gaynor wrote: > On Thu, Feb 5, 2009 at 8:47 PM, min wrote: > > > Ok, Thanks! > > > Another thing is that: I can only get one value by request.GET > > ['selectM'].strip(), when I select two or more

Re: request.GET Problem

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 8:47 PM, min wrote: > > Ok, Thanks! > > Another thing is that: I can only get one value by request.GET > ['selectM'].strip(), when I select two or more options in the > SelectMultiple widget. > > For example, if I selected 'test1' and 'test2' in the

Re: request.GET Problem

2009-02-05 Thread min
Ok, Thanks! Another thing is that: I can only get one value by request.GET ['selectM'].strip(), when I select two or more options in the SelectMultiple widget. For example, if I selected 'test1' and 'test2' in the SelectMultiple widget, the value in the "request.GET['selectM'].strip()" is only

Re: request.GET Problem

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 8:22 PM, min wrote: > > Hi. > > In the following templates file, we can get the value of zip by using > ' request.GET['zip'].strip()' in the views.py > > > > > Zip > > > > > > However, if the 'zip' input

request.GET Problem

2009-02-05 Thread min
Hi. In the following templates file, we can get the value of zip by using ' request.GET['zip'].strip()' in the views.py Zip However, if the 'zip' input was changed into a SelectMultiple widget, like how to get both the value and option from

Re: Design Question

2009-02-05 Thread mguthrie
Anybody? On Feb 3, 9:41 am, mguthrie wrote: > I'm looking at creating an application that would use Django Auth for > managing users but once logged in the user will "belong" only to a > specific organization and can only work with data associated with that >

Re: Where to place files on apache server.

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 7:15 PM, djandrow wrote: > > Thank you, i will try creating a symlink. I'm a bit confused about > the PythonPath though, is the python path an environment variable or > is it defined in the httpd conf or a 3rd place? > > I know I have: > >

Re: Where to place files on apache server.

2009-02-05 Thread djandrow
Thank you, i will try creating a symlink. I'm a bit confused about the PythonPath though, is the python path an environment variable or is it defined in the httpd conf or a 3rd place? I know I have: PythonPath "['C:/Program Files/Apache2.2/htdocs/myproject'] + sys.path" in the conf. But how

Re: 'blocktrans' doesn't allow other block tags (seen u'plural') inside it

2009-02-05 Thread Arien
On Thu, Feb 5, 2009 at 4:21 PM, Tipan wrote: > [...] > > Docs show: > {% blocktrans count list|length as counter %} > There is only one {{ name }} object. > {% plural %} > There are {{ counter }} {{ name }} objects. > {% endblocktrans %} > > My template has: > {% blocktrans

Re: Where to place files on apache server.

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 5:59 PM, djandrow wrote: > > Thanks, that has helped me quite abit. But I still have one issue. > When trying to look at the pages I create I get the following: > > Traceback (most recent call last): > > File

Re: Where to place files on apache server.

2009-02-05 Thread djandrow
Thanks, that has helped me quite abit. But I still have one issue. When trying to look at the pages I create I get the following: Traceback (most recent call last): File "C:\ProgLangs\Python25\Lib\site-packages\mod_python \importer.py", line 1537, in HandlerDispatch

Re: [slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread Russell Keith-Magee
On Fri, Feb 6, 2009 at 6:07 AM, cjl wrote: > > I've been on Windows and Linux for many years, and recently picked up > a Macbook Pro for the fun of it. > > To be honest, I'm kind of disappointed with the Python included with > Leopard. I spent some time googling around to see

Re: Which Python are people using on OSX?

2009-02-05 Thread elithrar
I run Python 2.5.1 (the standard install), though I would lean towards a port install python-2.6 if I required it. I don't see any problem compiling it into /usr/local/bin from source, though. --~--~-~--~~~---~--~~ You received this message because you are

query returning latest entry for each

2009-02-05 Thread adrian
Given a DB like this: Species 1 --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to

'blocktrans' doesn't allow other block tags (seen u'plural') inside it

2009-02-05 Thread Tipan
Can anyone explain the strange behaviour I'm seeing in this translation tag. I've translated the whole site and used the {% plural %} tag notation as defined in the documentation, however, I'm getting this error and I can't determine quite what I've done wrong. I'm sure it's me, not a bug, but

Re: [slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread Martin Conte Mac Donell
On Thu, Feb 5, 2009 at 7:07 PM, cjl wrote: > Honestly, I'm leaning towards option number 5. I'm just wondering what > other Django folks are using. I'm using MacPorts. It's the practical way. (x11? really?. Which version are you trying?) I'm using those ports: # port

Re: [slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread Jon Dufresne
On Thu, Feb 5, 2009 at 1:07 PM, cjl wrote: > 1. Use the stock Python, slightly outdated 2.5.1, with weird and > incomplete modules. > 2. Compile Python myself from source. > 3. Use MacPorts Python. Anyone know why the nearly all of Xorg gets > built as a dependency? > 4. Use

Re: Improving the response time in Django Admin

2009-02-05 Thread Tipan
Thanks Karen, that was just the ticket. On Jan 29, 10:52 pm, Karen Tracey wrote: > On Thu, Jan 29, 2009 at 5:49 PM, Tipan wrote: > > I'll go ahead as planned on the Django update and see if this delivers > > any improvements. With regards to your

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Gordon Cassie
Thanks very much for the help! On Thu, Feb 5, 2009 at 12:07 PM, Alex Gaynor wrote: > > > On Thu, Feb 5, 2009 at 2:10 PM, Gordon Cassie wrote: > >> That did the trick. >> >> Another quick question. I have made some custom validations in the forms >>

Re: [slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread Petite Abeille
On Feb 5, 2009, at 10:07 PM, cjl wrote: > 2. Compile Python myself from source. Easy peasy :) Cheers, -- PA. http://alt.textdrive.com/nanoki/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: default value for foreign key and CharField

2009-02-05 Thread Rajesh Dhawan
> > > > I have the following classes in my models.py: > > > > class Default(models.Model): > > > name = models.CharField(max_length=50, choices = > > > (('rental_period', 'rental_period'), ('currency', 'currency')), > > > unique=True) > > > value = models.CharField(max_length=50) > > > >

Re: default value for foreign key and CharField

2009-02-05 Thread Daniel Roseman
On Feb 5, 3:59 pm, knight wrote: > Hi, > > I have the following classes in my models.py: > > class Default(models.Model): >     name = models.CharField(max_length=50, choices = > (('rental_period', 'rental_period'), ('currency', 'currency')), > unique=True) >     value =

Re: default value for foreign key and CharField

2009-02-05 Thread knight
Hi, Thanks for the fast reply. Each Default instance provide default value for one of the fields: I want to take the default value of rental_period to rental_period and default value of currency to currency. The value of the currency should be the name of Currency object for foreign key. Thanks,

[slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread cjl
I've been on Windows and Linux for many years, and recently picked up a Macbook Pro for the fun of it. To be honest, I'm kind of disappointed with the Python included with Leopard. I spent some time googling around to see what my options are for running Python 2.6.1, and came up with this list:

Re: default value for foreign key and CharField

2009-02-05 Thread Rajesh Dhawan
On Feb 5, 10:59 am, knight wrote: > Hi, > > I have the following classes in my models.py: > > class Default(models.Model): > name = models.CharField(max_length=50, choices = > (('rental_period', 'rental_period'), ('currency', 'currency')), > unique=True) > value =

Re: Filtering the admin "add" page with manytomany foreign key attribute

2009-02-05 Thread Rajesh Dhawan
On Feb 5, 8:25 am, Grimmo wrote: > Hi, > I have these models for my application: > > class Movie (models.Model): > Title = models.CharField(max_length=100) > Director = models.CharField(max_length=100,blank=True) > Year =

Re: URLField verify_exists is ignored

2009-02-05 Thread Rajesh Dhawan
On Feb 5, 10:17 am, Adam Radestock wrote: > I'm trying to get a URLField to NOT check the URL is valid on form > submission, but the damn thing won't listen! > I have the following model defined in my models.py: > > class SubversionRepository(models.Model): >

Re: Chained managers - alternative?

2009-02-05 Thread Rajesh Dhawan
Hi, phillc wrote: > In reference to > http://simonwillison.net/2008/May/1/orm/ > and comments from here > http://thisweekindjango.com/screencasts/episode/11/django-ground-episode-3/ > > > so i got to thinking, these posts were made pre-QSRF merge i think? so > is the updated version of the

Re: form validation in XMLHttp submission

2009-02-05 Thread adrian
It is true that I was accessing the error message incorrectly in python - it should be my_form.errors['date'] and it is set. However the doc says you can access that same value with form.name_of_field.errors in a template like this: {{ form.date.errors }} Date: {{

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 3:24 PM, George Sakkis wrote: > > On Feb 5, 3:13 pm, Alex Gaynor wrote: > > On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis >wrote: > > > > > > > > > > > > > Hello, > > > > > I am looking at the raw

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread George Sakkis
On Feb 5, 3:13 pm, Alex Gaynor wrote: > On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis wrote: > > > > > > > Hello, > > > I am looking at the raw sql executed when I run a delete or update on > > a QuerySet and it appears that it does a redundant

Re: Admin and 1-1 fields

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 3:18 PM, John M wrote: > > I tried to find this in the admin code, but was unsuccessful. > > If I have a model with a 1-1 relationship, and in my admin.py I > specify that the 1-1 related model is in an INLINE, I notice that the > admin interface is

Admin and 1-1 fields

2009-02-05 Thread John M
I tried to find this in the admin code, but was unsuccessful. If I have a model with a 1-1 relationship, and in my admin.py I specify that the 1-1 related model is in an INLINE, I notice that the admin interface is smart enough to add a new 1-1 related record when necessary. I'm wondering in

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis wrote: > > Hello, > > I am looking at the raw sql executed when I run a delete or update on > a QuerySet and it appears that it does a redundant "select *" for the > queryset before the actual delete/update. For example > >

Redundant select on QuerySet delete/update

2009-02-05 Thread George Sakkis
Hello, I am looking at the raw sql executed when I run a delete or update on a QuerySet and it appears that it does a redundant "select *" for the queryset before the actual delete/update. For example delete_ids = (108, 107, 106) qs = MyModel.objects.filter(pk__in=delete_ids) print

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 2:10 PM, Gordon Cassie wrote: > That did the trick. > > Another quick question. I have made some custom validations in the forms > clean() method. The only way I can seem to display the errors in the > template is by doing this: > {{ form.errors }}.

Re: Changing the structure of an already running site

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 11:52 AM, felix wrote: > try deseb > > http://code.google.com/p/deseb/ > > Its ... magic (good and bad. mostly good in this case) > > I simply run: > > ./manage.py evolvedb > > and the SQL to be run is shown to me with the option to run it > > >

Re: Admin site not using my overridden save()?

2009-02-05 Thread Silfheed
grr.. cut and paste and I still leave off the last parenthesis... super(person, self).save(force_insert, force_update) Anyway, the code is syntactically correct, I just tried it out in a little test environment I set up. Thanks again On Feb 5, 11:08 am, Silfheed

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Gordon Cassie
That did the trick. Another quick question. I have made some custom validations in the forms clean() method. The only way I can seem to display the errors in the template is by doing this: {{ form.errors }}. The problem with this is before it displays the actual errors it is displaying __all__.

Re: Admin site not using my overridden save()?

2009-02-05 Thread Silfheed
No, not a direct cut and paste (I guess I should have) class person(models.Model): gender = models.CharField(max_length=1, choices=(('M','male'), ('F','female'))) other = models.CharField(manx_length=20, null=True,blank=True) def save(self, force_insert=False, force_update=False):

Re: how can i create alphabetic list

2009-02-05 Thread Muslu Yüksektepe
thanx i will try tomorrow. i hope it will be ok --~--~-~--~~~---~--~~ 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 unsubscribe from this group,

Re: A Very Puzzling MySQL Issue Performance...

2009-02-05 Thread Karen Tracey
On Thu, Feb 5, 2009 at 12:36 PM, dan0 wrote: > > Hello, > > I am having an issue with my msyqld process responding to a query > after a moderate period of inactivity. I'll issue a simple query such > as "Person.objects.filter(name__icontains='Dan')", which would map to >

A Very Puzzling MySQL Issue Performance...

2009-02-05 Thread dan0
Hello, I am having an issue with my msyqld process responding to a query after a moderate period of inactivity. I'll issue a simple query such as "Person.objects.filter(name__icontains='Dan')", which would map to about 5000 entries in a table of roughly 200,000 rows, and see the mysqld process

Re: how to do a three table join with django models

2009-02-05 Thread rc
I figured it out. The model uses a "different" name for the foreign key. In my instance test is results FK to testcase. I changed it to Results.objects.all().select_related('profile','test') and worked. Thanks for your help. On Feb 5, 10:48 am, rc wrote: > That worked

Re: how to do a three table join with django models

2009-02-05 Thread rc
That worked great for the results and profile model, but I couldn't get it to return any data from the testcase model?? My view def get_results(request): results_list = Results.objects.all().select_related ('profile','testcase') return

Chained managers - alternative?

2009-02-05 Thread phillc
In reference to http://simonwillison.net/2008/May/1/orm/ and comments from here http://thisweekindjango.com/screencasts/episode/11/django-ground-episode-3/ I am trying to make my implementation clean as possible... The idea is to able to drill down querysets based on more and more preset

Re: MultipleChoiceField issue

2009-02-05 Thread Bobby Roberts
nevermind i figured out how to use the getlist function... Thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Changing the structure of an already running site

2009-02-05 Thread felix
try deseb http://code.google.com/p/deseb/ Its ... magic (good and bad. mostly good in this case) I simply run: ./manage.py evolvedb and the SQL to be run is shown to me with the option to run it and then the option to save it as a schema evolution. the idea is that you would run it on

Re: how to do a three table join with django models

2009-02-05 Thread felix
Results.objects.all().select_related('profile','testcase') that was easy that's A join B,C if it was A join B join C (my example) class Release fk Artist class Artist fk Label class Label Release.objects.all().select_related('artist','artist_label') note selecting the C class

Re: Admin widget for geotagging

2009-02-05 Thread felix
its also on my to do list right now I have an ajax auto-complete for filling out the addresses, but I would prefer the one line google-geo-code version I like the way they did it here: http://djangopeople.net/ On Thu, Feb 5, 2009 at 10:19 AM, Ales Zoulek wrote: > > I

Re: how to do a three table join with django models

2009-02-05 Thread Daniel Roseman
On Feb 5, 3:50 pm, rc wrote: > I am newbie to Django and I am struggling to get my arms around DJango > and it's data access api (models). > > I have these models: > > class Profile(models.Model): >         profile_id = models.AutoField(primary_key=True) >        

Re: Custom Related manager

2009-02-05 Thread Ales Zoulek
Thanks a lot. I'll RTFDoc next time. At least i've learnt something and found not so clean solution using models._default_manager. :) Ales On Thu, Feb 5, 2009 at 5:01 PM, Alex Gaynor wrote: > > > On Thu, Feb 5, 2009 at 10:25 AM, Ales Zoulek

how to do a three table join with django models

2009-02-05 Thread rc
I am newbie to Django and I am struggling to get my arms around DJango and it's data access api (models). I have these models: class Profile(models.Model): profile_id = models.AutoField(primary_key=True) profile_name = models.CharField(max_length=75) def

Re: how can i create alphabetic list

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 10:03 AM, Muslu Yüksektepe wrote: > > can u give me one example? > > i dont understand > > > On 5 Şubat, 16:35, Alex Gaynor wrote: > > On Thu, Feb 5, 2009 at 7:20 AM, Muslu Yüksektepe > > wrote:

Re: Getting uploaded file content type in model save

2009-02-05 Thread varikin
On Feb 4, 7:44 pm, Brian Morton wrote: > However, I am not sure how to get access to the > content type reported by the browser for the uploaded file in the > model save method.  Can you access the request from a model save in > the admin? You can get the content type

Re: Custom Related manager

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 10:25 AM, Ales Zoulek wrote: > > Hi. > > Is there any way, how to easily redefine RelatedManager.get_query_set() > method? > > Here is an example situation: > > class Table(models.Model): > number = models.IntegerField() > > class

Re: Iterating over a dictionary in templates

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 10:21 AM, Carlos Pero wrote: > > Searching this group, I found a number of ways to iterate over a > dictionary in a template to get access to both the key and the value. > However, none of them covered the technique mentioned in this blog > post: > >

default value for foreign key and CharField

2009-02-05 Thread knight
Hi, I have the following classes in my models.py: class Default(models.Model): name = models.CharField(max_length=50, choices = (('rental_period', 'rental_period'), ('currency', 'currency')), unique=True) value = models.CharField(max_length=50) class Media_biz(models.Model): name =

Re: URLField verify_exists is ignored

2009-02-05 Thread josesoa
It might be checking if the URL is in a correct format and not checking if the URL exists. Make sure the URL is in a valid format. On Feb 5, 10:17 am, Adam Radestock wrote: > I'm trying to get a URLField to NOT check the URL is valid on form   > submission, but the

Re: Making fields conditionally required based on another field's state

2009-02-05 Thread wotaskd
Thanks a lot! --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to

Custom Related manager

2009-02-05 Thread Ales Zoulek
Hi. Is there any way, how to easily redefine RelatedManager.get_query_set() method? Here is an example situation: class Table(models.Model): number = models.IntegerField() class Guest(models.Model): confirmed = models.BooleanField() table = models.ForeignKey(Table) objects =

Iterating over a dictionary in templates

2009-02-05 Thread Carlos Pero
Searching this group, I found a number of ways to iterate over a dictionary in a template to get access to both the key and the value. However, none of them covered the technique mentioned in this blog post:

URLField verify_exists is ignored

2009-02-05 Thread Adam Radestock
I'm trying to get a URLField to NOT check the URL is valid on form submission, but the damn thing won't listen! I have the following model defined in my models.py: class SubversionRepository(models.Model): name = models.CharField(max_length=200) url =

Re: how can i create alphabetic list

2009-02-05 Thread Muslu Yüksektepe
can u give me one example? i dont understand On 5 Şubat, 16:35, Alex Gaynor wrote: > On Thu, Feb 5, 2009 at 7:20 AM, Muslu Yüksektepe > wrote: > > > > > @Rama: > > where can i add this code? > > > and i wanna use like this. > > > my items: > >

Re: Required help for Basic Data insertion to the database from a form

2009-02-05 Thread Karen Tracey
On Thu, Feb 5, 2009 at 2:24 AM, Neeru wrote: > > comming to my problem... > > as far this code works fine. there is no error in this. > I able to display the form text fields in the form when i use the > url. > In views.py file, >how can i access the separate field

Re: how can i create alphabetic list

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 7:20 AM, Muslu Yüksektepe wrote: > @Rama: > where can i add this code? > > and i wanna use like this. > > my items: > - > aa > aaa > > a > bb > bbb > b > ccc > cc > cc >

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 2:25 AM, Gordon wrote: > > Form 1 Template (rendered from view): > http://dpaste.com/116827/ > > Form 2 Template (included in Form 1): > http://dpaste.com/116826/ > > View Code: > http://dpaste.com/116828/ > > Form 2 Code: >

Re: Serialization

2009-02-05 Thread Brian Neal
Russ said it better than me. You simply return the serialized JSON string as the HttpResponse. You then deserialize it somehow in the client's Javascript code (perhaps with an "eval" statement or by the assistance of a Javascript library like jQuery, etc.). You then have a nice Javascript object

Filtering the admin "add" page with manytomany foreign key attribute

2009-02-05 Thread Grimmo
Hi, I have these models for my application: class Movie (models.Model): Title = models.CharField(max_length=100) Director = models.CharField(max_length=100,blank=True) Year = models.CharField(max_length=100,blank=True) Backed_up = models.BooleanField(default=True)

Setting up enviroments

2009-02-05 Thread BrianE
I am new to django and am trying to walk through some of the examples in a book. I have a debian etch system, installed python 2.5 and django 1.0. I have created a project and created a simple html request to show the current datetime. the error that is being displayed is showing that it is

app engine 中文开发组,欢迎加入。

2009-02-05 Thread ajaxer
http://groups.google.com/group/google-app-engine-cn-dev?hl=zh-CN --~--~-~--~~~---~--~~ 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

Re: Django Get/POST problem

2009-02-05 Thread Aldo
Thomas, Thanks for that. I figured it out on my own. Just thought maybe there was a standard way of doing it without usng a Redirect like that. Suppose not Thanks On Feb 3, 11:14 am, Thomas Guettler wrote: > Hi, > > I would use the forms library, even if the form has only

Re: Trouble with Django and jQuery

2009-02-05 Thread min
Ok, I will try this way. Thank a lot! On Feb 5, 11:50 pm, Daniel Roseman wrote: > On Feb 5, 12:19 pm, min wrote: > > > > > > > Hi, everyone. > > > I'm learing Django now. Currently, I have a problem with Django and > > jQuery. The detail

Re: MultipleChoiceField issue

2009-02-05 Thread Bobby Roberts
hi all. I'm NEW to the world of django and the Doc doesn't make any sense to me on this issue. Can someone give me an example of how to actually get all of the values out of a CheckboxSelectMultiple widget? I'm only able to get the last box checked.

Re: Trouble with Django and jQuery

2009-02-05 Thread Daniel Roseman
On Feb 5, 12:19 pm, min wrote: > Hi, everyone. > > I'm learing Django now. Currently, I have a problem with Django and > jQuery. The detail is that: > > Firstly, I have a form in the forms.py: > > class TestForm(forms.Form): >     name = forms.CharField( max_length=30 ) >

Re: how can i create alphabetic list

2009-02-05 Thread Muslu Yüksektepe
@Rama: where can i add this code? and i wanna use like this. my items: - aa aaa a bb bbb b ccc cc cc -- my list: a b c d e f g h when i click "a" i wanna show only aa aaa a this items even i can

Trouble with Django and jQuery

2009-02-05 Thread min
Hi, everyone. I'm learing Django now. Currently, I have a problem with Django and jQuery. The detail is that: Firstly, I have a form in the forms.py: class TestForm(forms.Form): name = forms.CharField( max_length=30 ) Then, in the views.py: def Test_page(request): form = TestForm()

Re: how can i create alphabetic list

2009-02-05 Thread Rama Vadakattu
Yes he can use the below 1.string.ascii_lowercase 2.string.ascii_uppercase As iam new to python,django i couldn't able to recollect it while answering. On Feb 5, 3:57 pm, Masklinn wrote: > On 5 févr. 09, at 11:40, Rama Vadakattu   > wrote:> k

Re: how can i create alphabetic list

2009-02-05 Thread Masklinn
On 5 févr. 09, at 11:40, Rama Vadakattu wrote: > k = [chr(i) for i in range(97,123)] > >> >> Why do you manually recreate something already provided to you in the 'string' module? --~--~-~--~~~---~--~~ You received this message

Re: how can i create alphabetic list

2009-02-05 Thread Rama Vadakattu
k = [chr(i) for i in range(97,123)] The above will give you a list from a to z. if you want capital letter list [A,Z] then you should use the respective ascii values range(65,92). On Feb 5, 3:25 pm, Muslu Yüksektepe wrote: > hi; > i need to use a-z list for my photo

how can i create alphabetic list

2009-02-05 Thread Muslu Yüksektepe
hi; i need to use a-z list for my photo album. i wanna use link for all items. like a b c d e f g h ... when i click "a" i wanna show all items star a character thnx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Django Continuous Integration

2009-02-05 Thread Ales Zoulek
> Revision Control: How do you layout your development repository? I'm > using Subversion for my setup but would be interested in hearing what > else others are using (Mercurial, Bazaar, Git, etc) GIT client against SVN repository. > > Packaging: Django has an aversion to using setuptools and

Re: Admin widget for geotagging

2009-02-05 Thread Ales Zoulek
I need the same. Please, let us know, if you solve the issue. Other way I'll start to working on it in a few days. A. On Wed, Feb 4, 2009 at 10:04 PM, Cesar Mojarro wrote: > are u paying someone for this > > On Wed, Feb 4, 2009 at 2:55 PM, Anders

Re: Retrieving Model Names in an app

2009-02-05 Thread bruno desthuilliers
On 5 fév, 09:20, Saurav wrote: > Is there any way to retrieve all the model names in an app ?? from django.core.db.loading import get_models import myapp for model in get_models(myapp.models): print model.__name__ --~--~-~--~~~---~--~~

Re: Admin site / save_as won't work with inlines?

2009-02-05 Thread 3lancer.eu
Hi, > > Is there no chance to make save_as work with inlines? If so, is this > > going to be fixed in upcoming releases? > > There's  a ticket reporting the problem: > > http://code.djangoproject.com/ticket/9651 > > which even links to another ticket with tests, so that's a start.  What's >

Re: Overrding queryset on a field in form generated with ModelForm

2009-02-05 Thread mrsource
Maybe I missing some step: I trying to set up the the automatic admin page form to edit a category tree builded with treebeard extension: #Model: class Categoria(AL_Node,Componente): immagine = fields.ImageWithThumbnailsField (upload_to=Componente.image_path + 'categorie/',

Re: comparing values in the same table

2009-02-05 Thread nibudh
Rockin! That did the trick. I'm not super keen about developing off trunk but i'll live. Thanks. nibudh. On Feb 5, 1:19 am, Ales Zoulek wrote: > Are you using SVN django version, on 1.0? > > If you're on svn, recently "F" object was finished, that should (to my >

Re: How do I add a Custom ID Field that increments?

2009-02-05 Thread Rama Vadakattu
CUSTOM_ID---ID ~ INV1 -- 1 INV2 ---2 INV33 . . . i think you need INV1 for display purposes and also i hope it does not matter much whether you store 1 or

Retrieving Model Names in an app

2009-02-05 Thread Saurav
Is there any way to retrieve all the model names in an app ?? -Saurav --~--~-~--~~~---~--~~ 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