hi
latest svn, apache and mod_python on fedora 11 (same problem with runserver)

I have three models: Event, Report and Meeting.
Outside admin I have addevent which adds and event, event, which gives a list 
of events and eventfull which details one event.. And the same for Report and 
Meeting.

addevent works fine and so does listing of events - and so does Meeting and 
Report. I have done this so many times in the last 4 years that I can do it in 
my sleep. But this time eventfull does not work. It does not throw errors. The 
template is displayed, but the data is from Meeting. The same thing happens 
with reportfull. What django is doing is calling eventfull, getting data from 
meetingfull and displaying that in eventfull.html. I have another app with the 
same three models which works perfectly on the same machine with the same 
configuration. Obviously I am doing something stupid. But what? Here is my 
urls.py (relevant extracts):

urlpatterns = patterns('ilugc.web.views',
    url(r'^$', 'report', name='report'),
    #meeting
    url(r'^meeting/$', 'meeting', name='meeting'),
    url(r'^meetingfull/(?P<id>\d+)/$', 'meetingfull', name='meeting_by_id'),
    #report
    url(r'^report/$', 'report', name='report'),
    url(r'^report/(?P<topic>\d+)/$', 'report', name='report_by_tag'),
    url(r'^addreport/$', 'addreport', name='addreport'),
    url(r'^addreport/(?P<id>\d+)/$', 'addreport', name='add_report'),
    url(r'^reportfull/(?P<id>\d+)/$', 'reportfull', name='report_by_id'),
    #event
    url(r'^event/$', 'event', name='event'),
    url(r'^addevent/$', 'addevent', name='addevent'),
    url(r'^addevent/(?P<id>\d+)/$', 'addevent', name='add_event'),
    url(r'^eventfull/(?P<id>\d+)/$', 'eventfull', name='event_by_id'),

and the relevant extract from views.py:

def event(request):
    """
    list of events by topic
    """
    
    lst=Event.objects.all()
    t = loader.get_template('web/event.html')
    c = RequestContext(request,
                {'lst':lst,
                 })
    return HttpResponse(t.render(c))
    
def eventfull(request,id):
    """
    Details of specific Events
    """
    canedit = False
    p = Event.objects.get(pk=id)
    if p.author_id == request.user.id:
        canedit=True
    t = loader.get_template('web/eventfull.html')
    c = RequestContext(request,
                {'p':p,
                'canedit': canedit,
                 })
    return HttpResponse(t.render(c))

-- 
regards
kg
http://lawgon.livejournal.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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