Re: Data migrations ran multiple times during deploy

2023-01-07 Thread quentinsf
Most of our stuff is deployed under Docker Swarm - though it would work with compose or other systems - and typically we have a separate service, using our standard container image for the app but with the command overridden to run 'manage.py migrate'. The swarm is told to run just one replica

Opportunity at Cambridge Visual Networks

2007-11-15 Thread quentinsf
I know this isn't really a job bulletin board, so I'll keep this brief! We're in Cambridge, UK, and we're building a fun architecture with lots of Python and a significant Django-based component. We've got an opportunity which might be of interest if you like Django. More information on camvine

Re: ManyToManyField, limit_choices_to and properties of the request object

2007-03-19 Thread quentinsf
Brilliant - thanks, Sam. Is this in the docs anywhere, I wonder? I've seen a few queries along these lines. Might be an FAQ Q --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: ManyToManyField, limit_choices_to and properties of the request object

2007-03-19 Thread quentinsf
I need to do something similar. In a form I want to limit the options in a ForeignKey's pull-down select field to objects owned by an organisation of which the user is a member. I've been trying to work out where this would fit. Any help much appreciated. --~--~-~--~~

Re: Can I get stdout from mod_python?

2007-02-05 Thread quentinsf
Thanks Honza - That's a nice solution. I'll follow your example. Quentin --~--~-~--~~~---~--~~ 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

Can I get stdout from mod_python?

2007-02-05 Thread quentinsf
I'm developing some code which I need to run under mod_python - the 'runserver' option won't work because it's complex stuff and I need to handle multiple simultaneous requests, even in the early debugging stages. It would be really nice to see the output of my print statements. I know I could w

Re: limit_choices_to: getting access to current instance

2007-01-30 Thread quentinsf
Sorry, the reference to 'Display' should have been to 'MyObject' --~--~-~--~~~---~--~~ 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 unsubscrib

Re: limit_choices_to: getting access to current instance

2007-01-30 Thread quentinsf
I'm not quite sure if this is helpful - it's not a general solution on the ForeignKey specification so wouldn't work in admin, for example, but it worked for me with my own form... I was creating a view for a 'change' form. One parameter passed to the view (from the URL) was an organisation i

Re: Magic removal

2006-02-05 Thread quentinsf
Yes, the magic removal stuff will mean quite a lot of changes for me too. But I think the platform will be greatly improved as a result, and fortunatley my app hasn't grown too large yet! One thing I love about Django is how well Adrian and co usually go about documenting the changes. http://co

Re: Registered and unregistered users

2005-12-31 Thread quentinsf
Well, I've now done part of this. When a user invites someone to the site (by specifying their email address), a new user is immediately created with the email address as username. I wanted a way for one of these users to login. So I've written a function which, given a URL path and a User, cre

Re: Method call in template, how?

2005-12-31 Thread quentinsf
If you have a Poll object as per the tutorial which has a get_choices() method, and your view passes it to the template as 'p', you can simply do: {{ p.get_choices }} in the template, or perhaps more usefully something like this: {% for c in p.get_choices %} Choice is {{c}}. {% endfor %} It's

Registered and unregistered users

2005-12-26 Thread quentinsf
I'm building a site where some users will be registered, and allowed to do lots of things, and some will be identified, and able to do fewer things, but not required to register (by which I mean not required to create a password etc - They will be invited to the site by others, and sent URLs by e

Re: Upgrading models...

2005-12-26 Thread quentinsf
There's also some stuff here: http://code.djangoproject.com/wiki/DocumentationSuggestions Quentin

Re: Adding ManyToMany relationships

2005-12-07 Thread quentinsf
OK, I've found the code, and it looks as if set_FOOs() does intelligent things about only updating the *changes* to the list of object IDs. I'll use that for now. Add and Delete methods would be nice though, as would something that takes objects instead of IDs. Seems more Djangoesque. (Is that

Re: Adding ManyToMany relationships

2005-12-07 Thread quentinsf
Oh, and I'm using the latest svn trunk.

Adding ManyToMany relationships

2005-12-07 Thread quentinsf
Sorry - I'm probably doing something silly here... I have a 'Meeting' object which has a list of required attendees and a list of optional attendees. The admin interface works fine, but I'm stuck when it comes to manipulating these relationships in my own code. The attendees are Users. So I h

Re: User permission setting problem

2005-09-28 Thread quentinsf
I think you need to update the permissions database when you update the model using sqlinitialdata. I put something at the bottom of this page: http://code.djangoproject.com/wiki/DocumentationSuggestions which might help? But I'm learning too, so don't take it as too authoritative! Best, Qu

Re: Suggested doc updates

2005-09-28 Thread quentinsf
OK - Some notes added at http://code.djangoproject.com/wiki/DocumentationSuggestions and it's linked from the front page. Hopefully someone will correct any gross foolishness! Quentin

Suggested doc updates

2005-09-27 Thread quentinsf
As a newbie learning Django (and being thoroughly impressed, by the way), I've come across a few places where the documentation is rather thin (or I haven't found the right bit). I'm keen to help where I can, so thought I might add to the wiki, but I'm also concerned that I may mislead people wit

Re: filesystem browser tutorial

2005-08-04 Thread quentinsf
Carlo C8E Miron wrote: > (01:48:31) hugo-: I have a small tutorial online where I show how to > write a simple filesystem browser with django And very nice it is, too! Thanks!