vitorfs / parsifal

Parsifal is a tool to assist researchers to perform Systematic Literature Reviews
https://parsif.al
MIT License
416 stars 171 forks source link

How to install Parsifal Django Project on localhost Ubuntu 14.04 ? #29

Closed 101t closed 9 years ago

vitorfs commented 9 years ago

It is recommended to install the project on a virtual-env

1 Clone the project

git clone https://github.com/vitorfs/parsifal.git

2 Install dependencies

The dependencies are on the project root requirements.txt

pip install -U -r requirements.txt

Note: If you are having problems with Pillow installation please take a look on a detailed installation guide at: http://pillow.readthedocs.org/en/latest/installation.html

3 Create a .env file

As the project uses django-decouple you will need to create a file named .env on the root of the project with three values, as following:

DEBUG=True
SECRET_KEY='yoursecretkey'
DATABASE_URL='postgres://dbuser:dbpassword@localhost:5432/parsifal'
EMAIL_HOST='smtp.gmail.com'
EMAIL_PORT=587
EMAIL_HOST_USER='your@email.com'
EMAIL_HOST_PASSWORD='emailpassword'
EMAIL_USE_TLS=True
SESSION_COOKIE_DOMAIN='.parsif.al'
HTTPS_SUPPORT=False

Note: You can use Django methods to create a new SECRET_KEY https://github.com/django/django/blob/master/django/core/management/commands/startproject.py

Note 2: To use sqlite on development environment you can change the DATABASE_URL to something like 'sqlite:////Users/vitorfs/Development/parsifal/db.sqlite3'

4 Syncdb

python manage.py syncdb

5 Migrate the models

python manage.py migrate reviews

6 Load initial data

python manage.py loaddata source_initial_data.json

7 Run

python manage.py runserver
vitorfs commented 9 years ago

If you have any specific problem installing Parsifal, don’t hesitate to contact me

lex912 commented 9 years ago

Hello, during the installation of the project, an error occurs. Tell me how to fix it?

[10/Feb/2015 12:00:32] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\x99\x01\x00\x00\x95\x03\x01\xf2P')

Exception happened during processing of request from ('127.0.0.1', 51637) Traceback (most recent call last): File "C:\Python27\lib\SocketServer.py", line 595, in process_request_thread self.finish_request(request, client_address) File "C:\Python27\lib\SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 126, in init super(WSGIRequestHandler, self).init(_args, *_kwargs) File "C:\Python27\lib\SocketServer.py", line 651, in init self.handle() File "C:\Python27\lib\wsgiref\simple_server.py", line 117, in handle if not self.parse_request(): # An error code has been sent, just exit File "C:\Python27\lib\BaseHTTPServer.py", line 281, in parse_request "Bad HTTP/0.9 request type (%r)" % command) File "C:\Python27\lib\BaseHTTPServer.py", line 368, in send_error self.send_response(code, message) File "C:\Python27\lib\BaseHTTPServer.py", line 385, in send_response self.log_request(code) File "C:\Python27\lib\BaseHTTPServer.py", line 422, in log_request self.requestline, str(code), str(size)) File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 138, in log_message msg = "[%s] %s\n" % (self.log_date_time_string(), format % args)

UnicodeDecodeError: 'ascii' codec can't decode byte 0x99 in position 5: ordinal not in range(128)

101t commented 9 years ago

this is awesome :+1: thank you <3 I installed it without problem :)