Hi,
I'd like to get to know if there is possibility to combine generic
views - object_list and object_detail.
In my application I have object_detail template showing Resource
details. The details are resource_name, object_id and
resource_reservation_reasons. Resource_reservation_reasons should be a
list. So far so good.
The problem is that if I add a new reason to the reason list it can be
visible in the template only if I restart my server.
Is there any method to pass object_id (also in url) to the template
which will also show resource_reservation_reasons list in a proper
way?

(in this situation it would be ideal for me if there was object_id
attribute in object_list generic view)

my models:
class Resource (models.Model):

    id = models.AutoField(primary_key=True)
    resource_name = models.CharField(maxlength=200)
    creation_resource_date = models.DateTimeField(auto_now_add=True)
    modification_resource_date = models.DateTimeField(auto_now=True)

class ReservationReason(models.Model):

    resource = models.ForeignKey(Resource)
    reservation_reason = models.CharField(maxlength=200)

thx, Ann


--~--~---------~--~----~------------~-------~--~----~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to