login using TestCase hangs

2011-05-04 Thread LurkingFrog
I've been attempting to write some end to end integration tests using selenium for my current django app (ver 1.3), and have been having a problem with the login function hanging. After much tracing, I have discovered it hangs when psycopg2 (ver 2.4) tries to execute the update query for the last

django queryset include more columns in select statement

2011-05-04 Thread Mo Mughrabi
Hi, I been trying to create a backward relation using queryset and the joining is working fine, accept that its not including the other joined table in the selected columns. Below is my models, queryset and query.__str__() print class Main(models.Model): slug = models.SlugField(

Re: hidden rows common elements also visible on list filters

2011-05-04 Thread vikalp sahni
How have you made rows hidden?? if you talking about admin, You can control by overriding querset method for that particular table admin. Example: class sometableAdmin: def queryset(self, request): if(whatevercond): return super(, self).queryset(request)

Re: Hidden rows elements also visible on list filters

2011-05-04 Thread Andy McKay
> problem is that few rows i have disabled. > But list filter still displays those rows as well. Are you using the built in django admin, or something else? By "disabled" what do you mean, a change in the model or something else? Until you give us a bit more information, we are unlikely to be abl

Re: can not download file from my site ( django + uwsgi )

2011-05-04 Thread Lei Zhang
Finally, I found the reason. It is the file privilege problem. The Nginx have no privilege about /uwsgi_tmp folder On Wed, Apr 13, 2011 at 3:25 PM, Roberto De Ioris wrote: > > Il giorno 12/apr/2011, alle ore 04.05, Lei Zhang ha scritto: > > > the static file is returned by nginx, and it is work

Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-04 Thread Calvin Spealman
You need to construct your query in the view function to filter for the comments you want. You can't do these sorts of things from the template, and that is largely by design so that you keep your logic in one place: your views, and your presentation in one place: your template. On Wed, May 4, 201

South African Django Developers

2011-05-04 Thread Ryan
Are there any Django developers in Johannesburg, South Africa? If so, who can I get in touch with? Thanks. -- 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 th

Re: Adding custom filter to stand-alone template

2011-05-04 Thread Ethan Jucovy
On Wed, May 4, 2011 at 7:19 PM, Ethan Jucovy wrote: > This also feels a little hacky, but IMHO cleaner than messing with >> builtins. > > Looking at django/template/__init__.py -- it does seem like INSTALLED_APPS and django.template.builtins are the only ways to do this. -Ethan -- You received

Hidden rows elements also visible on list filters

2011-05-04 Thread rahul jain
All, How to fix this ? Hidden rows elements also visible on list filters. ex: I have a list filter on one of the columns , list filter for that column displays all the distinct values, but the problem is that few rows i have disabled. But list filter still displays those rows as well. How to f

hidden rows common elements also visible on list filters

2011-05-04 Thread rahul jain
All, Hidden rows elements also visible on list filters ? ex: I have a list filter on one of the columns , list filter for that column displays all the distinct values, but the problem is that few rows i have disabled. But list filter still displays those rows as well. How to fix this ? Thanks

Re: Adding custom filter to stand-alone template

2011-05-04 Thread Ethan Jucovy
On Wed, May 4, 2011 at 6:41 PM, Up2L8 wrote: > I'm trying to use the Template library outside of a normal Django > webapp and am having difficulty figuring out the right way to register > a custom filter. > The current implementation works, but I don't like accessing the guts > of the template mo

Adding custom filter to stand-alone template

2011-05-04 Thread Up2L8
I'm trying to use the Template library outside of a normal Django webapp and am having difficulty figuring out the right way to register a custom filter. The current implementation works, but I don't like accessing the guts of the template module (see below), or calling my custom Library a "builtin

Re: Getting Django admin to display new autoincremented values in primary key model forms

2011-05-04 Thread pjrhar...@gmail.com
Hi, See this ticket for details on the error you are seeing: http://south.aeracode.org/ticket/407 If I understand correctly, it sounds like you're asking for something that isn't possible anyway. The id isn't known until the item is inserted into the database, because the database assigns the i

Re: Django foreign key attribute in the model

2011-05-04 Thread urukay
Hi, try self.submitter.id Radovan On May 4, 10:58 pm, Ján Vorčák wrote: > Hi, > > I'd like to ask you for some help :) > > I have a model with one foreign key > > > from django.contrib.auth.models import User > > > class Task(models.Model): >     ... >     submitter = models.ForeignKe

Django foreign key attribute in the model

2011-05-04 Thread Ján Vorčák
Hi, I'd like to ask you for some help :) I have a model with one foreign key from django.contrib.auth.models import User class Task(models.Model): ... submitter = models.ForeignKey(User, related_name='submitter') ... def get_user_link(self): return "%(name)s"

Re: Django orm group_by difficulties

2011-05-04 Thread Jacob Kaplan-Moss
On Wed, May 4, 2011 at 9:23 AM, Satan Study Django wrote: > I can also use the direct sql query in the code. But on cellular it > level does not seem right -) Well, if it were me, I'd just use the raw SQL. I'd guess that about 5 to 10% of the time I find that my queries are better expressed in SQ

