-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c684c68
commit 0441962
Showing
6 changed files
with
117 additions
and
9 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Configuration | ||
|
||
## DJ Press Settings | ||
|
||
In your settings.py file, create a `DJPRESS_SETTINGS` dictionary. Here are some common settings: | ||
|
||
```python | ||
# DJPress settings | ||
DJPRESS_SETTINGS = { | ||
"BLOG_TITLE": "My Awesome Blog", | ||
"POST_PREFIX": "{{ year }}/{{ month }}", | ||
} | ||
``` | ||
|
||
There are lots more settings available. Please checks the docs or look at the source code: | ||
[src/djpress/app_settings.py](https://github.com/stuartmaxwell/djpress/blob/main/src/djpress/app_settings.py) | ||
|
||
## Themes | ||
|
||
There are two themes included with DJ Press: "default" and "simple". They can be configured as follows: | ||
|
||
```python | ||
# DJPress settings | ||
DJPRESS_SETTINGS = { | ||
"THEME": "simple", | ||
} | ||
``` | ||
|
||
To create, your own theme please read the [Theme documentation](themes.md) |
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Installation | ||
|
||
> Note: If you choose to use this package prior to version 1.x being release, please pin your requirements to a specific minor version, e.g. `djpress~=0.11.0` | ||
- Install `djpress` by adding it to your requirements file, e.g. `djpress~=0.11.0` (see versioning note, above). | ||
- Add it to your `INSTALLED_APPS` in Django: | ||
|
||
```python | ||
INSTALLED_APPS = [ | ||
# ... | ||
"djpress.apps.DjpressConfig", | ||
# ... | ||
] | ||
``` | ||
|
||
- Add the URLs to your project's main `urls.py` file. | ||
|
||
The following will set DJ Press to be available at the root of your site, e.g. `https://example.com/` | ||
|
||
```python | ||
from django.urls import path, include | ||
|
||
urlpatterns = [ | ||
# ... | ||
path("", include("djpress.urls")), | ||
# ... | ||
] | ||
``` | ||
|
||
If you want your blog to be in a subdirectory, e.g. `https://example.com/blog/`, use something like the following: | ||
|
||
```python | ||
from django.urls import path, include | ||
|
||
urlpatterns = [ | ||
# ... | ||
path("blog/", include("djpress.urls")), | ||
# ... | ||
] | ||
``` | ||
|
||
- Run migrations: `python3 manage.py migrate` | ||
|
||
> Note that DJ Press relies on the Django Admin for content management, so ensure that you have a user with at least `staff` status to manage content. | ||
- Access your site's admin panel to manage content, e.g. `https://example.com/admin/djpress/` |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.