-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ckarrie/django-5.1
Django 5.1 to master
- Loading branch information
Showing
20 changed files
with
270 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,34 @@ | ||
# Contribution | ||
Feel free to hack around and create pull requests. | ||
|
||
# Contributors | ||
Many thanks to | ||
- iaN [@ifalatik](https://github.com/ifalatik) for keeping the code up-to-date | ||
|
||
## Developement | ||
|
||
### 1. Create and activate Python 3.5.x virtual environment | ||
### 1. Create and activate Python 3.6 or greater virtual environment | ||
```shell | ||
python3 -m venv wannspieltbig_dev | ||
cd wannspieltbig_dev | ||
source bin/activate | ||
``` | ||
|
||
### 2. Install requirements | ||
``` | ||
beautifulsoup4==4.8.1 | ||
bs4==0.0.1 | ||
Django==2.2.7 | ||
django-ical==1.7.0 | ||
django-recurrence==1.10.1 | ||
djangorestframework==3.10.3 | ||
icalendar==4.0.4 | ||
python-dateutil==2.8.1 | ||
python-memcached==1.59 | ||
python-telegram-bot==12.2.0 | ||
python-twitter==3.5 | ||
requests==2.22.0 | ||
``` | ||
|
||
### 3. Create your local Django project | ||
```shell | ||
django-admin startproject wsb | ||
``` | ||
|
||
### 4. Install csgo-App | ||
```shell | ||
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 | ||
``` | ||
|
||
### 5. Edit settings.py / add to INSTALLED_APPS | ||
|
||
### 3. Set up local Django project | ||
```shell | ||
cd wannspieltbig_dev/ | ||
django-admin startproject wsb | ||
cd wsb/ | ||
mkdir wsb/static | ||
nano wsb/wsb/settings.py | ||
``` | ||
|
@@ -51,6 +37,13 @@ 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', | ||
|
@@ -79,14 +72,14 @@ STATIC_URL = '/static/' | |
STATIC_ROOT = '/home/christian/workspace/venvs/wannspieltbig_dev/wsb/static' # CHANGE TO YOUR LOCAL FOLDER | ||
``` | ||
|
||
### 6. Setup Database and symlink static files | ||
### 4. Setup Database and symlink static files | ||
|
||
```shell | ||
python wsb/manage.py migrate | ||
python wsb/manage.py collectstatic -l | ||
``` | ||
|
||
### 7. Add initial data | ||
### 5. Add initial data | ||
|
||
```shell | ||
python wsb/manage.py shell | ||
|
@@ -106,12 +99,10 @@ from django.contrib.auth.models import User | |
User.objects.create_superuser(username="devuser", password="devuser", email="[email protected]") | ||
``` | ||
|
||
### 7. Run Dev Server | ||
### 6. Run Dev Server | ||
```shell | ||
python wsb/manage.py runserver 0.0.0.0:9001 | ||
``` | ||
Open Browser: | ||
- Frontend: http://127.0.0.1:9001 | ||
- Django-Admin: http://127.0.0.1:9001/admin/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
csgomatches/migrations/0046_rename_team_logo_url_game_game_logo_url_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Generated by Django 5.1 on 2024-09-01 13:48 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('csgomatches', '0045_auto_20240727_1346'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='game', | ||
old_name='team_logo_url', | ||
new_name='game_logo_url', | ||
), | ||
migrations.RenameField( | ||
model_name='game', | ||
old_name='team_logo_width', | ||
new_name='game_logo_width', | ||
), | ||
migrations.AlterField( | ||
model_name='csgositesetting', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='externallink', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='game', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='lineup', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='lineupplayer', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='map', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='match', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='matchmap', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='player', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='playerrole', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='staticpage', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='team', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
migrations.AlterField( | ||
model_name='tournament', | ||
name='id', | ||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
csgomatches/migrations/0047_alter_csgositesetting_site_teams.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1 on 2024-09-06 10:02 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('csgomatches', '0046_rename_team_logo_url_game_game_logo_url_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='csgositesetting', | ||
name='site_teams', | ||
field=models.ManyToManyField(to='csgomatches.team'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.1 on 2024-09-06 10:13 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('csgomatches', '0047_alter_csgositesetting_site_teams'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='match', | ||
options={'ordering': ['-first_map_at'], 'verbose_name_plural': 'matches'}, | ||
), | ||
] |
Oops, something went wrong.