def get(self, request, *args, **kwargs): repo_name = RepoDbIO().get_repo(request.user).repo form_response = SBSFormHandler( request.user, repo_name).load_site_initials( request, self.form_class) return render(request, TemplateName.SBS_POST_DATA, {'form': form_response})
def get(self, request, pk='', *args, **kwargs): repo_name = RepoDbIO().get_repo(request.user).repo form_response = SBSFormHandler( request.user, repo_name).load_page_initials( request, self.form_class, pk) return render(request, TemplateName.SBS_PAGE_DATA, {'form': form_response, 'media': settings.MEDIA_URL})
def post(self, request, *args, **kwargs): form_field_dict = FormHandler( request, self.form_class).handle_post_fields(( 'email', 'facebook', 'github', 'twitter') ) user = request.user repo_name = RepoDbIO().get_repo(request.user).repo SBSFormHandler( user, repo_name).post_social_profile_data(user, form_field_dict) return render(request, TemplateName.SBS_SOCIAL_DATA, {'msg': 'Social data updated successfully.'})
def post(self, request, pk='', *args, **kwargs): form_field_dict = FormHandler( request, self.form_class).handle_post_fields(( 'title', 'description', 'background', 'content') ) user = request.user repo_name = RepoDbIO().get_repo(request.user).repo SBSFormHandler( user, repo_name).post_page_data(user, form_field_dict) return render(request, TemplateName.SBS_PAGE_DATA, {'msg': 'Post updated successfully.'})
def post(self, request, *args, **kwargs): form_field_dict = FormHandler( request, self.form_class).handle_post_fields(( 'title', 'description', 'author', 'baseurl', 'url') ) user = request.user repo_name = RepoDbIO().get_repo(request.user).repo SBSFormHandler(user, repo_name).post_site_data(user, form_field_dict) return render(request, TemplateName.SBS_SITE_DATA, {'msg': 'Site data updated successfully.'})