django forums with polling

2010-05-09 Thread Simon Davies
Are there any django forum applications available which come packaged with polling functionality? Cheers Simon -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe

generic relations with admin

2010-03-04 Thread Simon Davies
Hi I have a shopping cart application, where by each cart can hold several kinds of objects, I have therefore used generic relations to model the application along the lines of below, whereby each cart can have many cartitems which are linked by a standard foreign key relationship, the cartitems

stackedinline admin form-set collapse

2010-03-01 Thread Simon Davies
Is there a way to collapse the stacked inline form-sets in the admin app, a parameter I can define in admin.py for inline class. Ideally this would work so I could have extra=1, which would give me the functionality of clicking to open the form to add another object. Thanks Simon -- You

Re: dynamically excluding fields in admin form

2010-02-28 Thread Simon Davies
) if obj == None: del form.base_fields['cancelled'] return form On 28 Feb, 13:00, Simon Davies <simon...@gmail.com> wrote: > Hi > > I have a model which I access from the admin application.  I want to > exclude some fields dynamically. > > My model looks like th

dynamically excluding fields in admin form

2010-02-28 Thread Simon Davies
Hi I have a model which I access from the admin application. I want to exclude some fields dynamically. My model looks like this: class StockOrder(models.Model): number_of_items_pending_order = models.PositiveIntegerField(max_length=5, default=1) number_of_items_ordered =

Re: weird problem with django admin models and webfaction

2010-02-22 Thread Simon Davies
Duh!! yeah restarting apache did it. How did I forget something so simple!! Thanks Simon On 22 Feb, 15:04, Shawn Milochik wrote: > Did you manually restart the Apache instance for this app? > > I had a similar problem, and it turned out that I had a bit of code in one of

weird problem with django admin models and webfaction

2010-02-22 Thread Simon Davies
Hi I'm still developing my app and I have just refactored my models in my django app. I dropped most of the existing tables on my local dev machine and then completely rebuilt everything using syncdb, everything worked fine, including the admin, no probs at all. Then I updated everything on my

model design and derived classes - need advice please?

2010-02-02 Thread Simon Davies
Hi I am writing a web shop. I have a shopping cart class, which has a many to many relationship to an item class, the item class has three derived classes. The basic schema is shown below: class Item(models.Model): title = models.CharField(max_length=100) description =

now template tag

2010-01-26 Thread Simon Davies
Hi I have been having some problems with the now date template tag. I want to use it in the url tag. This works fine with the date tag: {% url news_archive_month year=date|date:'Y' month=date|date:'m' day=date|date:'d' %} but if I want to use it with the current date using the now tag, it

unicode encoding problem

2010-01-03 Thread Simon Davies
I know I'm missing something really simple really but I keep getting this error: SyntaxError: Non-ASCII character '\xc2' in file /home/simon/ djangoprojects/bikerescue/bikeshop/models.py on line 46, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details. This is the

Re: setting choices on choice field dynamically according to objects current state

2009-05-27 Thread Simon Davies
Thanks v What you said echoes what I found on a posting on djangosnippet.org about populating the choices in the init field. It works fine now. On May 26, 9:30 am, V <viktor.n...@gmail.com> wrote: > On May 25, 1:27 pm, Simon Davies <simon...@gmail.com> wrote: > > > &g

setting choices on choice field dynamically according to objects current state

2009-05-25 Thread Simon Davies
I have a choices field called status in my model form which can be set to a number of values, however the options available will be based on its current state something like this, so it needs to refer to itself: class ContractForm(ModelForm): def getStatusChoices() if status == 'r':