Skip to content

Installable Themes#2

Open
sam-mi wants to merge 11 commits into
wtayyeb:masterfrom
sam-mi:installable-themes
Open

Installable Themes#2
sam-mi wants to merge 11 commits into
wtayyeb:masterfrom
sam-mi:installable-themes

Conversation

@sam-mi

@sam-mi sam-mi commented Mar 9, 2018

Copy link
Copy Markdown

This pull request primarily allows for installable themes to be used with django-template-theming, themes can be defined in a dict by their slug and app_label and then this change will use the full path of the installed app to find the them root.

It also fixes a few minor issues:

  • importing theming in setup.py to get the version causes a ModuleNotFoundError when installing into an empty repo via requirements.txt because django is not yet installed, I've just set the numbers manually, bumpversion could be used to manage version numbers.
  • there was an app_label clash with Django Admin Tools admin_tools.theming app so I modified the app label in AppConfig and updated the migration accordingly. (this may modify the db table name?)
  • fixes the middleware compatibility issue by extending django.utils.deprecation.MiddlewareMixin.

Sam Minton added 11 commits February 2, 2018 16:22
remove import theming from setup.py and set the version manually to
allow this package to be pip installed into an empty repo via requirements.txt
when installed at the same time as Django - removes ModuleNotFoundError on pip install
This change adds a method `get_theming_root` to `Theme` and calls that passing
the theming root if necessary. It returns either a list of full paths to
themes within virtual environments (allowing them to be used) or a single
full path if `theme_slug` is passed in.

Update docs to explain usage.
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

Successfully merging this pull request may close these issues.

1 participant