def event(request, idn): try: record = EventRecord.objects.get(id=idn) except: record = EventRecord.objects.all()[0] idn = record.id '''Site must have one or more EventRecord ''' if record.report: event_template = 'event_report.html' else: event_template = 'event_anounce.html' return render_to_response( event_template, { 'backgr': MainMenuItem.objects.get(url=sufix), 'mainmenu': MainMenuItem.objects.all().exclude(url='/'), 'lang': change_lang(request), 'event': EventRecord.objects.get(id=idn), 'socnets': SocNet.objects.all(), 'lasts': EventRecord.objects.all().order_by('id')[:four], 'anon': EventRecord.objects.all().order_by('-id')[:1][0].id, 'photo': EventRecord.objects.all().filter( report=True).order_by('-id')[:1][0].id, })
def event(request, idn): try: record = EventRecord.objects.get(id = idn) except: record = EventRecord.objects.all()[0] idn = record.id '''Site must have one or more EventRecord ''' if record.report: event_template = 'event_report.html' else: event_template = 'event_anounce.html' return render_to_response(event_template, { 'backgr': MainMenuItem.objects.get(url = sufix), 'mainmenu': MainMenuItem.objects.all().exclude(url = '/'), 'lang': change_lang(request), 'event': EventRecord.objects.get(id = idn), 'socnets': SocNet.objects.all(), 'lasts': EventRecord.objects.all().order_by('id')[:four], 'anon': EventRecord.objects.all().order_by('-id')[:1][0].id, 'photo': EventRecord.objects.all().filter(report = True).order_by('-id')[:1][0].id, } )
def portf_index(request): request = set_lang(request) return render_to_response( 'index_portfolio.html', { 'lastposts': five_last_post(), 'categorys': PortfCateg.objects.all(), 'backgr': MainMenuItem.objects.get(url=portfolio_sufix), 'mainmenu': MainMenuItem.objects.all().exclude(url='/'), 'lang': change_lang(request), 'lasts': EventRecord.objects.all().order_by('id')[:four], })
def portf_item(request, portf): request = set_lang(request) project = PortfRecord.objects.get(url=portf) return render_to_response( 'project_portfolio.html', { 'lastposts': five_last_post(), 'categ_down': categorys_in_row(project.category.name_in_uri), 'portfolio': project, 'backgr': MainMenuItem.objects.get(url=portfolio_sufix), 'mainmenu': MainMenuItem.objects.all().exclude(url='/'), 'lang': change_lang(request), 'lasts': EventRecord.objects.all().order_by('id')[:four], })
def portf_index(request): request = set_lang(request) return render_to_response( "index_portfolio.html", { "lastposts": five_last_post(), "categorys": PortfCateg.objects.all(), "backgr": MainMenuItem.objects.get(url=portfolio_sufix), "mainmenu": MainMenuItem.objects.all().exclude(url="/"), "lang": change_lang(request), "lasts": EventRecord.objects.all().order_by("id")[:four], }, )
def portf_item(request, portf): request = set_lang(request) project = PortfRecord.objects.get(url=portf) return render_to_response( "project_portfolio.html", { "lastposts": five_last_post(), "categ_down": categorys_in_row(project.category.name_in_uri), "portfolio": project, "backgr": MainMenuItem.objects.get(url=portfolio_sufix), "mainmenu": MainMenuItem.objects.all().exclude(url="/"), "lang": change_lang(request), "lasts": EventRecord.objects.all().order_by("id")[:four], }, )