Skip to content

Django-based CS:GO fan page for the BIGCLAN

Notifications You must be signed in to change notification settings

ckarrie/ckw-csgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contribution

Feel free to hack around and create pull requests.

Contributors

Many thanks to

  • iaN @ifalatik for keeping the code up-to-date

Developement

1. Create and activate Python 3.6 or greater virtual environment

python3 -m venv wannspieltbig_dev
cd wannspieltbig_dev
source bin/activate

2. Install requirements

sudo apt-get install memcached
mkdir src
cd src
git clone https://github.com/ckarrie/ckw-csgo/
pip install -r ckw-csgo/requirements.txt
# install csgo app in editable mode
pip install -e ckw-csgo

3. Set up local Django project

django-admin startproject wsb
cd wsb/
mkdir wsb/static
nano wsb/wsb/settings.py
# Change
ALLOWED_HOSTS = ['*']

CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
        "LOCATION": "127.0.0.1:11211",
    }
}

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',  # Add
    'rest_framework',        # Add
    'csgomatches',           # Add
]

ROOT_URLCONF = 'csgomatches.urls'

LANGUAGE_CODE = 'de'

TIME_ZONE = 'Europe/Berlin'

USE_I18N = True

USE_L10N = True

USE_TZ = True

STATIC_URL = '/static/'
STATIC_ROOT = '/home/christian/workspace/venvs/wannspieltbig_dev/wsb/static'  # CHANGE TO YOUR LOCAL FOLDER

4. Setup Database and symlink static files

python wsb/manage.py migrate
python wsb/manage.py collectstatic -l

5. Add initial data

python wsb/manage.py shell
# current Site
from django.contrib.sites.models import Site
Site.objects.filter(pk=1).update(domain='0.0.0.0', name='Local Dev')

# Add Team BIG
from csgomatches.models import Team
Team(name='BIG').save()

# Add Admin User
from django.contrib.auth.models import User
User.objects.create_superuser(username="devuser", password="devuser", email="[email protected]")

6. Run Dev Server

python wsb/manage.py runserver 0.0.0.0:9001

Open Browser:

About

Django-based CS:GO fan page for the BIGCLAN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •