Reorganise project layout

This commit is contained in:
Jonathan Cremin 2015-01-18 14:33:53 +00:00
parent 206434b7de
commit 2dee05b51e
17 changed files with 10 additions and 103 deletions

View file

@ -1,3 +1,2 @@
from django.contrib import admin from django.contrib import admin
# Register your models here.

View file

@ -2,8 +2,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/static/normalize.css" />
<link rel="stylesheet" href="/static/skeleton.css" />
<link rel="stylesheet" href="/static/style.css" /> <link rel="stylesheet" href="/static/style.css" />
<title>minie links!</title> <title>minie links!</title>
</head> </head>

View file

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Link',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('link', models.URLField(max_length=2048)),
('base62', models.CharField(max_length=64, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('clicks', models.IntegerField(default=0)),
('ip', models.GenericIPAddressField(null=True)),
],
options={
},
bases=(models.Model,),
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('links', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='link',
name='id',
field=models.AutoField(serialize=False, primary_key=True),
preserve_default=True,
),
]

View file

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('links', '0002_auto_20150117_2248'),
]
operations = [
migrations.RemoveField(
model_name='link',
name='base62',
),
migrations.AlterField(
model_name='link',
name='id',
field=models.CharField(max_length=12, serialize=False, primary_key=True),
preserve_default=True,
),
]

View file

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('links', '0003_auto_20150117_2306'),
]
operations = [
migrations.RenameField(
model_name='link',
old_name='link',
new_name='url',
),
]

View file

@ -3,7 +3,7 @@ import os
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "minie.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line

View file

@ -1,5 +1,5 @@
""" """
Django settings for minie project. Django settings for min.ie project.
For more information on this file, see For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/ https://docs.djangoproject.com/en/1.7/topics/settings/
@ -27,7 +27,7 @@ INSTALLED_APPS = (
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'links', 'app',
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
@ -36,12 +36,12 @@ MIDDLEWARE_CLASSES = (
) )
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'links/templates'), os.path.join(BASE_DIR, 'app/templates'),
) )
ROOT_URLCONF = 'minie.urls' ROOT_URLCONF = 'project.urls'
WSGI_APPLICATION = 'minie.wsgi.application' WSGI_APPLICATION = 'project.wsgi.application'
# Honor the 'X-Forwarded-Proto' header for request.is_secure() # Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

View file

@ -2,6 +2,6 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^$', 'links.views.home', name='home'), url(r'^$', 'app.views.home', name='home'),
url(r'(.*)', 'links.views.catchall', name='short'), url(r'(.*)', 'app.views.catchall', name='short'),
) )

View file

@ -1,5 +1,5 @@
""" """
WSGI config for minie project. WSGI config for min.ie project.
It exposes the WSGI callable as a module-level variable named ``application``. It exposes the WSGI callable as a module-level variable named ``application``.
@ -8,7 +8,7 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
""" """
import os import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "minie.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
from dj_static import Cling from dj_static import Cling