I cannot for the life of me get a session variable to work in a
template tag.  Here's what I have

...
from django.contrib.sessions.models import Session

register = template.Library()

@register.filter(name='isinsavedlist')
# this gets the latest new item from the new item flex mod
def isinsavedlist(request):
    try:
        myval=int(request)
    except:
        myval=0

    assert False, request.session["mylist[]"]


When it tries to assert the value for mylist, i get the following:

'long' object has no attribute 'session'


what am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to