diff --git a/README.md b/README.md index d87fd1a..3a138f4 100644 --- a/README.md +++ b/README.md @@ -476,7 +476,7 @@ The directory where your components are stored. `COTTON_BASE_DIR` (default: None) -The directory that contains your project-level "templates" directory. +If you use a project-level templates folder then you can set the path here. This is not needed if your project already has a `BASE_DIR` variable. `COTTON_SNAKE_CASED_NAMES` (default: True) @@ -486,12 +486,7 @@ Whether to search for component filenames in snake_case. If set to False, you ca ## Caching -Cotton is optimal when used with Django's cached.Loader. If you use automatic configuration then the cached loader will be automatically applied. This feature has room for improvement, some desirables are: - -- Integration with a cache backend to survive runtime restarts / deployments. -- Cache warming - -For full docs and demos, checkout django-cotton.com +Cotton is optimal when used with Django's cached.Loader. If you use automatic configuration then the cached loader will be automatically applied.
@@ -531,3 +526,7 @@ For full docs and demos, checkout django-cotton.com diff --git a/dev/example_project/templates/cotton/project_root.html b/dev/example_project/templates/cotton/project_root.html index 648ac21..c7a923d 100644 --- a/dev/example_project/templates/cotton/project_root.html +++ b/dev/example_project/templates/cotton/project_root.html @@ -1 +1 @@ -I'm from project roo templates! \ No newline at end of file +I'm from project root templates! \ No newline at end of file diff --git a/django_cotton/tests/test_basic.py b/django_cotton/tests/test_basic.py index 5384fae..b3f9fa0 100644 --- a/django_cotton/tests/test_basic.py +++ b/django_cotton/tests/test_basic.py @@ -219,5 +219,5 @@ def test_multiple_app_subdirectory_access(self): rendered = get_rendered(html) self.assertTrue("I'm from app templates!" in rendered) - self.assertTrue("I'm from project roo templates!" in rendered) + self.assertTrue("I'm from project root templates!" in rendered) self.assertTrue("i'm sub in project root" in rendered) diff --git a/docs/docs_project/docs_project/templates/configuration.html b/docs/docs_project/docs_project/templates/configuration.html index e49565c..e842374 100644 --- a/docs/docs_project/docs_project/templates/configuration.html +++ b/docs/docs_project/docs_project/templates/configuration.html @@ -19,7 +19,7 @@

Configuration

str (default: None)
- The base directory where - in addition to the app folders - cotton will search for the "templates" directory (see above). + The base directory where - in addition to the app folders - cotton will search for the "templates" directory (see above). If not set, the `BASE_DIR` generated by `django-admin startproject` is used as a fallback, if it exists.
diff --git a/docs/docs_project/docs_project/templates/quickstart.html b/docs/docs_project/docs_project/templates/quickstart.html index b905492..c97d841 100644 --- a/docs/docs_project/docs_project/templates/quickstart.html +++ b/docs/docs_project/docs_project/templates/quickstart.html @@ -83,7 +83,7 @@

Templates location

  • App level - You can place your cotton folder in any of your installed app folders, like:
    [project]/[app]/templates/cotton/row.html
  • Project root - You can place your cotton folder in a project level templates directory, like:
    [project]/templates/cotton/row.html
    - (where the [project] depends on the `BASE_DIR` or `COTTON_BASE_DIR` settings) + ([project] location is provided by `BASE_DIR` if present or you may set it with `COTTON_BASE_DIR`)