2015-04-01 16:44:58 -03:00
|
|
|
# Spirit
|
|
|
|
|
|
|
|
[![Build Status](https://img.shields.io/travis/nitely/Spirit.svg?style=flat-square)](https://travis-ci.org/nitely/Spirit)
|
|
|
|
[![Coverage Status](https://img.shields.io/coveralls/nitely/Spirit.svg?style=flat-square)](https://coveralls.io/r/nitely/Spirit)
|
|
|
|
[![pypi](https://img.shields.io/pypi/v/django-spirit.svg?style=flat-square)](https://pypi.python.org/pypi/django-spirit)
|
2015-04-01 16:48:51 -03:00
|
|
|
[![licence](https://img.shields.io/pypi/l/django-spirit.svg?style=flat-square)](https://raw.githubusercontent.com/nitely/Spirit/master/LICENSE)
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
Spirit is a Python based forum built using the Django framework.
|
|
|
|
|
|
|
|
To see it in action, please visit [The Spirit Project](http://spirit-project.com/).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2014-11-16 17:36:42 -03:00
|
|
|
* Python 2.7, 3.3 or 3.4 (recommended)
|
2015-03-30 03:07:50 -03:00
|
|
|
* Django 1.8
|
2015-05-22 20:05:57 -03:00
|
|
|
* PostgreSQL (recommended) or MySQL or Oracle Database
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
2014-05-10 02:15:45 -03:00
|
|
|
Check out the [requirements](https://github.com/nitely/Spirit/blob/master/requirements.txt) provided.
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
## Installing (Advanced)
|
|
|
|
|
2014-05-10 02:15:45 -03:00
|
|
|
Check out the [example](https://github.com/nitely/Spirit/tree/master/example) provided.
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
In short:
|
|
|
|
|
2014-11-27 18:34:30 -03:00
|
|
|
Add `url(r'^', include('spirit.urls')),` to your *urls.py*
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
Add `from spirit.settings import *` to the top of your *settings.py* file,
|
2014-06-08 21:11:01 -03:00
|
|
|
otherwise you will have to setup all django's related constants (Installed_apps, Middlewares, Login_url, etc)
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
Run:
|
|
|
|
|
2014-06-08 21:11:01 -03:00
|
|
|
pip install -r requirements.txt
|
2014-09-29 00:03:18 -03:00
|
|
|
python manage.py migrate
|
2015-05-10 12:27:56 -03:00
|
|
|
python manage.py createcachetable
|
2014-06-08 21:11:01 -03:00
|
|
|
python manage.py collectstatic
|
2014-05-09 18:34:48 -03:00
|
|
|
|
|
|
|
> You will need to setup a search engine,
|
|
|
|
> Spirit is configured to work with [Woosh](https://bitbucket.org/mchaput/whoosh/wiki/Home) by default.
|
|
|
|
>
|
|
|
|
> An email server is required, you can host your own (ie: [exim](http://www.exim.org/)),
|
|
|
|
> or hire an external service provider (ie: [Mandrill](http://mandrill.com/)).
|
|
|
|
|
|
|
|
Start a development server:
|
|
|
|
|
|
|
|
python manage.py runserver
|
|
|
|
|
|
|
|
Visit (http://127.0.0.1:8000/)
|
|
|
|
|
2015-04-17 09:39:11 -03:00
|
|
|
> On production, you would rather run Spirit on a real web server. ie: gunicorn + Nginx.
|
2014-05-09 18:34:48 -03:00
|
|
|
> Running Spirit on a [virtualenv](http://www.virtualenv.org) is adviced.
|
|
|
|
|
|
|
|
## Updating
|
|
|
|
|
2015-04-17 09:39:11 -03:00
|
|
|
> If you are *upgrading* from any release *previous to v0.3*:
|
2015-04-09 07:42:53 -03:00
|
|
|
> * Run `python manage.py migrate djconfig --fake-initial`
|
2015-03-30 05:36:30 -03:00
|
|
|
> * Add `AUTH_USER_MODEL = 'spirit.User'` (or your custom user model) to your `settings.py`.
|
|
|
|
> * Remove the `AbstractForumUser` from your custom user model (if you have one).
|
2015-03-30 05:40:01 -03:00
|
|
|
> * Change `spirit.models.AbstractUser` to `django.contrib.auth.models.AbstractUser` in your custom user model (if you have one).
|
2015-03-30 06:07:00 -03:00
|
|
|
>
|
|
|
|
> *Deprecation notice:* `AbstractForumUser` and `AbstractUser` will no longer exist in future releases.
|
2015-03-30 05:29:17 -03:00
|
|
|
|
2014-08-01 20:19:23 -03:00
|
|
|
Run:
|
|
|
|
|
|
|
|
pip install -r requirements.txt
|
2015-03-30 05:29:17 -03:00
|
|
|
python manage.py makemigrations
|
2014-09-29 00:03:18 -03:00
|
|
|
python manage.py migrate
|
2014-08-01 20:19:23 -03:00
|
|
|
python manage.py collectstatic
|
2014-11-16 19:39:38 -03:00
|
|
|
python manage.py rebuild_index --noinput
|
2014-05-09 18:34:48 -03:00
|
|
|
|
2014-11-25 14:13:17 +01:00
|
|
|
## Testing
|
|
|
|
|
|
|
|
The `runtests.py` script enable you to run the test suite of spirit.
|
|
|
|
|
|
|
|
- Type `./runtests.py` to run the test suite using the settings from the `tests` folder.
|
|
|
|
- Type `./runtests.py example` to run the test suite using the settings from the `example` folder.
|
|
|
|
|
2015-04-01 16:44:58 -03:00
|
|
|
## License
|
2014-05-09 18:34:48 -03:00
|
|
|
|
2015-04-01 16:44:58 -03:00
|
|
|
MIT
|