Any CI/CD vids coming? I need to know the best strategies to update the database of a production site. Most tuts teach how migrations works and usually just delete them all (even in sql table) when they make a mistake. However, what's the process of taking a prod site, making a whole bunch of migrations (eg. Running field by field indexing effects on speed test) then once the desired migration is found, how do you ensure that only one migration file is created with only the final desired migration set? I like this one-file migration process, but it might not be the best way. Any suggestions on how to optimize migration workflows so as to keep up rolling out new features.
Hi Septum. No CI/CD vids planned, but thanks for suggestions. Regarding migrations, I think that the solution for running migrations is simpler than you think. You don't need one migration file in production. It's normal in production to have many migration files, which also serve as a history of the changes that you made to your database's structure. Regarding how to optimize migration workflows, Django does this all for you. Simply `makemigrations` and then `migrate` as you develop and change your models. Then, for production, have some sort of script (e.g., the build.sh script that I add in the video), that will automatically run `migrate` to run all of your migrations on your production database. I do this as well in the video. Hope that's helpful. 👍
I am using shared server hosting which doesn't support ASGI. Can we use SSE with only WSGI to create chat application. If yes, could you please suggest any tutorial for the same.
I don’t know of any tutorial for only using WSGI to create a chat app. One way, however, would be to use polling. In short; 1. User sends a message with a timestamps 2. JavaScript function polls the server every second to fetch any new messages from the other users in the conversation Hope that’s helpful to start you off 🙂
Hello How to make a list of website menus, e.g. Home, About, Contact, ..., which I can overwrite, add or delete on the Project Html page. Overwriting and adding menu items is to be done using the django admin panel. Just like in the WordPress administration panel. Maybe you can help or point me in the right direction where to look for a solution.
Thanks for the ideas Jonas 👍 To answer your question, have you considered Django Wagtail? I've heard good things. Otherwise, if you want full frontend customisability, you might be interested in the product I'm building (photondesigner.com).
Hello! I'm encountering an issue when I perform the migration after completing all the configurations as outlined in the tutorial. Here's the error: File "C:\Users\lenovo\Desktop\authentification\VM\Lib\site-packages\django\core\checks\urls.py", line 72, in _load_all_namespaces namespaces.extend(_load_all_namespaces(pattern, current)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\authentification\VM\Lib\site-packages\django\core\checks\urls.py", line 72, in _load_all_namespaces namespaces.extend(_load_all_namespaces(pattern, current)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [Previous line repeated 986 more times] RecursionError: maximum recursion depth exceeded
Thanks, Tom, you make learning Django easy as fu..
Glad to hear that Alex!
I like your content, happy new year🎉
Thanks a lot
@mumtazhaqiqy567. Happy new year to you 🎉🚀
Any CI/CD vids coming? I need to know the best strategies to update the database of a production site.
Most tuts teach how migrations works and usually just delete them all (even in sql table) when they make a mistake. However, what's the process of taking a prod site, making a whole bunch of migrations (eg. Running field by field indexing effects on speed test) then once the desired migration is found, how do you ensure that only one migration file is created with only the final desired migration set?
I like this one-file migration process, but it might not be the best way.
Any suggestions on how to optimize migration workflows so as to keep up rolling out new features.
Hi Septum. No CI/CD vids planned, but thanks for suggestions.
Regarding migrations, I think that the solution for running migrations is simpler than you think. You don't need one migration file in production. It's normal in production to have many migration files, which also serve as a history of the changes that you made to your database's structure.
Regarding how to optimize migration workflows, Django does this all for you. Simply `makemigrations` and then `migrate` as you develop and change your models.
Then, for production, have some sort of script (e.g., the build.sh script that I add in the video), that will automatically run `migrate` to run all of your migrations on your production database. I do this as well in the video. Hope that's helpful. 👍
I am using shared server hosting which doesn't support ASGI. Can we use SSE with only WSGI to create chat application. If yes, could you please suggest any tutorial for the same.
I don’t know of any tutorial for only using WSGI to create a chat app. One way, however, would be to use polling. In short;
1. User sends a message with a timestamps
2. JavaScript function polls the server every second to fetch any new messages from the other users in the conversation
Hope that’s helpful to start you off 🙂
Hello
How to make a list of website menus, e.g. Home, About, Contact, ..., which I can overwrite, add or delete on the Project Html page.
Overwriting and adding menu items is to be done using the django admin panel. Just like in the WordPress administration panel. Maybe you can help or point me in the right direction where to look for a solution.
Thanks for the ideas Jonas 👍 To answer your question, have you considered Django Wagtail? I've heard good things.
Otherwise, if you want full frontend customisability, you might be interested in the product I'm building (photondesigner.com).
This is the solution I was looking for, very good advice, Wagtail solves my problem, thank you Tom :)
Great. You're welcome 👍
How did you record your video? The cursor is so big and moves smoothly. What software did you use?
Screenstudio
Hello! I'm encountering an issue when I perform the migration after completing all the configurations as outlined in the tutorial. Here's the error: File "C:\Users\lenovo\Desktop\authentification\VM\Lib\site-packages\django\core\checks\urls.py", line 72, in _load_all_namespaces
namespaces.extend(_load_all_namespaces(pattern, current))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lenovo\Desktop\authentification\VM\Lib\site-packages\django\core\checks\urls.py", line 72, in _load_all_namespaces
namespaces.extend(_load_all_namespaces(pattern, current))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 986 more times]
RecursionError: maximum recursion depth exceeded
Hi Japhet. I can’t tell from your error message what‘s wrong with your setup. I suggest backtracking until it works, or starting again 🙂