Re: django admin site and debug

2011-05-04 Thread Ivan
Try to replace your patern '^admin/' this '^admin/$', or swap ( r'^admin/', include( admin.site.urls ) ) and ( r'', include( 'role.company.urls' ) ) > my urlconf look like this > > from django.conf.urls.defaults import patterns, include > > # Uncomment the next two lines to enable the admin: > fro

Re: stop repetition in template

2011-05-04 Thread pankaj sharma
actually i want both.. like LIST OF ALL COLLEGES: college1 city1 college2 city2 college3 city3 LIST OF CITIES city1 city2 city3 {but is city2 = city3} then it would show : LIST OF ALL COLLEGES: college1 city1 college2 city2 college3 city3 LIST OF CITIES city1 city2 --

Getting Django admin to display new autoincremented values in primary key model forms

2011-05-04 Thread wilbur
I am using Django 1.2.4 with a Postgresql 8.4 backend. Before creating my models in Django, I began with a existing Postgresql database with tables for which I had defined integer primary keys that used an autoincrementing sequence on table inserts. When I created my Django models, I defined the pr

Re: stop repetition in template

2011-05-04 Thread Brian Bouterse
I like your second solution a lot better than mine. I've never seen {% ifchanged %} used properly before. Brian On Wed, May 4, 2011 at 1:19 PM, Javier Guerra Giraldez wrote: > On Wed, May 4, 2011 at 11:42 AM, pankaj sharma > wrote: > > in template.. > > > > {% for college in list

Re: stop repetition in template

