-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update arches applications example #449
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,65 +45,57 @@ Installing the **Arches Dashboard** App | |
--------------------------------------- | ||
You can add the dashboard to an Arches project in just a few easy steps. | ||
|
||
1. Install if from this repo (or clone this repo and pip install it locally). | ||
|
||
1. Install it from this repo (or clone this repo and pip install it locally): | ||
.. code-block:: shell | ||
|
||
pip install git+https://github.com/chiatt/dashboard.git | ||
|
||
|
||
2. Add 'dashboard' as to the ARCHES_APPLICATIONS and INSTALLED_APPS settings in the demo project's settings.py file | ||
|
||
2. Add 'dashboard' to the ``INSTALLED_APPS`` setting in the demo project's settings.py file, above your own project: | ||
.. code-block:: python | ||
|
||
ARCHES_APPLICATIONS = ("dashboard",) # be sure to add the trailing comma! | ||
INSTALLED_APPS = ( | ||
# other applications already listed | ||
"dashboard", | ||
"demo", | ||
) | ||
|
||
|
||
3. Add routing to your project to handle the Arches application. This can be either subdomain routing or path-based routing. | ||
- for subdomain routing: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Standardized the indentation |
||
- Update your hosts.py file in your project: | ||
.. code-block:: python | ||
|
||
- for subdomain routing: | ||
|
||
- Update your hosts.py file in your project: | ||
|
||
.. code-block:: python | ||
|
||
host_patterns = patterns('', | ||
host(re.sub(r'_', r'-', r'dashboard'), 'dashboard.urls', name='dashboard'), | ||
host(re.sub(r'_', r'-', r'demo'), 'demo.urls', name='demo'), | ||
) | ||
|
||
host_patterns = patterns('', | ||
host(re.sub(r'_', r'-', r'dashboard'), 'dashboard.urls', name='dashboard'), | ||
host(re.sub(r'_', r'-', r'demo'), 'demo.urls', name='demo'), | ||
) | ||
|
||
- for path-based routing: | ||
- Update your urls.py file in your project. You'll likely need to add the `re_path` import: | ||
.. code-block:: python | ||
|
||
- Update your urls.py file in your project. You'll likely need to add the `re_path` import: | ||
|
||
.. code-block:: python | ||
from django.urls import include, path, re_path | ||
|
||
from django.urls import include, path, re_path | ||
- and then the following path: | ||
.. code-block:: python | ||
|
||
and then the following path: | ||
|
||
.. code-block:: python | ||
|
||
re_path(r"^", include("dashboard.urls")), | ||
re_path(r"^", include("dashboard.urls")), | ||
|
||
|
||
4. From your project run migrate to add the model included in the app: | ||
|
||
.. code-block:: shell | ||
|
||
python manage.py migrate | ||
|
||
|
||
5. Next be sure to rebuild your project's frontend to include the plugin: | ||
|
||
.. code-block:: shell | ||
|
||
npm run build_development | ||
|
||
|
||
6. When you're done you should see the Dashboard plugin added to you main navigation bar: | ||
|
||
6. When you're done you should see the Dashboard plugin added to your main navigation bar: | ||
.. figure:: ../../images/dev/demo-arches-app-dashboard-screenshot.png | ||
:width: 100% | ||
:align: center | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whitespace changes are to avoid the extra level of nesting that was appearing:
Now:

I think the added bolding is a bug fixed in more recent versions of Sphinx. Don't know what version we're using to build the live site.