def get_venues(): return Venue.gql("WHERE oneshot = :1 ORDER BY name", False).fetch(1000);
def get_form(self, request, obj=None, **kwargs): form = super(VenueFileAdmin, self).get_form(request, obj, **kwargs) form.base_fields['venue'].queryset = Venue.gql("WHERE oneshot = FALSE ORDER BY oneshot, name") return form
def get_venue_by_name(venue): venuelist = Venue.gql("WHERE ladypenh_url = :1", venue).fetch(1) if len(venuelist) == 0: raise Http404 return venuelist[0]