django-http-proxy multiple domains support?

2011-11-18 Thread Daryl
Is anyone on the list using the Multiple Domain (bkroeze) fork of django-http-proxy ? I've had it working fine using a single proxy domain but I am having problems getting it setup for multiple domains, due to a lack of documentation. -- You received this message because you are subscribed to the

anti-join query in Django

2011-11-18 Thread dmitry b
Is there a recommended approach to anti-join queries? Here's the query I'm having an issue with: Branch.objects.filter(branchgroup__isnull=True)[:1] where branchgroup is a ManytoMany relationship to another model. I want to get a set of Branch objects that aren't mapped to any BranchGroups. Th

Re: ImportError: No module named django

2011-11-18 Thread Furbee
You can get to the python interactive interpreter by typing "python" into a Dos shell, as long as the python executable is in your system path. The IDLE command line should work, also. In the Python folder there should be a site-packages folder which contains a folder named django. The "import djan

Re: Error with LayerMapping utility import into Postgresql 9.1

2011-11-18 Thread Daniel Geržo
On 17.11.2011 4:32, Henry wrote: Hey All Im running through the Geodjango tutorial and am getting an error running the load.py. I get the following error; "DatabaseError: invalid byte sequence for encoding "UTF8": 0x00". It throws this error on the first row of the world borders shapefile. I

Superscript in the choice list of Field.choices.

2011-11-18 Thread voss
Hello all, I have a form that looks like this: MY_CHOICES = (('A', 'x^y = z'), ('B', 'y^z = x'),) class MyForm(forms.Form): my_choice_field = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple(), choices=MY_CHOICES) My question is: is it possible to display the power in supers

ImportError: No module named django

2011-11-18 Thread Jenny
I am as newbie as for two hours ago I installed Python 2.7.2 and an hour ago installed BitNami DjangoStack 1.3.1 on my Windows 7 machine. I am trying to start with a tutorial on the Djangos website which says: "You can tell Django is installed by running the Python interactive interpreter and typin

Re: Using Memcached on Heroku

