Skip to content

Commit

Permalink
better settings and final approach for distributable js files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark committed Dec 26, 2023
1 parent cbcc3f0 commit c1d9ad1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Development

To get started with development, clone the repo, and run the following commands:

.. code-block:: bash
.. code-block::
$ pip install -r requirements.txt
$ pip install -r requirements/django-4.1.txt
$ npm install
$ npm run dev &
$ python manage.py migrate
Expand Down
5 changes: 1 addition & 4 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,10 @@ can use the following settings:
EXPLORER_CONNECTIONS = { 'Default': 'default' }
EXPLORER_DEFAULT_CONNECTION = 'default'
Run migrate to create the tables:
Finally, run migrate to create the tables:

``python manage.py migrate``

Finally, you will have to serve the static files for the explorer app. You can do
this by running ``npm install`` and then ``npm run dev`` to start the

You can now browse to https://yoursite/explorer/ and get exploring!

The default behavior when viewing a parameterized query is to autorun the associated
Expand Down
2 changes: 1 addition & 1 deletion explorer/templatetags/vite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

VITE_OUTPUT_DIR = "/static/"
VITE_MANIFEST_FILE = "./explorer/public/static/.vite/manifest.json"
VITE_DEV_MODE = getattr(settings, "VITE_DEV_MODE", settings.DEBUG)
VITE_DEV_MODE = getattr(settings, "VITE_DEV_MODE", getattr(settings, "EXPLORER_DEBUG", False))
VITE_SERVER_HOST = getattr(settings, "VITE_SERVER_HOST", "localhost")
VITE_SERVER_PORT = getattr(settings, "VITE_SERVER_PORT", "5173")

Expand Down
7 changes: 5 additions & 2 deletions pypi-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
- [x] Make sure any new files are included in MANIFEST.in
- [x] Update version number in `explorer/__init__.py`
- [x] Update any package dependencies in `setup.py`
- [x] Commit the changes:
- [x] Run `npm install` and `npm run build`
- [x] Commit the changes:
```
git add .
git commit -m "Release 1.0.0"
Expand All @@ -18,6 +19,8 @@ cd dist
tar xzvf django-sql-explorer-x.x.tar.gz
cd django-sql-explorer-x.x/
python setup.py install
npm install
npm run build
django-admin.py startproject explorertest
cd explorertest/explorertest/
emacs urls.py
Expand Down Expand Up @@ -53,4 +56,4 @@ python setup.py tag
Put the same message as in HISTORY.rst.
- [x] Push: `git push`
- [x] Push tags: `git push --tags`
- [x] Check the PyPI listing page (https://pypi.python.org/pypi/django-sql-explorer) to make sure that the README, release notes display properly.
- [x] Check the PyPI listing page (https://pypi.python.org/pypi/django-sql-explorer) to make sure that the README, release notes display properly.
4 changes: 2 additions & 2 deletions test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


SECRET_KEY = 'shhh'
DEBUG = True
EXPLORER_DEBUG = True
STATIC_URL = '/static/'

ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '127.0.0.1']
Expand Down Expand Up @@ -55,7 +55,7 @@
'django.template.context_processors.static',
'django.template.context_processors.request',
],
'debug': DEBUG
'debug': EXPLORER_DEBUG
},
},
]
Expand Down

0 comments on commit c1d9ad1

Please sign in to comment.