Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
rename everything that was sourcelist to sourcedive
Browse files Browse the repository at this point in the history
  • Loading branch information
greglinch committed May 20, 2019
1 parent 0650de6 commit a595ac4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sourcelist.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sourcedive.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
Expand Down
30 changes: 15 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ Enter the database shell

Create the database

CREATE DATABASE sourcelist;
CREATE DATABASE sourcedive;

Create the user

CREATE USER sourcelistuser WITH PASSWORD 'password-here';
CREATE USER sourcediveuser WITH PASSWORD 'password-here';

Grant permissions

GRANT ALL PRIVILEGES ON DATABASE sourcelist TO sourcelistuser;
GRANT ALL PRIVILEGES ON DATABASE sourcedive TO sourcediveuser;

Close the shell

Expand All @@ -63,23 +63,23 @@ Generate ssh key

Make the virtual environment

mkvirtualenv sourcelist
mkvirtualenv sourcedive

Clone the repo (or your fork)

git clone [email protected]:greglinch/sourcelist.git
git clone [email protected]:greglinch/sourcedive.git

Change into the directory

cd sourcelist
cd sourcedive

Install the requirements

pip3 install -r requirements.txt

Add the private settings file

vim sourcelist/settings_private.py
vim sourcedive/settings_private.py

Paste the following (and fill all the `UPDATE` vars)

Expand Down Expand Up @@ -188,15 +188,15 @@ Make directory for sites

Make the ini file

sudo vim /etc/uwsgi/sites/sourcelist.ini
sudo vim /etc/uwsgi/sites/sourcedive.ini

Paste in these settings

[uwsgi]

logto = /var/log/uwsgi/error.log

project = sourcelist
project = sourcedive
uid = ubuntu
base = /home/%(uid)

Expand Down Expand Up @@ -240,25 +240,25 @@ Install nginx

Create a config file

sudo vim /etc/nginx/sites-available/sourcelist
sudo vim /etc/nginx/sites-available/sourcedive

Add this

server {
listen 80;
server_name YOUR-DOMAIN.COM;
access_log /var/log/nginx/sourcelist_access.log;
error_log /var/log/nginx/sourcelist_error.log;
access_log /var/log/nginx/sourcedive_access.log;
error_log /var/log/nginx/sourcedive_error.log;

location = /favicon.ico { access_log off; log_not_found off; }

location /static/ {
root /home/ubuntu/sourcelist/;
root /home/ubuntu/sourcedive/;
}

location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/sourcelist.sock;
uwsgi_pass unix:/run/uwsgi/sourcedive.sock;
}
}

Expand All @@ -268,7 +268,7 @@ Remove the symlink for the default site

Symlink the available site to an enable site

sudo ln -s /etc/nginx/sites-available/sourcelist /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/sourcedive /etc/nginx/sites-enabled

Check the configuration

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions sourcelist/settings.py → sourcedive/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for sourcelist project.
Django settings for sourcedive project.
Generated by 'django-admin startproject' using Django 1.10.5.
Expand Down Expand Up @@ -61,7 +61,7 @@
'sesame.middleware.AuthenticationMiddleware',
]

ROOT_URLCONF = 'sourcelist.urls'
ROOT_URLCONF = 'sourcedive.urls'

TEMPLATES = [
{
Expand All @@ -81,7 +81,7 @@
},
]

WSGI_APPLICATION = 'sourcelist.wsgi.application'
WSGI_APPLICATION = 'sourcedive.wsgi.application'


# Database
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions sourcelist/wsgi.py → sourcedive/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for sourcelist project.
WSGI config for sourcedive project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sourcelist.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sourcedive.settings")

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion sources/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.contrib import messages
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from sourcelist.settings import SITE_URL
from sourcedive.settings import SITE_URL
from .models import Expertise, Person, Language, Organization, SourceForJournalist, SourceForAdmin, Page # Location,


Expand Down
2 changes: 1 addition & 1 deletion sources/management/commands/import_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.contrib.auth.models import User, Group
from django.utils import timezone

from sourcelist.settings import TEST_ENV
from sourcedive.settings import TEST_ENV
from sources.models import Person


Expand Down
2 changes: 1 addition & 1 deletion sources/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from django.views.generic.detail import DetailView
from django.views.generic.edit import FormView

from sourcelist.settings import (
from sourcedive.settings import (
PROJECT_NAME,
EMAIL_SENDER,
EMAIL_HOST_USER,
Expand Down

0 comments on commit a595ac4

Please sign in to comment.