From fe41f577cdcaa09960e29dc0a2f5c02ef2c3a527 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Sun, 24 May 2015 13:10:47 +0200 Subject: [PATCH] Add demo app --- openshift/__init__.py | 0 openshift/admin.py | 3 ++ openshift/migrations/__init__.py | 0 openshift/models.py | 3 ++ openshift/templates/openshift/index.html | 47 ++++++++++++++++++++++++ openshift/tests.py | 3 ++ openshift/views.py | 6 +++ project/settings.py | 1 + project/urls.py | 1 + 9 files changed, 64 insertions(+) create mode 100644 openshift/__init__.py create mode 100644 openshift/admin.py create mode 100644 openshift/migrations/__init__.py create mode 100644 openshift/models.py create mode 100644 openshift/templates/openshift/index.html create mode 100644 openshift/tests.py create mode 100644 openshift/views.py diff --git a/openshift/__init__.py b/openshift/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/openshift/admin.py b/openshift/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/openshift/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/openshift/migrations/__init__.py b/openshift/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/openshift/models.py b/openshift/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/openshift/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/openshift/templates/openshift/index.html b/openshift/templates/openshift/index.html new file mode 100644 index 0000000..6ad12b9 --- /dev/null +++ b/openshift/templates/openshift/index.html @@ -0,0 +1,47 @@ + + + + Welcome to Django + + + + +
+

Your Django-powered OpenShift project works!

+
+ +
+

+ This project has just a skeleton for you to get started. It includes: +

+
    +
  1. Django project created with python manage.py startproject project .
  2. +
  3. Appropriate database configuration
  4. +
  5. Sample Django app created with python manage.py startapp openshift
  6. +
+

+ Now it is time to add your own code. Follow along the Django tutorial to learn more about Django. +

+
+ +
+

+ You can see more information about this request using the toolbar on the right.
+ Please note that by default your Django settings have DEBUG = True and that is not appropriate for production use, + but very handy during development.
+ Refer to the Deployment Checklist before taking this project into a production environment.

+
+ diff --git a/openshift/tests.py b/openshift/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/openshift/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/openshift/views.py b/openshift/views.py new file mode 100644 index 0000000..22b5bb7 --- /dev/null +++ b/openshift/views.py @@ -0,0 +1,6 @@ +from django.shortcuts import render + +# Create your views here. + +def index(request): + return render(request, 'openshift/index.html') diff --git a/project/settings.py b/project/settings.py index 2f0b7a7..635a478 100644 --- a/project/settings.py +++ b/project/settings.py @@ -43,6 +43,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'debug_toolbar', + 'openshift', ) MIDDLEWARE_CLASSES = ( diff --git a/project/urls.py b/project/urls.py index 7faa505..bccf01d 100644 --- a/project/urls.py +++ b/project/urls.py @@ -6,5 +6,6 @@ urlpatterns = [ # url(r'^$', 'project.views.home', name='home'), # url(r'^blog/', include('blog.urls')), + url(r'^$', 'openshift.views.index'), url(r'^admin/', include(admin.site.urls)), ]