def get_common_context(request): c = {} c['request_url'] = request.path c['categories'] = Category.get_all() c['registration_form'] = RegistrationForm() c['reviews'] = Review.get_recent(COMMENTS_COUNT_ON_PAGE) c['comments'] = Comment.get_recent(COMMENTS_COUNT_ON_PAGE) c['marks'] = [x for x in range(1, 10)] c['genres'] = Genre.get_all() c['fandoms'] = Fandom.get_all() c['warnings'] = Warning.get_all() c['categoriest_first_part'], c['categoriest_second_part'] = Category.get_two_parts() c['genre_f_part'], c['genre_s_part'], c['genre_t_part'], c['genre_fo_part'] = Genre.get_four_parts() c.update(csrf(request)) return c
def get_common_context(request): c = {} c['request_url'] = request.path c['user'] = request.user c['user_profile'] = request.user.get_profile() c['categories'] = Category.get_all() c.update(csrf(request)) return c