# installation problems python newbie

K
• 25 Jun '15

hi all, i am having problems installing under a virtual environment

I have created a virtual environment, activated it and then installed spirit using
pip install django-spirit.
i then execute
I then cd into directory and syncdb, create user, password etc and after this is complete i
runserver to check django and admin is working properly which it is.
After this i add the entries found on you github page to urls.py and settings.py
url(r'^', include('spirit.urls')),
from spirit.settings import *

when i runserver the error i am getting is that there is no installed app with label spirit so i tried,
python manage.py startapp spirit,
at this point i get the error that spirit conflicts with the name of an existing python module and
cannot be used so i am wandering what i am doing wrong and was hoping that someone can give
me the newbie proof guide to setting up virtualenv and installingall needed modules as its got me a bit stumped ?

thanks
kev

nitely
Esteban C Borsani
• 1
• 25 Jun '15

Hi,

when i runserver the error i am getting is that there is no installed app with label spirit so i tried,
python manage.py startapp spirit,

Up until this point you were doing it ok. You should not create your own spirit app. Also, you should run migrate instead of syncdb.

when i runserver the error i am getting is that there is no installed app with label spirit so i tried,

It's likely you are overwriting the INSTALLED_APPS in your settings.py, you should extend it instead.

There is an example project you can run and check how everything is set up.

K
• 25 Jun '15

I got it working as you suggested using the example project and guide on your github page, there are quite a few questions i have about spirit as am pretty new to it all but will ask those another time.

again many thanks for you help !

kev

@
@dem@n
• 22 Sep '15

Hi nitely!

I tried installing the example app too and I'm getting an error. When I execute
python manage.py spiritinstall
I get an error that says "ImportError: No module named spirit.settings"

I individually installed all the requirements. Any help would be greatly appreciated!

This is an amazing project!

nitely
Esteban C Borsani
• 1
• 22 Sep '15

Hi!

I'm assuming you followed the instructions linked above. When you do "pip install ." you are installing Spirit as a python module, so you should not receive that error, I'm guessing you forgot to follow that step.

@
@dem@n
• 1
• 23 Sep '15

You're right! I didn't run "pip install ." I'll run this and get back to you. Thank you for your help!

@
@dem@n
• 23 Sep '15

Hey! So I ran the example and it worked! Thank you for that. I tried the advanced installation posted on your github.
I ran pip install django-spirit after making the changes to my settings and urls page. When I run python manage.py spiritinstall it says unknown command. I tried running a migrate and then running the development server and it gives me an error that says the model spirit.category.Category is not loaded yet.

Do let me know if there is something I'm missing. Also, in the example itself, is it possible for me to customize the forum app? So I can put in the name I want? Thanks in advance for your help nitely!

nitely
Esteban C Borsani
• 1
• 23 Sep '15

The example is just a Django project, there is no reason not to use it almost as is, except if you have a site and want to integrate Spirit in to it.

I said almost, coz the example uses the settings.dev.py which is for local development (not production ready).

In this forum here, I have modified the manage.py to use my own settings.local.py that extend the settings.prod.py and overrided some of the settings such as the database config. Also I'm running nginx+gunicorn as a webserver (instead of running the runserver command) and PostgreSQL (instead of SQLite). There are plenty of how to's out there to help in deploying Django projects.

@@dem@n said:
When I run python manage.py spiritinstall it says unknown command.

Check out the second reply to this topic, that will fix it. You should check out the example/project/settings/base.py to see how to set up your settings.py properly, if you are integrating Spirit in to your site.

Also, in the example itself, is it possible for me to customize the forum app? So I can put in the name I want? Thanks in advance for your help nitely!

Run "\$ python manage.py createsuperuser", login with your new user, go to the admin control panel, change the name.