Commit 559461e2 authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

aktueller status

parent 2f79d62b
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'thoch2Ohthahgheequo2boripooPeW2cohsh0ahRoh0Hei8ahN'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'snake',
'USER': 'snake',
'PASSWORD': 'snake',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
......@@ -20,11 +20,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
......@@ -68,18 +63,6 @@ TEMPLATES = [
WSGI_APPLICATION = 'Programmierspiel.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
......
......@@ -5,12 +5,15 @@ from django.views.generic import TemplateView
from django.views.generic.base import RedirectView
from core import views as core_views
urlpatterns = [
path('', TemplateView.as_view(template_name='index.html'), name='home'),
path('admin/', admin.site.urls),
path('signup/', core_views.signup, name='signup'),
path('login/', auth_views.login, {'template_name': 'login.html'}, name='login'),
path('logout/', auth_views.logout, {'next_page': 'login'}, name='logout'),
path('watch/', TemplateView.as_view(template_name='watch/watch.html'), name='watch'),
path('accounts/profile/', RedirectView.as_view(url='/', permanent=False)),
path('snake/', core_views.snake_list, name='snake'),
path('snake/create', core_views.snake_create, name='snake_create'),
path('snake/<int:snake_id>', core_views.snake_edit, name='snake_edit'),
]
from django.contrib import admin
# Register your models here.
from core.models import Snake
admin.site.register(Snake)
# Generated by Django 2.0.1 on 2018-01-10 21:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Bot',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('enabled', models.BooleanField()),
('deleted', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='BotGame',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateTimeField(blank=True, null=True)),
('end_date', models.DateTimeField(blank=True, null=True)),
('score', models.IntegerField()),
],
),
migrations.CreateModel(
name='BotVersion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('code', models.TextField()),
('name', models.CharField(max_length=255)),
('created', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
('deleted', models.BooleanField(default=False)),
('bot_instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Bot')),
],
),
migrations.CreateModel(
name='SnakeDesign',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
),
migrations.CreateModel(
name='SnakeDesignFlag',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('img', models.ImageField(upload_to='')),
],
),
migrations.CreateModel(
name='SnakeDesignHead',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('img', models.ImageField(upload_to='')),
],
),
migrations.CreateModel(
name='SnakeDesignSegment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sort_id', models.IntegerField()),
('color_r', models.IntegerField()),
('color_g', models.IntegerField()),
('color_b', models.IntegerField()),
('design', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.SnakeDesign')),
],
),
migrations.CreateModel(
name='Team',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('leader', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='TeamMembership',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('request_date', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
('start_date', models.DateTimeField(blank=True, null=True)),
('end_date', models.DateTimeField(blank=True, null=True)),
('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Team')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('current_team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Team')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='snakedesign',
name='flag',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='core.SnakeDesignFlag'),
),
migrations.AddField(
model_name='snakedesign',
name='head',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='core.SnakeDesignHead'),
),
migrations.AddField(
model_name='snakedesign',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='botversion',
name='design',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='core.SnakeDesign'),
),
migrations.AddField(
model_name='botgame',
name='bot_version',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.BotVersion'),
),
migrations.AddField(
model_name='botgame',
name='team',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Team'),
),
migrations.AddField(
model_name='bot',
name='design',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='core.SnakeDesign'),
),
migrations.AddField(
model_name='bot',
name='selected_version',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='core.BotVersion'),
),
migrations.AddField(
model_name='bot',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
),
]
# Generated by Django 2.0.1 on 2018-01-20 20:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='snakedesign',
name='flag',
),
migrations.RemoveField(
model_name='snakedesign',
name='head',
),
migrations.RemoveField(
model_name='snakedesign',
name='user',
),
migrations.RemoveField(
model_name='snakedesignsegment',
name='design',
),
migrations.RemoveField(
model_name='bot',
name='deleted',
),
migrations.RemoveField(
model_name='bot',
name='design',
),
migrations.RemoveField(
model_name='bot',
name='enabled',
),
migrations.RemoveField(
model_name='botversion',
name='design',
),
migrations.DeleteModel(
name='SnakeDesign',
),
migrations.DeleteModel(
name='SnakeDesignFlag',
),
migrations.DeleteModel(
name='SnakeDesignHead',
),
migrations.DeleteModel(
name='SnakeDesignSegment',
),
]
# Generated by Django 2.0.1 on 2018-01-20 20:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0002_auto_20180120_2122'),
]
operations = [
migrations.CreateModel(
name='Snake',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='SnakeGame',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateTimeField(blank=True, null=True)),
('end_date', models.DateTimeField(blank=True, null=True)),
('score', models.IntegerField()),
],
),
migrations.CreateModel(
name='SnakeVersion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('code', models.TextField()),
('name', models.CharField(max_length=255)),
('created', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
('deleted', models.BooleanField(default=False)),
('snake', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Snake')),
],
),
migrations.RemoveField(
model_name='bot',
name='selected_version',
),
migrations.RemoveField(
model_name='bot',
name='user',
),
migrations.RemoveField(
model_name='botgame',
name='bot_version',
),
migrations.RemoveField(
model_name='botgame',
name='team',
),
migrations.RemoveField(
model_name='botversion',
name='bot_instance',
),
migrations.DeleteModel(
name='Bot',
),
migrations.DeleteModel(
name='BotGame',
),
migrations.DeleteModel(
name='BotVersion',
),
migrations.AddField(
model_name='snakegame',
name='snake_version',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.SnakeVersion'),
),
migrations.AddField(
model_name='snakegame',
name='team',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Team'),
),
migrations.AddField(
model_name='snake',
name='selected_version',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='selected_version', to='core.SnakeVersion'),
),
migrations.AddField(
model_name='snake',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
),
]
# Generated by Django 2.0.1 on 2018-01-20 20:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20180120_2130'),
]
operations = [
migrations.RemoveField(
model_name='snakeversion',
name='deleted',
),
migrations.RemoveField(
model_name='snakeversion',
name='name',
),
]
# Generated by Django 2.0.1 on 2018-01-20 21:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20180120_2157'),
]
operations = [
migrations.RemoveField(
model_name='snake',
name='selected_version',
),
]
from django.db import models
from django.utils.timezone import now
from django.contrib.auth.models import User
# Create your models here.
class Team(models.Model):
leader = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True)
name = models.CharField(max_length=255)
class TeamMembership(models.Model):
team = models.ForeignKey(Team, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE)
request_date = models.DateTimeField(default=now, blank=True)
start_date = models.DateTimeField(null=True, blank=True)
end_date = models.DateTimeField(null=True, blank=True)
class Snake(models.Model):
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
name = models.CharField(max_length=255)
class SnakeVersion(models.Model):
class Meta:
get_latest_by = "created"
snake = models.ForeignKey(Snake, on_delete=models.CASCADE)
created = models.DateTimeField(default=now, blank=True)
code = models.TextField()
class SnakeGame(models.Model):
snake_version = models.ForeignKey(SnakeVersion, on_delete=models.CASCADE)
team = models.ForeignKey(Team, null=True, blank=True, on_delete=models.SET_NULL)
start_date = models.DateTimeField(blank=True, null=True)
end_date = models.DateTimeField(blank=True, null=True)
score = models.IntegerField()
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
current_team = models.ForeignKey(Team, blank=True, null=True, on_delete=models.SET_NULL)
2017.10.17 Version 1.2.9
* added support for bidirectional text, with monospace font (Alex Shensis)
* added support for emoji 😊
* new language modes
- Red (Toomas Vooglaid)
- CSound (Nathan Whetsell)
- JSSM (John Haugeland)
* New Themes
- Dracula (Austin Schwartz)
2017.07.02 Version 1.2.8
* Fixed small bugs in searchbox and autocompleter
2017.06.18 Version 1.2.7
* Added Support for arrow keys on external IPad keyboard (Emanuele Tamponi)
* added match counter to searchbox extension
- implemented higlighting of multiline strings in yaml mode (Maxim Trushin)
- improved haml syntax highlighter (Andrés Álvarez)
2016.12.03 Version 1.2.6
* Fixed IME handling on new Chrome
* Support for php 7 in the syntax checker
2016.08.16 Version 1.2.5
* Fixed regression in noconflict mode
2016.07.27 Version 1.2.4
* Maintenance release with several new modes and small bugfixes
2016.01.17 Version 1.2.3
* Bugfixes
- fix memory leak in setSession (Tyler Stalder)
- double click not working on linux/mac
* new language modes
- reStructuredText (Robin Jarry)
- NSIS (Jan T. Sott)
2015.10.28 Version 1.2.1
* new language modes
- Swift
- JSX
2015.07.11 Version 1.2.0
* New Features
- Indented soft wrap (danyaPostfactum)
- Rounded borders on selections
* API Changes
- unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
- "change" event listeners on session and editor get delta objects directly
* new language modes
- SQLServer (Morgan Yarbrough)
2015.04.03 Version 1.1.9
- Small Enhancements and Bugfixes
2014.11.08 Version 1.1.8
* API Changes
- `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
* New Features
- Improved autoindent for html and php modes (Adam Jimenez)
- Find All from searchbox (Colton Voege)
* new language modes
- Elixir, Elm
2014.09.21 Version 1.1.7
* Bugfixes
- fix several bugs in autocompletion
- workaround for inaccurate getBoundingClientRect on chrome 37
2014.08.17 Version 1.1.6
* Bugfixes
- fix regression in double tap to highlight
- Improved Latex Mode (Daniel Felder)
* API Changes
- editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
* new language modes
- Praat (José Joaquín Atria)
- Eiffel (Victorien Elvinger)
- G-code (Adam Joseph Cook)
2014.07.09 Version 1.1.5
* Bugfixes
- fix regression in autocomplete popup
* new language modes
- gitignore (Devon Carew)
2014.07.01 Version 1.1.4
* New Features
- Highlight matching tags (Adam Jimenez)
- Improved jump to matching command (Adam Jimenez)
* new language modes
- AppleScript (Yaogang Lian)
- Vala
2014.03.08 Version 1.1.3
* New Features
- Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
- Add ColdFusion behavior (Abram Adams)
- add showLineNumbers option
- Add html syntax checker (danyaPostfactum)
* new language modes
- Gherkin (Patrick Nevels)
- Smarty
2013.12.02 Version 1.1.2
* New Features
- Accessibility Theme for Ace (Peter Xiao)