Comments (1)
I figured it out after studying the source code by searching the message not in INSTALLED_APPS
In my case, i want to put theme
inside themes
.
These are the steps for those who want to put their theme folder in nested folders
- Change the apps.py in the
theme
folder tothemes.theme
(already did this in my question) - Update the INSTALLED_APPS to include
themes.theme
(also did this in question) - Update the TEMPLATES so that it prioritizes the right folder. (also did this)
What I didn't do is update TAILWIND_APP_NAME to themes.theme
So my final answer is
step 1: in settings.py
# TAILWIND
# ------------------------------------------------------------------------------
TAILWIND_APP_NAME = "themes.theme"
# Split the string by '.'
tailwind_tokens = TAILWIND_APP_NAME.split(".")
# Get the last token
TAILWIND_APP_FOLDER_NAME = tailwind_tokens[-1] if tailwind_tokens else None
INTERNAL_IPS = [
"127.0.0.1",
]
TAILWIND_APP_DIR = BASE_DIR / "themes" / TAILWIND_APP_FOLDER_NAME
TEMPLATES[0]["DIRS"] = [str(TAILWIND_APP_DIR / "templates")] + TEMPLATES[0]["DIRS"]
step 2: in the apps.py
from django.apps import AppConfig
class ThemeConfig(AppConfig):
name = "themes.theme"
Note that BASE_DIR is defined to be the full path going towards project root.
from django-tailwind.
Related Issues (20)
- `django-tailwind` should not have a hard dependency on `django-browser-reload` HOT 3
- Preventing CSS caching
- Setting an item to not visible as the default then visible at any larger breakpoint doesn't work HOT 1
- Responsive Breakpoint Partially Working
- tailwind start not working
- Some classes didnt work
- Does not work with S3 HOT 5
- Changelog file is not updated. HOT 1
- Installation Error with "django-tailwind[reload]" Package HOT 1
- ModuleNotFoundError: No module named 'maintailwind'
- Global base styles HOT 1
- Freeze on tailwind init
- Multi-apps support
- Not rebuilding automatically when new classes are added to templates HOT 4
- python manage.py tailwind start with SyntaxError: Unexpected token '.' HOT 2
- "theme" app created in parent dir when initiated in parent dir HOT 2
- FYI How to use with NGINX proxy HOT 1
- python manage.py tailwind start causes "sh: 1: cross-env: Permission denied" message HOT 1
- Django Tailwind not working on DEBUG = False HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-tailwind.