Skip to content

Commit

Permalink
More modern project structure (Django 1.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
knatten committed May 27, 2013
1 parent a371409 commit eadb43a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 21 deletions.
Empty file removed cppquiz/__init__.py
Empty file.
14 changes: 0 additions & 14 deletions cppquiz/manage.py

This file was deleted.

2 changes: 1 addition & 1 deletion cppquiz/quiz/admin.py
@@ -1,5 +1,5 @@
from django.contrib import admin
from quiz.models import *
from models import *

def question_part(obj):
return obj.question[:250]
Expand Down
4 changes: 2 additions & 2 deletions cppquiz/quiz/answer.py
@@ -1,5 +1,5 @@
from quiz.models import UsersAnswer
from quiz.util import get_client_ip
from models import UsersAnswer
from util import get_client_ip

class Answer():
def __init__(self, question, request):
Expand Down
3 changes: 1 addition & 2 deletions cppquiz/quiz/urls.py
@@ -1,8 +1,7 @@
from django.conf.urls.defaults import *
from django.views.generic.base import TemplateView


from quiz import views
import views

urlpatterns = patterns('',
url(r'^quiz/question/(?P<question_id>.+)', views.question, name='question'),
Expand Down
2 changes: 1 addition & 1 deletion cppquiz/settings.py
Expand Up @@ -122,7 +122,7 @@
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'south',
'quiz',
'cppquiz.quiz',
)

# A sample logging configuration. The only tangible logging
Expand Down
2 changes: 1 addition & 1 deletion cppquiz/urls.py
Expand Up @@ -15,6 +15,6 @@

# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url(r'', include('quiz.urls')),
url(r'', include('cppquiz.quiz.urls')),
(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt')),
)
9 changes: 9 additions & 0 deletions manage.py
@@ -0,0 +1,9 @@
#!/usr/bin/env python
import os, sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cppquiz.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)

0 comments on commit eadb43a

Please sign in to comment.