2011-05-04 Thread Javier Guerra Giraldez
On Wed, May 4, 2011 at 11:42 AM, pankaj sharma wrote: > in template.. > >               {% for college in list %} >                {{college.city}} >               {% endfor %} > > in views.py > > def list(request): >    college_list=College.objects.all() >    return render_to_response( >    'coll

Re: ANN: Two-level caching for Django

2011-05-04 Thread Andre Terra
Great work! Thanks a lot, I might need to use this soon. Sincerely, Andre Terra (airstrike) On Wed, May 4, 2011 at 5:31 AM, Malcolm Box wrote: > Hi, > > We recently hit a bottleneck accessing a memcached server from Django on a > big site. To solve it, I created two-level cache with a local ca

Re: stop repetition in template

2011-05-04 Thread Brian Bouterse
I would handle this at the views layer. Right now your queryset of college_list is a list of colleges containing cities. In your view code I would re-organize it to be a list of cities that contain colleges. Then you can iterate through cities and get colleges. You can build this data structure

stop repetition in template

2011-05-04 Thread pankaj sharma
hello friends, i have database of colleges. i want to show all cities so what is did is.. in template.. {% for college in list %} {{college.city}} {% endfor %} in views.py def list(request): college_list=College.objects.all() return render_

Re: Odp: Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread urukay
In form use this field: class MyImageField(ImageField): def __init__(self, *args, **kwargs): super(MyImageField, self).__init__(*args, **kwargs) def clean(self, *args, **kwargs): data = super(MyImageField, self).clean(*args, **kwargs) try: data.name =

Django orm group_by difficulties

2011-05-04 Thread Satan Study Django
Hi all. There was a need for group_by (as I am inclined to assume), and all else fails. Models: class States (models.Model): state = models.CharField (max_length = 70) class Person (models.Model): name = models.CharField (max_length = 100) login = models.CharField (max_length = 30) c

UML to Django - online generation service

2011-05-04 Thread jcabot
Hi everybody, You can now try for free a new online code-generation service that transforms plain UML class diagrams to Django models. Check http://modeling-languages.com/content/uml2python-full-code-generator-python-applications for more info. Any feedback will be highly appreciated! Jordi --

Re: Allow only one record in admin.ModelAdmin !

2011-05-04 Thread dfolland
Here is a way that I set up a settings model. class YourSettings(models.Model): ID_CHOICES = ((1,'Settings is a single record'),) id = models.IntegerField(primary_key=True, choices=ID_CHOICES, default=1) ... then the other fields for your settings. On May 4, 12:11 am, Toninho Nunes w

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Xavier Ordoquy
Hi, Have you tried the development server (runserver) on the computer that runs the wsgy ? What LANG does apache declares (/etc/apache/envvars) ? How much of the body do you change in the save function ? Xavier. Le 4 mai 2011 à 15:16, Massimo a écrit : > Yes, I get an email when someone writes

Re: django admin site and debug

2011-05-04 Thread bitgandtter
its really rear this error the aplication its runing in mod_python in a shared web hosting python 2.5.1 and work perfect the only thing is that when i change the DEBUG flag to false the administration interface keep working and autenticate all fine but throwme the 404 error when i try to access the

Re: Odp: Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread Ariel
And how can I change the filename of the image when it is uploaded ??? 2011/5/4 urukay > Or try to change the name of the file when uploading the image/file. > That's how solved it. Had couple problems with it also in development > enviroment and now it's working ok. Haven't tested yet in produc

Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread Ariel
I am using debian 6 in spanish. On Wed, May 4, 2011 at 2:41 AM, Karen Tracey wrote: > On Tue, May 3, 2011 at 10:22 AM, Ariel wrote: > >> In my apache enviroment settings I have already set that: >> >> export LANG='en_US.UTF-8' >> export LC_ALL='en_US.UTF-8' >> >> But I still get the same error.

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread Brian Bouterse
You're probably right about using Postgres. Postgres is rock solid, scalable, and easy to use. I've recently had a need to create a bridge between PostgreSQL and SQlite. Primarily because I use SQlite in my dev environments, but use PostgreSQL in production. I have been planning to write someth

Re: Generiview that show mutiple class model

2011-05-04 Thread Pascal Moutia
Ok thank you for your solutions :) Le 4 mai 2011 à 15:09, Xavier Ordoquy a écrit : > > Le 4 mai 2011 à 14:56, Pascal Moutia a écrit : > >> First tank you Xavier for you respond let me get you more precisions: >> this is my app models.py (normaly the models.py have more classes always >> with

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Massimo
Yes, I get an email when someone writes a comment. (Sorry but I do not speak English). If I run with "python manage.py runserver" the email arrives well, if run with apache wsgy the result is the error ! 2011/5/4 Xavier Ordoquy > > Le 4 mai 2011 à 13:44, Aragorn a écrit : > > > HI, > > > > I ca

Re: Django Admin template

2011-05-04 Thread Rich
I'm still not able to narrow down on which template I need to modify, perhaps it is a group of templates. This is the screen shot of the admin panel. https://picasaweb.google.com/108522207223325173920/May42011DjangoAdmin?authkey=Gv1sRgCIbMrMaet7XudQ#5602847506056859010 In Uploader, I click on Add

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread David Goehrig
I'd recommend going the PostgreSQL route. I have a number of apps that use the architecture where Postgres is running in a federated multi-master setup with client side SQLite db used as local cache. Building a data sync service between the two using django to ship models via a RESTishAPI deger

Re: Generiview that show mutiple class model

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 14:56, Pascal Moutia a écrit : > First tank you Xavier for you respond let me get you more precisions: > this is my app models.py (normaly the models.py have more classes always with > a ForeignKey to Info): > > class Info (models.Model): >nom = models.CharField(max_length=1

Re: Generiview that show mutiple class model

2011-05-04 Thread Pascal Moutia
First tank you Xavier for you respond let me get you more precisions: this is my app models.py (normaly the models.py have more classes always with a ForeignKey to Info): class Info (models.Model): nom = models.CharField(max_length=100) prenom = models.CharField(max_length=100) rue =

Re: Allow only one record in admin.ModelAdmin !

2011-05-04 Thread Toninho Nunes
No, this table will have only a single record, for any user and will be the same record at all. The user can change, delete and save, but can not add two records. On 4 maio, 07:22, vikalp sahni wrote: > sorry, didn't get you. << I need just only to limit to one record >> > > is it something like

Re: Generiview that show mutiple class model

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 14:38, Pascal Moutia a écrit : > Hi, > I've been having a problem i'd like to show mutiple class from a model in a > generic view but I can't find a way to it, > Can some one tel me do I have to write my own view or is there any generic > view that can do this ? What do you m

Re: removing the source of a OneToOneField relationship

2011-05-04 Thread Seth Gordon
On 05/04/2011 12:43 AM, Andy McKay wrote: > > On 2011-05-03, at 2:05 PM, Seth Gordon wrote: >> I get an exception, complaining that Target.source does not allow >> null values. > > You'll probably want to allow null values on your OneToOne field then: > > http://docs.djangoproject.com/en/dev/ref

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread Brian Bouterse
SQlite has issues with efficiently serving multiple database connections simultaneously. It is still ACID compliant, but the performance can crawl with multiple users. I think this has to do with the locking being filesystem based. That being said it sounds like your db's would all be used by in

Generiview that show mutiple class model

2011-05-04 Thread Pascal Moutia
Hi, I've been having a problem i'd like to show mutiple class from a model in a generic view but I can't find a way to it, Can some one tel me do I have to write my own view or is there any generic view that can do this ? Thank you ! :D -- You received this message because you are subscribe

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 13:44, Aragorn a écrit : > HI, > > I can not understand where is the error. when you insert a > blog comment I receive an email, but this' > the email I receive ! Hi, I noticed you have overridden the save method. Could you tell us more about what you are doing the that method

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread David Markey
sqlite3 uses unicode by default so you should be ok. Is that the full stack trace? Can you post another? On 4 May 2011 13:06, Aragorn wrote: > Sqlite3 > > On 4 Mag, 13:50, David Markey wrote: > > What is your database? > > > > On 4 May 2011 12:44, Aragorn wrote: > > > > > > > > > HI, > > > >

Re: how to use jquery for date picker

2011-05-04 Thread Kenneth Gonsalves
On Wed, 2011-05-04 at 16:46 +0530, vikalp sahni wrote: > are you planing to use that in place of django current date time > picker > widget?? if you had been following the thread, he wants to implement this outside admin. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilug

Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Aragorn
Sqlite3 On 4 Mag, 13:50, David Markey wrote: > What is your database? > > On 4 May 2011 12:44, Aragorn wrote: > > > > > HI, > > > I can not understand where is the error. when you insert a > > blog comment I receive an email, but this' > > the email I receive ! > > > Traceback (most recent call

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread David Markey
What is your database? On 4 May 2011 12:44, Aragorn wrote: > HI, > > I can not understand where is the error. when you insert a > blog comment I receive an email, but this' > the email I receive ! > > > Traceback (most recent call last): > > File "/usr/local/lib/python2.6/dist-packages/django/

[Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Aragorn
HI, I can not understand where is the error. when you insert a blog comment I receive an email, but this' the email I receive ! Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ base.py", line 100, in get_response response = callback(reque

Re: Error: No module named messages.

2011-05-04 Thread Kenneth Gonsalves
On Wed, 2011-05-04 at 02:10 -0700, Jacob Scherffenberg wrote: > Have been working on an Error: No module named debug toolbar for a > couple hours, finally realized that i could just use the ubuntu > package system, to get it. > Thought that was all, but now i get Error: No module named messages.?

Re: Error: No module named messages.

2011-05-04 Thread David Markey
You're probably using a version of django that is too old.. the messages framework was introduced in 1.2 i think? On 4 May 2011 10:10, Jacob Scherffenberg wrote: > Have been working on an Error: No module named debug toolbar for a > couple hours, finally realized that i could just use the ubuntu

Re: Allow only one record in admin.ModelAdmin !

2011-05-04 Thread vikalp sahni
sorry, didn't get you. << I need just only to limit to one record >> is it something like you want one user to add only one record to certain table from admin?? On Wed, May 4, 2011 at 10:41 AM, Toninho Nunes wrote: > Hi, > > I have a table named Config, I need just only to limit to one record,

Multiple SQLITE databases vs one BIG PostgreSQL database

2011-05-04 Thread VoodooH
Hello guys, We currently have a desktop software that uses a sqlite embedded database. We are now gonna develop the online version for our software and we need your opinion on these matters : 1. We were thinking of giving our users the option to switch between the online and offline version of th

Re: django admin site and debug

2011-05-04 Thread 492587
Check your admin.autodiscover () in urls.py it should be after all models import -- 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

Error: No module named messages.

2011-05-04 Thread Jacob Scherffenberg
Have been working on an Error: No module named debug toolbar for a couple hours, finally realized that i could just use the ubuntu package system, to get it. Thought that was all, but now i get Error: No module named messages.? What to do? -- You received this message because you are subscribed t

Allow only one record in admin.ModelAdmin !

2011-05-04 Thread Toninho Nunes
Hi, I have a table named Config, I need just only to limit to one record, are there a method or property to do this? any tip ou advice how to proceed? I use the admin.ModelAdmin. details: Django Version 1.3 Ubuntu 10.10 - 64bits PostGresql 8.4 Thanks, Toninho Nunes -- You received this messa

Re: how to use jquery for date picker

2011-05-04 Thread vikalp sahni
are you planing to use that in place of django current date time picker widget?? Which means are you looking to change the behaviour of Django Form, DateTimeField to use Jquery?? I would suggest not to change default datepickerwidget, as it works like a charm in admin forms. You should though try

Re: how to use jquery for date picker

2011-05-04 Thread GKR
sorry for that but I am going to use that for django thanks -- 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 django-users+unsubscr

Re: how to use jquery for date picker

2011-05-04 Thread vikalp sahni
http://jqueryui.com/demos/datepicker/ Furthermore i think, this is not the right list for Jquery related queries. Regards, //Vikalp On Wed, May 4, 2011 at 4:15 PM, GKR wrote: > how to use jquery for date picker > > please help > > -- > You received this message because you are subscribed to th

how to use jquery for date picker

2011-05-04 Thread GKR
how to use jquery for date picker please help -- 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 django-users+unsubscr...@googlegrou

Re: How to get view

2011-05-04 Thread Daniel Roseman
On Wednesday, May 4, 2011 9:34:08 AM UTC+1, doniyor wrote: > > Hi there, > my problem is simple, i cannot redirect /wiwi/ to /s/?o=key=./ > because the second request does not have a view, but i set its view in > this way: > > View, args, kwargs = resolve(“/s/?o=key“) > Kwargs['requ

Re: how to add datepicker (available in admin)

2011-05-04 Thread GKR
thanks but its giving an error like name 'AdminDateWidget' is not defined please help it might be a configuration problem please help thanks -- 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

ANN: Two-level caching for Django

2011-05-04 Thread Malcolm Box
Hi, We recently hit a bottleneck accessing a memcached server from Django on a big site. To solve it, I created two-level cache with a local cache on each Django box, and a global cache on the memcached machines. Under the sort of loads we were seeing, this dramatically reduced the load on the me

How to get view

2011-05-04 Thread doniyor
Hi there, my problem is simple, i cannot redirect /wiwi/ to /s/?o=key=./ because the second request does not have a view, but i set its view in this way: View, args, kwargs = resolve(“/s/?o=key“) Kwargs['request']= request Return view(*args,**kwargs) Why cannot i get now the view of

Re: Limited set of languages available in Django i18n?

2011-05-04 Thread Tom Evans
On Wed, May 4, 2011 at 1:32 AM, Karen Tracey wrote: > On Tue, May 3, 2011 at 8:11 AM, Tom Evans wrote: >> >> If you require your site >> to be in Mongolian, it can be in Mongolian, even though Django does >> not itself have a Mongolian translation, > > Need a better example. Django has had a Mong

Re: Django Donations App

2011-05-04 Thread Eugene MechanisM
https://launchpad.net/django-donation -- 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 django-users+unsubscr...@googlegroups.com. F