Reorganise project layout
This commit is contained in:
parent
206434b7de
commit
2dee05b51e
17 changed files with 10 additions and 103 deletions
|
@ -1,3 +1,2 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
|
@ -2,8 +2,6 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<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" />
|
||||
<title>minie links!</title>
|
||||
</head>
|
|
@ -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,),
|
||||
),
|
||||
]
|
|
@ -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,
|
||||
),
|
||||
]
|
|
@ -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,
|
||||
),
|
||||
]
|
|
@ -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',
|
||||
),
|
||||
]
|
|
@ -3,7 +3,7 @@ import os
|
|||
import sys
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
Django settings for minie project.
|
||||
Django settings for min.ie project.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.7/topics/settings/
|
||||
|
@ -27,7 +27,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.staticfiles',
|
||||
'links',
|
||||
'app',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
@ -36,12 +36,12 @@ MIDDLEWARE_CLASSES = (
|
|||
)
|
||||
|
||||
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()
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
|
@ -2,6 +2,6 @@ from django.conf.urls import patterns, include, url
|
|||
from django.contrib import admin
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', 'links.views.home', name='home'),
|
||||
url(r'(.*)', 'links.views.catchall', name='short'),
|
||||
url(r'^$', 'app.views.home', name='home'),
|
||||
url(r'(.*)', 'app.views.catchall', name='short'),
|
||||
)
|
|
@ -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``.
|
||||
|
||||
|
@ -8,7 +8,7 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
|
|||
"""
|
||||
|
||||
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 dj_static import Cling
|
Loading…
Add table
Add a link
Reference in a new issue