Thank you for this please continue releasing contente like this. So I am working on an open source project that involves creating a backend using django rest framework. The problem I'm having is I cannot seem to figure how the logic to handle keeping scores and selecting answers and also fetching questions from the database. I don't know if we can have further talk about this and you can suggest way I go about it.
My pleasure! Thank you for your suggestions. I'll give you some advice here. To address scoring and answer selection in a Django Rest Framework backend, implement models for questions and user responses, create views with corresponding serializers to handle scoring logic, and use database queries to fetch questions based on your application's requirements.
@@CloudWithDjango I will be glad to watch the videos sir... I'm having issues with the gunicorn bind. I noticed whenever I bind my gunicorn server, my static files won't show.
How to serve static files from a frontend framework e.g. NextJS / VueJS (created with "vite") in production with django? the issue is the cli creates so many *.js files so I want to know how to serve these directly with Django....any help on this would be appreciated....thanks anyways for these tutorials :)
Hi, So this video is specifically for Django. If you want to serve static files with a frontend framework as well you would need to copy the generated static files from your Next.js or Vite build output to Django's static directory, and configure Django's STATICFILES_DIRS or STATIC_ROOT in settings.py to include this directory for serving the static files. Thank you for the support!
Hi, You'd need to read the docs on this, but from my knowledge, you'd need to use something else. Perhaps like Amazon S3 or something of the sort. Of course, my pleasure! Thank you for the support.
Thank you so much for providing valuable content, Please make a video how to deploy our project for free in online contains static files and database..
My pleasure! I'm glad that you like the content! I have a video tutorial on the channel that focuses on deploying to Fl0 which covers free deployment with static files and a postgres database.
New to your channel, absolutely enjoy these short videos. Thank you.
Welcome to the channel! Thank you for the support, and I'm glad that you are enjoying the content!
Of course, it's a pleasure!
Good luck to you!
Thank you for this please continue releasing contente like this.
So I am working on an open source project that involves creating a backend using django rest framework.
The problem I'm having is I cannot seem to figure how the logic to handle keeping scores and selecting answers and also fetching questions from the database.
I don't know if we can have further talk about this and you can suggest way I go about it.
My pleasure! Thank you for your suggestions.
I'll give you some advice here. To address scoring and answer selection in a Django Rest Framework backend, implement models for questions and user responses, create views with corresponding serializers to handle scoring logic, and use database queries to fetch questions based on your application's requirements.
Please do a tutorial on digital ocean space
Thank you for the suggestion!
@@CloudWithDjango I will be glad to watch the videos sir... I'm having issues with the gunicorn bind. I noticed whenever I bind my gunicorn server, my static files won't show.
How to serve static files from a frontend framework e.g. NextJS / VueJS (created with "vite") in production with django? the issue is the cli creates so many *.js files so I want to know how to serve these directly with Django....any help on this would be appreciated....thanks anyways for these tutorials :)
Hi,
So this video is specifically for Django. If you want to serve static files with a frontend framework as well you would need to copy the generated static files from your Next.js or Vite build output to Django's static directory, and configure Django's STATICFILES_DIRS or STATIC_ROOT in settings.py to include this directory for serving the static files.
Thank you for the support!
Thank you for this, just what i needed!
My pleasure! I'm glad that you liked the video!
Very helpfull... thank you for your explanation!
My pleasure! I'm glad that you found it helpful!
did you try to set media files within of the static folder to get them compressed? does it works?
Hi! I only focused on the static files here and not the media files. Not too sure if the media files would work within the static folder.
Hi,
I have a question please, can whitenoise also serve updated files by user like images or other ?
Thank you for these tutorials.
Hi,
You'd need to read the docs on this, but from my knowledge, you'd need to use something else. Perhaps like Amazon S3 or something of the sort.
Of course, my pleasure! Thank you for the support.
@@CloudWithDjango thank you for your réponse, much appreciated.
Of course, anytime! :)
Hi @Arno, do you think it's possible to use media files, when i took the media url and root inside of static/?
no need to reply, i know the answer :)
Hi Ahmad,
Oh haha, no worries! :)
@@CloudWithDjango according me, is this the best setup
```
- Whitenoise
- STATIC_URL = 'static/'
- STATIC_ROOT = 'static/'
- STATICFILES_DIRS = 'staticfiles/'
- MEDIA_URL = 'static/media/'
- MEDIA_URL = 'static/media/'
- STATICFILES_STORAGE='whitenoise.storage.CompressedStaticFilesStorage'
```
Thank you, Ahmad! This is great!
Братуха!спасибо тебе огромное!
Удовольствие!
Wow! It works
I'm glad that it worked for you!
Thank you so much for providing valuable content,
Please make a video how to deploy our project for free in online contains static files and database..
My pleasure! I'm glad that you like the content!
I have a video tutorial on the channel that focuses on deploying to Fl0 which covers free deployment with static files and a postgres database.