def network_list(request): """ Get a list of unchanged networks from architect.""" flatpage = get_flatpage_or_none(request) network_list = Network.objects.filter(user_id=0) return { 'flatpage': flatpage, 'network_list': network_list, }
def mainpage(request): """ Site main page Shows content from flatpage and latest news list """ flatpage = get_flatpage_or_none(request) news_list = News.objects.all()[:settings.LATEST_NEWS_COUNT] return { 'flatpage': flatpage, 'news_list': news_list, }