Skip to content

settings.py maybe needs some thing #3

@cjwn

Description

@cjwn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions