tag: code refactoring

How to create a fullstack application using Django and Python Part 32
Maria D. Campbell
In this section, I prepare my django-boards application for deployment to Render.
#code refactoring, #debugging, #deployment, #django, #environ, #fullstack development, #local environment, #macOS, #persistent disk, #production environment, #python-decouple, #python-dotenv, #python3, #python shell, #render, #scp, #series, #settings directory, #ssh, #transferring files

How to create a fullstack application using Django and Python Part 27
Maria D. Campbell
In this section, I make some adjustments to existing functionalities, sanitize our Markdown, add code formatting and highlighting to our Markdown, create tests for the ProfileListView, protected function based profile view, and profile_detail view, update accounts/tests/test_form_signup_test.py, fix the topic posts avatar issue, and explain the extended profile functionality.
#fullstack development, #macOS, #django, #python3, #code refactoring, #markdown, #nh3, #sanitization, #fenced code, #code highlighting, #pygments, #series, #tests, #unittest

How to create a fullstack application using Django and Python Part 24
Maria D. Campbell
In this section, I add markdown functionality to the Post model, the reply_topic.html and topic_posts.html templates, and I implement ES6 modules to our JavaScript code. This means refactoring the copy (link) button and associated html markup and CSS. I refactor and modularize the scroll top and bottom button JavaScript code and associated CSS, modularize the pagination behavior JavaScript code, import the ES6 modules into a new file called app.js, and add the type="module" attribute to the app.js script tag in templates/base.html.
#fullstack development, #macOS, #django, #code refactoring, #es6 modules, #javascript, #markdown, #series

How to create a fullstack application using Django and Python Part 22
Maria D. Campbell
In this section, I implement a Generic Class Based view and pagination to the index/home view, add pagination to the topics view and topic_posts view, add pagination to the associated templates, refactor the associated urls in urls.py, and refactor the associated tests. I also add a copy link button to copy the link to a topic's replies, a scroll top and scroll bottom button using JavaScript to enable their functionality, and add JavaScript code to make the scrollbar return to the bottom of the page when a pagination item is clicked.
#fullstack development, #macOS, #django, #bootstrap pagination, #code refactoring, #clipboard api, #generic class based views, #python3, #scroll behavior, #series, #tests, #unittest

How to create a fullstack application using Django and Python Part 20
Maria D. Campbell
In this section, I re-organize the accounts and boards tests content, refactor password reset-related django_boards/urls.py, fix the password reset-related accounts tests failures, add the password_change URL to templates/base.html, fix the 302 redirect-related failure in the boards.tests.test_view_reply_topic_tests, and add the reply_topic URL to templates/topic_posts.html.
#fullstack development, #macOS, #django, #django 5.1, #python3, #authentication, #code refactoring, #code restructure, #debug code, #default password reset, #fix urls, #fix redirects, #resolve, #reverse, #security, #series, #tests, #unittest