Abstract.
This post will be updated whenever I have an update regarding the contents here. The post is written by junior level developer. So please, read at your own risk :)
[First guide found]
Dockerizing a python Django Web Application
https://semaphoreci.com/community/tutorials/dockerizing-a-python-django-web-application
And here is template like.
https://github.com/agusmakmun/django-markdown-editor
- What Docker is
- prerequisite to use the template above (forking)
- Create a Python virtual environment
- Gunicorn(HTTP server) and Martor (markdown plugin)
- Then, makemigrations, migrate etc.
- Testing code (TDD)
- Static vs Dynamic Files
- About nature of Django explanation. Know the difference.
- Style Checker (Flake8)
- Additional integration, github Note: you may manually setup this part from docker hub and github (settings, Secrets, Actions Secrets -> Repo secrets). This part is one of important setup with docker.
- Now Docker. Writing the Dockerfile
- Building and running the container.
- CI/CD (achieve this with github actions as well)
- About dockerizing pipeline
Comment:
Some part offers advanced platform service to use. This guide does not have an example of setting up github actions.
[Second guide found] - docker & github actions
https://stackoverflow.com/questions/57549439/how-do-i-use-docker-with-github-actions
To setup Github Actions in your project:
- Set up checks.yml The contents of code in this file will be shown in Github Actions once it is pushed in git via your VSCode.
Django - Official Documentation
- https://docs.djangoproject.com/en/4.2/topics/testing/overview/ TDD guideline. How to use django.test and TestCase in a nutshell.
1.04
https://docs.djangoproject.com/en/4.2/ref/models/querysets/
1.05
https://docs.djangoproject.com/en/4.2/topics/testing/tools/#django.test.Client.post
Testing tools. Recommended for any django user if you need:
(1) simulate GET and POST requests on a URL and observer response
(2) check the URL and all chain of redirects occur
(3) Test that a given request is rendered by django template (with context), which contains certain value.
There is API that only has access to the HTTP methods (e.g. RequestFactory)
1.1 https://docs.djangoproject.com/en/4.2/topics/testing/advanced/#testing-reusable-applications
Unlike the description in url, this is must-read if you plan to test out each feature you were going to build.
https://docs.djangoproject.com/en/4.2/intro/overview/
Recommended for initial setup.https://docs.djangoproject.com/en/4.2/topics/auth/
Authentication. (users, permissions, group, config password in hash, forms and view for logging in or blocking content.) Literally all about user account feature. Try navigating other links on this page - those will guide you how to achieve your plan.
3.1 https://docs.djangoproject.com/en/4.2/topics/auth/default/#user-objects
A related link from authentication : username, password, email, first_name, last_name. And you know what these are.
3.2
https://docs.djangoproject.com/en/4.2/ref/contrib/auth/#django.contrib.auth.models.User
An API reference, for authentication part.
Top comments (0)