Re: environment variables in virtualenv's postactivate using mod_wsgi

2013-05-22 Thread Graham Dumpleton
On Thursday, 23 May 2013 07:57:02 UTC+10, ke1g wrote: > > Since my Apache virtualhost file contains >> >> WSGIDaemonProcess mysite.local >> python-path=/my/python/path:/path/to/my/project/venv/lib/python2.7/site-packages >> > > If memory serves, this does not cause the .pth files in site-packages

Re: Multi Client Django System

2013-05-22 Thread Richard E. Cooke
Frank! You appear to have figured out what I spent most of today trying to figure out: How to get access to the current logged in user from INSIDE a custom data manager! Can you clarify something in your code? In your custom manager you define "by_user", which takes "user" as an input. But

Re: Show HTML in Labels for Model Choice Fields

2013-05-22 Thread Guillermo Siliceo
Hey Adi your answer saved me lots of work, but i want to elaborate on it, i had this use case but i didnt have to subclass the field all i did was defined a new label_from_instance def Option_with_specie(self): return mark_safe(" %s "%(self.species.name, self.pk, self.name)) And then on

Re: IdeaScale-alike DJango applications

2013-05-22 Thread Russell Keith-Magee
On Wed, May 22, 2013 at 6:53 PM, Daniele Procida wrote: > Are there any Django applications that do the same thing as < > http://ideascale.com>? > > IdeaScale basically seems to be a way for users to submit proposals, and > have them voted up and down by other users; like

Re: site critique

2013-05-22 Thread frocco
Thanks, I need to work on getting the font size corrected. On Wednesday, May 22, 2013 6:01:51 PM UTC-4, Nigel Legg wrote: > > Ah yes. main site home page has a variety of font sizes which looks a > bit odd. > > Regards, > Nigel Legg > 07722 652866 > http://twitter.com/nigellegg >

Re: site critique

2013-05-22 Thread Nigel Legg
Ah yes. main site home page has a variety of font sizes which looks a bit odd. Regards, Nigel Legg 07722 652866 http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 22 May 2013 22:59, Nikolas Stevenson-Molnar wrote: > The link is actually to an

Re: site critique

2013-05-22 Thread Nikolas Stevenson-Molnar
The link is actually to an admin page. _Nik On 5/22/2013 2:53 PM, Nigel Legg wrote: > Site is asking for a username and password, so I can't look at it. > > Regards, > Nigel Legg > 07722 652866 > http://twitter.com/nigellegg > http://uk.linkedin.com/in/nigellegg > > > > On 22 May 2013 14:24,

Re: environment variables in virtualenv's postactivate using mod_wsgi

2013-05-22 Thread Bill Freeman
On Wed, May 22, 2013 at 12:41 PM, Charles Mulder wrote: > Hi, > > Hope you're well. > > I've added a couple of environment variables to my virtualenv postactivate > file, for example: > > export DATABASE_USER="root" > export DATABASE_PASSWORD="12345678" > N.B. that

Re: site critique

2013-05-22 Thread Nigel Legg
Site is asking for a username and password, so I can't look at it. Regards, Nigel Legg 07722 652866 http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 22 May 2013 14:24, frocco wrote: > Hi Every one, > > I have my PHP site up and running that I converted

custmoizing admin using template files

2013-05-22 Thread Christopher Spears
Hi! I am working through the Django tutorial, and I have reached the part where I want to customize my admin. Basically, I want 'Chris Spears App' to appear at the top of the page instead of 'Django administration'. I copied the base_site.html file from its home to

Re: New user - template errors.

2013-05-22 Thread Nigel Legg
Cool, thanks. And sorry - I should have gone there first. Regards, Nigel Legg 07722 652866 http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 22 May 2013 17:01, Michael wrote: > Hi Nigel, take a look at these, they might provide some answers: > > >

Re: Understanding Django transactions

2013-05-22 Thread Michael
Hi Aymeric, That's awesome, really appreciate you clarifying all of that! Look forward to watching the video of your talk, the slides look great. Cheers! On Tuesday, 21 May 2013 17:43:00 UTC+1, Aymeric Augustin wrote: > > Hi Michael, > >> >> *Django 1.5:* >> > >>- The database-level

Unable to get notifications - Django Push

2013-05-22 Thread surya
I am using Django-push project for my app. What I am doing is, read my blog, find whether new updates available. If present, store in the db. This is not happening! The source code is here : https://gist.github.com/5628801 So, if would be great if

environment variables in virtualenv's postactivate using mod_wsgi

