Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kevin Nguyen CS13: Project Week - LambdaMUD #129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/Users/Kev/.local/share/virtualenvs/Lambda-ieVd9-AA/bin/python"
}
4 changes: 4 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ django-cors-headers = "*"
gunicorn = "*"
django-heroku = "*"
django-rest-api = "*"
psycopg2-binary = "*"
dj-database-url = "*"
whitenoise = "*"

[dev-packages]
pylint = "*"

[requires]
python_version = "3.7"
296 changes: 203 additions & 93 deletions Pipfile.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Trello Link: https://trello.com/b/YIe47blJ/lambdamud-kevin-nguyen

GitHub PR link: https://github.com/LambdaSchool/LambdaMUD-Project/pull/129

key: ac06b907b43eff046a6dedfc38328c951bd57922

# Adventure Project Week

This week you'll be implementing a frontend interface for a multi-user
Expand Down
8 changes: 7 additions & 1 deletion adv_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import os
from decouple import config
import dj_database_url

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand All @@ -26,7 +27,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', cast=bool)

ALLOWED_HOSTS = []
ALLOWED_HOSTS = [config('ALLOWED_HOSTS')]


# Application definition
Expand Down Expand Up @@ -55,6 +56,7 @@

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
Expand Down Expand Up @@ -96,6 +98,7 @@
}
}

DATABASES['default'] = dj_database_url.config('DATABASE_URL', conn_max_age=600)

# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
Expand Down Expand Up @@ -149,5 +152,8 @@

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'static')

import django_heroku
django_heroku.settings(locals())
del DATABASES['default']['OPTIONS']['sslmode']
39 changes: 39 additions & 0 deletions adventure/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 2.1.1 on 2018-12-13 00:00

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='Player',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('currentRoom', models.IntegerField(default=0)),
('uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Room',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(default='DEFAULT TITLE', max_length=50)),
('description', models.CharField(default='DEFAULT DESCRIPTION', max_length=500)),
('n_to', models.IntegerField(default=0)),
('s_to', models.IntegerField(default=0)),
('e_to', models.IntegerField(default=0)),
('w_to', models.IntegerField(default=0)),
],
),
]