Skip to content

settings.py maybe needs some thing #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cjwn opened this issue Jul 17, 2023 · 0 comments
Open

settings.py maybe needs some thing #3

cjwn opened this issue Jul 17, 2023 · 0 comments

Comments

@cjwn
Copy link

cjwn commented Jul 17, 2023

First! Thank you for your 'The Django Developer’s Guide To Vite.'
This guide has been extremely helpful to me!
By the way, I noticed that in the 'settings.py' file, there is some additional code that needs to be added before running the server.

DJANGO_VITE_ASSETS_PATH = BASE_DIR / "static" / "dist"

# If use HMR or not.
DJANGO_VITE_DEV_MODE = DEBUG

# Name of static files folder (after called python manage.py collectstatic)
STATIC_ROOT = BASE_DIR / "collectedstatic"

# Include DJANGO_VITE_ASSETS_PATH into STATICFILES_DIRS to be copied inside
# when run command python manage.py collectstatic
STATICFILES_DIRS = [DJANGO_VITE_ASSETS_PATH]

You mentioned, 'There are also some additional settings to add to configure django-vite. I’ve taken these settings from the ones provided by the creator of Vite.' However, I would appreciate it if you could include this information in your blog post to help beginners who may run into issues when trying out the example for the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant