How should I link from my forum link to get to the forum?
Well, assuming you have something like url(r'^forum/', include(spirit.urls)), in your urls.py, then just add a link to https://somesite.com/forum/. Now, if you want your site's menu bar at the top of the forum, then you'll probably have to override templates/spirit/_header.html, but it's probably easier to just add a "Home" link or "Back to main" or whatever to Spirit's menu bar. Adding a custom menu bar with custom CSS is not well supported.
joshrogers406's comment was removed 3 years, 3 months ago
I have an application that has a different core functionality, but I want to add a community aspect to it. Here's what I've tried so far:
Running spirit startproject forum in a different directory, then cd forum and python manage.py spiritinstall
Copying the forum directory, static directory, and settings piece by piece into my own app
Should I keep going down this path, fixing each error as I get it from python manage.py runserver? Or is there some major piece I'm missing? Should I just have run spirit startproject forum from inside my application?
To add extra elements (i.e: a menu bar), it's probably easiest to add an extra CSS file. To include that file override templates/spirit/_base.html. To change the current style, it depends. To change a few things, easiest is t add an extra CSS and override whatever style needed. To change a bunch of things, easiest is probably making changes to Spirit CSS (Sass) [0], compile it and override static/spirit/stylesheets/styles.all.min.css with it.
Sorry typing from phone.
New to Django and python, coming from php.
I have intergrated spirit, updated the installed apps, put the link to the spirit url in my project urls. Etc.
I am trying to add it under a forum category on my main site. I understand intergrating into another large project could be annoying.
How should I link from my forum link to get to the forum?
Really like the style and feel to this so I am really trying to get it to work.
Kind regards, LJ
Well, assuming you have something like
url(r'^forum/', include(spirit.urls)),
in your urls.py, then just add a link tohttps://somesite.com/forum/
. Now, if you want your site's menu bar at the top of the forum, then you'll probably have to overridetemplates/spirit/_header.html
, but it's probably easier to just add a "Home" link or "Back to main" or whatever to Spirit's menu bar. Adding a custom menu bar with custom CSS is not well supported.I have an application that has a different core functionality, but I want to add a community aspect to it. Here's what I've tried so far:
spirit startproject forum
in a different directory, thencd forum
andpython manage.py spiritinstall
Should I keep going down this path, fixing each error as I get it from
python manage.py runserver
? Or is there some major piece I'm missing? Should I just have runspirit startproject forum
from inside my application?EDIT: It looks like I'm sort of on the right path, based on this issue about integrating into a mezzanine project. Is that right?
Yes, that's basically it. The issue speaks the truth . Let me know if you hit any issue after following those steps.
Nope, it really was that easy! Now if I want to apply my site's custom styling, it seems that's another matter. Any pointers on that?
To add extra elements (i.e: a menu bar), it's probably easiest to add an extra CSS file. To include that file override
templates/spirit/_base.html
. To change the current style, it depends. To change a few things, easiest is t add an extra CSS and override whatever style needed. To change a bunch of things, easiest is probably making changes to Spirit CSS (Sass) [0], compile it and overridestatic/spirit/stylesheets/styles.all.min.css
with it.[0] https://github.com/nitely/Spirit/tree/master/spirit/core/static/spirit/stylesheets/src