Example #1
0
File: views.py Project: kpx13/h2h
def wedding_place(request, type, country, place):
    c = get_common_context(request)
    c["country"] = Country.get_by_slug(country)
    c["place"] = Place.get_by_slug(place)
    c["event_type"] = get_event_type(type)
    if not c["event_type"]:
        c["event_type"] = get_event_type_by_id(c["place"].event_type.all()[0].id)
    return render_to_response("wedding_place.html", c, context_instance=RequestContext(request))
Example #2
0
File: views.py Project: kpx13/h2h
def wedding_country(request, type, country):
    c = get_common_context(request)
    c["country"] = Country.get_by_slug(country)
    c["event_type"] = get_event_type(type)
    if not c["event_type"]:
        c["event_type"] = get_event_type("official")
    c["places"] = Place.objects.filter(event_type=c["event_type"][0], country=c["country"])
    c["we_create_left"] = Category.objects.get(id=6)
    c["we_create_center"] = Category.objects.get(id=9)
    c["we_create_right"] = Category.objects.get(id=3)
    return render_to_response("wedding_country.html", c, context_instance=RequestContext(request))