2011-11-18 Thread Jayson Reis
For me worked with a snippet i've added in settings. if os.environ.get('MEMCACHE_SERVERS'): CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', 'LOCATION': '{host}:11211'.format( host=os.environ.get('MEMCACHE_S

Re: Slow page load

2011-11-18 Thread thanos
Why are you calling os.path.join 27636 times ? These are the questions you could be asking yourself ... On Nov 18, 10:55 am, Dre wrote: > I thought my code was faulty, but the admin interface is also very > slow. > It takes 8096 msec for a model with 1000 database rows to be opened > using the ad

Re: browser detection in django

2011-11-18 Thread DrBloodmoney
Well if it is IE then you can do conditional commenting for IE to detect itself: css -- 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 emai

Re: Extend user model multiple times

2011-11-18 Thread DrBloodmoney
Personally I think get_profile() is an anti-pattern, just access it like any other OneToOneField (and that's what you want... not unique=True on a ForeignKey). Just set up a models.OneToOneField(User, related_name=XXX), then you can access the profile as user.XXX. The User model and all of its asso

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Kayode Odeyemi
On Fri, Nov 18, 2011 at 5:18 PM, Tom Evans wrote: > On Fri, Nov 18, 2011 at 4:20 PM, Kayode Odeyemi wrote: > > Just for the sake of learning. How am I the one creating the queries? I > only > > created a model to be saved by calling save() on it. The rest is left to > > Django to handle as I can

Re: Select fields change their value without user interaction

2011-11-18 Thread creecode
Hello Noxxan, On Friday, November 18, 2011 8:57:53 AM UTC-8, Noxxan wrote: Django admin in my case is used very often, many people are using it, > and I'm wondering what can I do to catch I don't know about catching an unwanted change. How would Django be able to know that a changed value fr

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Tom Evans
On Fri, Nov 18, 2011 at 4:20 PM, Kayode Odeyemi wrote: > Just for the sake of learning. How am I the one creating the queries? I only > created a model to be saved by calling save() on it. The rest is left to > Django to handle as I can see in the traceback. Though I never saw the sql > (which is

Different sub-domain for each app

2011-11-18 Thread Tim Makobu
Hi all, I have one domain, for example, adomain.com, and one django project. I plan to have each app serve a subdomain, like blog.adomain.com served by the blog app, and catalogue.adomain.com served by the catalogue app. What's the best way of doing this? regards, Tim. -- You received this me

Re: Select fields change their value without user interaction

2011-11-18 Thread Noxxan
Thanks for your answer, I also suspect browser (big tree, it happens randomly), but maybe there are other possibilities here. Django admin in my case is used very often, many people are using it, and I'm wondering what can I do to catch/reproduce this kind of problems, to react on them, because in

Re: Slow page load

2011-11-18 Thread Javier Guerra Giraldez
On Fri, Nov 18, 2011 at 10:55 AM, Dre wrote: > It takes 8096 msec for a model with 1000 database rows to be opened > using the admin interface with debug-toolbar enabled. It is paginated > to > 100 entries per page, and SQL makes 339 queries in 128.77 msec. > I have two foreign keys on this model

Extend user model multiple times

2011-11-18 Thread C. Kirby
I'm reading up on extending the user model and planing out a project and wanted to clarify a point. I want to have a single user list to authenticate using the standard user model. I want then to create multiple apps in the project, each with roles and permissions tied to the user defined in the us

Re: Slow page load

2011-11-18 Thread Dre
I thought my code was faulty, but the admin interface is also very slow. It takes 8096 msec for a model with 1000 database rows to be opened using the admin interface with debug-toolbar enabled. It is paginated to 100 entries per page, and SQL makes 339 queries in 128.77 msec. I have two foreign ke

Re: Select fields change their value without user interaction

2011-11-18 Thread creecode
Hello Noxxan, One possible cause. Browser bugs. I was looking at a form the other day and I saw a field with a FK popup that didn't look right. Reloaded the webpage, same thing. Looked at the record via another route and the field was OK, Reloaded form in browser again. Still wrong. Rela

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Kayode Odeyemi
Thanks Tom. On Fri, Nov 18, 2011 at 2:32 PM, Tom Evans wrote: > On Fri, Nov 18, 2011 at 1:25 PM, Kayode Odeyemi wrote: > > On Fri, Nov 18, 2011 at 12:04 PM, Tom Evans > > wrote: > >> > >> On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi > wrote: > >> > Hello friends, > >> > > >> > I'm having a

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Chris Northwood
>>> On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi wrote: >>> > Hello friends, >>> > >>> > I'm having a deep Django-MySQLDB error and I'm doing some debugging to >>> > trace exactly where the problem is. It seems to me that this is very >>> > related >>> > to MySQLDB >>> > cursor implementaton. >

Simplesms

2011-11-18 Thread Nadae Ivar BADIO
Hi I looking for a example of simplesms api. Envoyé par mon BlackBerry® smartphone de Tigo -- 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 e

Re: Slow page load

2011-11-18 Thread Zagor
If your SQL query generates a lot of data the IO handling of that could take a good amount of time to push over the network. But hard to know without having more info. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Bill Freeman
Have you tried pdb? On Fri, Nov 18, 2011 at 9:32 AM, Tom Evans wrote: > On Fri, Nov 18, 2011 at 1:25 PM, Kayode Odeyemi wrote: >> On Fri, Nov 18, 2011 at 12:04 PM, Tom Evans >> wrote: >>> >>> On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi wrote: >>> > Hello friends, >>> > >>> > I'm having a d

Select fields change their value without user interaction

2011-11-18 Thread Noxxan
Hi, I have a problem with large form in Django admin site. I have a model A with two inline models (B and C). Model B have some fields, and one of them is ForeignKey with another model (we can call it D). This field is displayed as HTML select field and have a lot of options (about 2k). I have re

Re: Custom admin changelist queryset

2011-11-18 Thread Ivo Brodien
Both Bar and Foo obviously have a featured table and are somehow very common since you want them to be displayed in on list - which also makes only sense if they share the same attributes cause otherwise you would have empty columns depending on the model of the row your are showing. Maybe Bar

Re: Slow page load

2011-11-18 Thread Carlos Daniel Ruvalcaba Valenzuela
I think it depends on what you are doing, more details could be helpful, are you doing any kind of processing on the view? such as processing/iterating data returned by a db query, is the server under load?, do you have users concurrently fetching the page while you check it (for example under prod

Re: Slow page load

2011-11-18 Thread Thomas Guettler
Am 18.11.2011 15:32, schrieb Dre: Hi, Please help me debug a very slow page load using mod_wsgi. I installed django-debug-toolbar and got the following results: ResourceValue User CPU time 1152.072 msec System CPU time 56.004 msec Total CPU time 1208.076 msec Elapsed time

Re: Custom admin changelist queryset

2011-11-18 Thread bax...@gretschpages.com
> Can you tell us what you goal here is? The goal is to get my combined list of featured items to a changelist page. From there, I'll have additional work to do, but step one is getting it to the page at all. Another thought is to just chain the querysets together and send 'em to my own template.

Slow page load

2011-11-18 Thread Dre
Hi, Please help me debug a very slow page load using mod_wsgi. I installed django-debug-toolbar and got the following results: ResourceValue User CPU time 1152.072 msec System CPU time 56.004 msec Total CPU time 1208.076 msec Elapsed time1214.114 msec Context switches

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Tom Evans
On Fri, Nov 18, 2011 at 1:25 PM, Kayode Odeyemi wrote: > On Fri, Nov 18, 2011 at 12:04 PM, Tom Evans > wrote: >> >> On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi wrote: >> > Hello friends, >> > >> > I'm having a deep Django-MySQLDB error and I'm doing some debugging to >> > trace exactly where

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Kayode Odeyemi
On Fri, Nov 18, 2011 at 12:04 PM, Tom Evans wrote: > On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi wrote: > > Hello friends, > > > > I'm having a deep Django-MySQLDB error and I'm doing some debugging to > > trace exactly where the problem is. It seems to me that this is very > related > > to M

Re: Deploy Django to hostmonster

2011-11-18 Thread Tim Makobu
Check out www.ep.io On Fri, Nov 18, 2011 at 6:26 AM, Tran Bac Son wrote: > Hello, > I'm new in Django. I had write my own website by Django but I got problems > in deploying it to hostmonster. > The detail of my problem is: > http://stackoverflow.com/questions/8156173/django-cant-run-in-hostmons

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Tom Evans
On Fri, Nov 18, 2011 at 8:20 AM, Kayode Odeyemi wrote: > Hello friends, > > I'm having a deep Django-MySQLDB error and I'm doing some debugging to > trace exactly where the problem is. It seems to me that this is very related > to MySQLDB > cursor implementaton. > > What I want to do is to run the

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Kevin
You can use the django-debug-toolbar for this: https://github.com/robhudson/django-debug-toolbar On Nov 18, 2:20 am, Kayode Odeyemi wrote: > Hello friends, > > I'm having a deep Django-MySQLDB error and I'm doing some debugging to > trace exactly where the problem is. It seems to me that this is

Django SOAP/WSDL and PowerShell

2011-11-18 Thread Kevin
Hello, Not sure if anyone here has played around with SOAP and WSDL or PowerShell for that matter. I am using the following Django snippet to enable SOAP and WSDL using Django: http://djangosnippets.org/snippets/2210/ It runs and generates a WSDL document, I also used the example located he

Simple admin filter

2011-11-18 Thread Michele JD Granocchia
I need to filter a class (with list_filter) to get all objects with "myfield" (a date field) with month = january Instead of using a complex custom filter, i would like to create a simple filter to link to the following url: /admin/myobject/myfield__month=1 How would i do that? Do i have to creat

How to trace the raw executed sql in Django

2011-11-18 Thread Kayode Odeyemi
Hello friends, I'm having a deep Django-MySQLDB error and I'm doing some debugging to trace exactly where the problem is. It seems to me that this is very related to MySQLDB cursor implementaton. What I want to do is to run the raw sql from the interactive mode like this: import MySQLdb db=MySQL