Attempt to get csrf tag working in django 1.1-

This commit is contained in:
Martin Green
2011-05-02 03:11:17 +01:00
parent 835680f0ee
commit 52eb4030d0
3 changed files with 13 additions and 1 deletions

View File

@@ -451,10 +451,12 @@ class Cave(TroggleModel):
return res
def getCaveByReference(reference):
print reference
areaname, code = reference.split("-", 1)
print areaname, code
area = Area.objects.get(short_name = areaname)
print area
foundCaves = list(Cave.objects.filter(area = area, kataster_number = code).all()) + list(Cave.objects.filter(area = area, unofficial_number = code).all())
print list(foundCaves)
assert len(foundCaves) == 1
return foundCaves[0]