2013-05-22 Thread Charles Mulder
Hi, Hope you're well. I've added a couple of environment variables to my virtualenv postactivate file, for example: export DATABASE_USER="root" export DATABASE_PASSWORD="12345678" I then assign those variables in my settings.py using os.environ['DATABASE_USER'], for example DATABASE_USER

DjangoCon US 2013 CFP is open

2013-05-22 Thread Christophe Pettus
Hi, all, The Call for Proposals for DjangoCon US 2013 is now open! We encourage everyone, regardless of speaking experience, to submit a proposal. We're particularly interested this year in hands-on experiences and case-studies: http://www.djangocon.us/cfp/ Thanks! -- -- Christophe

Re: New user - template errors.

2013-05-22 Thread Michael
Hi Nigel, take a look at these, they might provide some answers: http://stackoverflow.com/questions/14892462/django-error-upolls-is-not-a-registered-namespace http://stackoverflow.com/questions/16049972/django-tutorial-04-noreversematch-at-polls-1-upolls-is-not-a-registered-na On Wednesday, 22

Django's cascade delete is executing the DELETE SQL twice

2013-05-22 Thread Michael
I've got an odd situation here, any idea why the delete SQL for the `myapp_entry_tag` table is being performed twice? >>> from myapp.models import Tag >>> from django.db import connection >>> from pprint import pprint >>> Tag.objects.only('pk').get(pk=1).delete() >>> pprint(connection.queries)

Re: Django 1.6 Connection Pooler

2013-05-22 Thread Joe Jasinski
Thanks for that clarification. On Friday, May 17, 2013 2:22:14 AM UTC-5, Christophe Pettus wrote: > > > On May 17, 2013, at 12:57 AM, Joe Jasinski wrote: > > > So I hear that Django 1.6 will ship with a connection pooler built in, > which is awesome. Does this remove the need to have a

site critique

2013-05-22 Thread frocco
Hi Every one, I have my PHP site up and running that I converted to django. Would you have a look at this production site and let me know your opinions? Current users are very fussy and resist change. http://ntwarehouse.net One problem I

Re: define BASE_DIR?

2013-05-22 Thread Tom Evans
On Tue, May 21, 2013 at 10:08 PM, Christopher Spears wrote: > I am working my way through the Django tutorial, and I have reached the part > where I am supposed to customize the look and feel of the admin. I am > supposed to do that using the mysite\settings.py file

Re: problem with ImageField does not show me the picture on a template

2013-05-22 Thread Tom Evans
On Wed, May 22, 2013 at 2:10 AM, Ronny Villarroel Mendoza wrote: > Hi all, > > I cant show the picture that I upload from the admin site. > > > settings.py: > > MEDIA_ROOT = '/var/www/fourweb/' > > > > models.py: > > class picture(models.Model): > producto_id =

New user - template errors.

2013-05-22 Thread Nigel Legg
Morning/Afternoon - I am new to django, and I have been working through the tutorial. I have reached Tutorial 4, https://docs.djangoproject.com/en/1.5/intro/tutorial04/, which is about getting the voting on the polls app to work, but when I set detail.html I get an error, " NoReverseMatch at

IdeaScale-alike DJango applications

2013-05-22 Thread Daniele Procida
Are there any Django applications that do the same thing as ? IdeaScale basically seems to be a way for users to submit proposals, and have them voted up and down by other users; like polls, but in a web 2.1beta kind of way. It's something I've been asked about. Any

Re: Object Lookup after Save

2013-05-22 Thread Christian Schmitt
if you want transactions you need to do : with transaction.atomic(): like described here: https://docs.djangoproject.com/en/dev/topics/db/transactions/ Am Mittwoch, 22. Mai 2013 10:40:15 UTC+2 schrieb Christian Schmitt: > > In Django the normal behavior should be that when you do a save() it

Re: Object Lookup after Save

2013-05-22 Thread Christian Schmitt
In Django the normal behavior should be that when you do a save() it will automatically commit() your query's to the database. so that in obj.save() you should just could access the pk with obj.id after you did a obj.save(). If you want to maybe stop the commit you need to do a obj =

Re: Understanding Django transactions

2013-05-22 Thread Christophe Pettus
On May 21, 2013, at 12:43 PM, Aymeric Augustin wrote: > Anyway, in this scenario, `atomic` will work as expected. When autocommit is > off, you're always in a transaction, and as a consequence `atomic` uses > savepoints to guarantee atomicity; it'll never commit. You have to call >