Re: Complex query reduction

2013-11-01 Thread Javier Guerra Giraldez
On Fri, Nov 1, 2013 at 12:45 PM, Daniele Procida wrote: > In practice I use some tweaks (such as values_list) to speed this up, and > caching, but the fundamental pattern is the same. It's slow, because there > are 30 thousand BibliographicRecords. the total number of

Re: What is the best solution to deploy Django on a Windows server?

2013-11-01 Thread Guddu
I have Deployed Django with Apache 2.2 + mod_wsgi on a Windows Server 2003 Production environment (No Virtualization) and it works like a Charm. On Friday, 11 October 2013 12:35:06 UTC-3, Augusto Destrero wrote: > > A client of mine want to keep its existing Windows Server infrastructure, > so

Managing existing UI

2013-11-01 Thread Paolo Giannoccaro
Hi All, which are the best practices while developing a full Django app (version 1.5, Phyton 3) starting from an existing html UI ? The template approach is still valid ? In this case which is the impact over existing html UI ? Many thanks -- You received this message because you are

Re: handling field DoesNotExist error within a model class

2013-11-01 Thread Simon Charette
Use the `DateTypeModelClass.DoesNotExist` exception. By the way, make sure you use `select_related()` if you want to use `__unicode__` on those instances or it will results in 1 + N * 6 queries where N = `Channel.objects.count()`. Le vendredi 1 novembre 2013 12:46:21 UTC-4, Rick Shory a écrit

Complex query reduction

2013-11-01 Thread Daniele Procida
I have been exploring a rather complex query: # get all the MPTT descendants of entity entities = entity.get_descendants() # get all the Researchers in these Entities researchers = Researcher.objects.filter(person__member_of__entity__in=entities) # get all the BibliographicRecords for these

Logging warnings inside settings.py

2013-11-01 Thread Jon Dufresne
Hi, I am trying to log warnings inside settings.py. I want to log warnings when settings (from an outside source) are not provided, but the application can continue. Is this possible? It seems like this might not work as logging requires settings.py in order to be configured, but I want to log

handling field DoesNotExist error within a model class

2013-11-01 Thread Rick Shory
I have a model "Channel" with various foreign key fields (e.g. "data_type" below). I have a __unicode__ method to give intelligible information about the model instance by pulling in the foreign key info. For example: def __unicode__(self): ... t = self.data_type

Re: Django Outbox Released

2013-11-01 Thread Antoni Aloy
Actually we use https://github.com/APSL/django-mailer-2 which we modified to be able to display htlm mails as well as text ones and the attachments. django-mailers allows us to use the same configuration on development, staging and production, in no production environment we don't activate the

Re: relative URLs in redirects

2013-11-01 Thread msoulier
Damn. Missed that. Thanks. On Thursday, October 31, 2013 12:56:11 PM UTC-4, Tom Evans wrote: > > The Location header must always be a fully qualified URI, according to > every single version of the HTTP RFC from RFC 1945 onwards. > > Cheers > > Tom > -- You received this message because you

Re: Multiple logins

2013-11-01 Thread amanjot kaur
On Fri, Nov 1, 2013 at 4:17 PM, Avraham Serour wrote: > are you using sqlite? No, I am using mysql. -- Amanjot Kaur Blog: kauramanjot35.wordpress.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

psycopg2._psycopg.cursor missing cursor.fetchnone/cursor.fetchall

2013-11-01 Thread hjr1
Hi all. I am trying to use django.db.connection with psycog2 (postgres). I can run something like cursor=connection.cursor(); cursor.execute("SELECT * FROM app_mymodel") … but it looks like psyog2 is missing cursor.fetchnone/cursor.fetchall. A bit surprised on this as it is documented

[no subject]

2013-11-01 Thread Harjot Mann
The following picture is displaying is showing the html template results in which it is shown that the number 22 repeats two times and it is having separate ref numbers, and I want that the repeated values should not appear twice. ex: some amount line 5301 is appearing in both but i dnt need it, I

Re: Multiple logins

2013-11-01 Thread Avraham Serour
are you using sqlite? On Fri, Nov 1, 2013 at 6:52 AM, amanjot kaur wrote: > In my django app if two users are login in the same account and are > registering two different clients then both the clients are added > under the same client id but it should register under

Re: New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value)

2013-11-01 Thread Jimmy Pants
Expanding on Daniel Roseman's suggestion, I recommend the Web Fundamentals course at www.codecademy.com - totally free, and pretty good, covers CSS stylesheets as well. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this