Hi,
(I'm a bit of a newbie to Django so excuse any foolish mistakes)
I'm writing a basic paper review system for a conference (Paper is the
primary object, with Note and Vote objects having a foreign key to the
paper), and currently have it somewhat working. Now my task is to
make the list of p
(re-sending, apologies if this hits the list twice)
On Mar 24, 5:27 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> What is it you want to do with the ones they've voted on vs. haven't? If
> you're going to hide the ones they've already voted on, just write a
> query in the view method that only
On Mar 25, 3:28 pm, "Ross Burton" <[EMAIL PROTECTED]> wrote:
> > What is it you want to do with the ones they've voted on vs. haven't? If
> > you're going to hide the ones they've already voted on, just write a
> > query in the view method th
Hi,
I have a model with an integer field that uses choices for display
names:
class Task(models.Model):
PRIORITY_CHOICES = (
('0', 'Low'),
('1', 'Normal'),
('2', 'High')
)
priority = models.IntegerField(choices=PRIORITY_CHOICES)
In my view, I'm grouping the d
Jacob Kaplan-Moss wrote:
> Try::
>
> {% regroup feature.task_set.all|dictsortreversed:"priority" by
> get_priority_display as grouped %}
>
> That is, the "by" argument to {% regroup %} doesn't just have to be a field
> name; it can be anything that a variable could resolve.
Excellent, thanks.
Ro
Hi,
Is it possible to have fields in the model that can be set at object
creation, but are immutable after that? I have an "original estimate"
field that should only be set when creating the object, and never
edited after that.
Thanks,
Ross
--~--~-~--~~~---~--~
Hi,
Is it possible to have programmatic defaults in a model? If I have a
many to one relationship between A and B, I'd like A.flob to default to
B.flob. Also A.foo should default to B.foo if it isn't specified.
Would the best way of doing this be in a custom save() method in the
model?
Thanks
MerMer wrote:
> You can add "editable=False" to you database model. This prevents it
> from showing up in Admin, though of course it can still be edited
> directly in the DB.
This stops it being set in the admin when creating a new object, which
isn't what I want.
I think I'll have to hack the
8 matches
Mail list logo