--- Here's the model:
class DaySlot(models.Model):
slot = models.TimeField(core=True)
taken = models.BooleanField(core=True)
day = models.ForeignKey(Day, edit_inline=models.TABULAR,
num_in_admin=6)
def __str__(self):
return str(self.slot)
--- Here
> INSERT INTO sched_day (name) VALUES ('Eight To Five');
> INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('08:00',
> 'True', '1');
> INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('09:30',
> 'True', '1');
> INSERT INTO sched_dayslot (slot, taken, day_id) VALUES ('11:00',
> 'False
i'll try it, but the database seems to be initialized properly, because when i look at the data thru the admin interface, it all looks good. it's the part where the template shows the checkboxes (after retrieving the data and presumably picking up the dslots.taken flag for each one) that shows
On Mon, 2006-10-02 at 16:51 -0700, carlwenrich wrote:
[...]
> def admin_wslots(request):
> global venue
> global vslot
> global week
> global wslot
> global day
You *really* don't want to use globals here. There doesn't appear to be
any need and it's going to cause l
thanks much.Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: On Mon, 2006-10-02 at 16:51 -0700, carlwenrich wrote:[...]> def admin_wslots(request):> global venue> global vslot> global week> global wslot> global dayYou *really* don't want to use globals here. There doesn't appear to beany need an
How do I pass those (global) values from one view to another when going
through a template?
--~--~-~--~~~---~--~~
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@goo
On Mon, 2006-10-02 at 19:34 -0700, carlwenrich wrote:
> How do I pass those (global) values from one view to another when going
> through a template?
You could put the information in the user's session (see [1]). You can
store pretty much anything you like a session object, so if you want
certain
I knew it was a problem (I didn't want to do it in the first place,
though I thank you for letting me know that it was even worse than I
thought). What I need to know is how to pass those values from one view
to a template, and then forward to the next view.
--~--~-~--~~~
On Mon, 2006-10-02 at 20:08 -0700, carlwenrich wrote:
> I knew it was a problem (I didn't want to do it in the first place,
> though I thank you for letting me know that it was even worse than I
> thought). What I need to know is how to pass those values from one view
> to a template, and then for
9 matches
Mail list logo