Browse Source

Add demo app

pull/2/merge
Rodolfo Carvalho 10 years ago
parent
commit
fe41f577cd
9 changed files with 64 additions and 0 deletions
  1. +0
    -0
      openshift/__init__.py
  2. +3
    -0
      openshift/admin.py
  3. +0
    -0
      openshift/migrations/__init__.py
  4. +3
    -0
      openshift/models.py
  5. +47
    -0
      openshift/templates/openshift/index.html
  6. +3
    -0
      openshift/tests.py
  7. +6
    -0
      openshift/views.py
  8. +1
    -0
      project/settings.py
  9. +1
    -0
      project/urls.py

+ 0
- 0
openshift/__init__.py View File


+ 3
- 0
openshift/admin.py View File

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

+ 0
- 0
openshift/migrations/__init__.py View File


+ 3
- 0
openshift/models.py View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

+ 47
- 0
openshift/templates/openshift/index.html View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="robots" content="NONE,NOARCHIVE"><title>Welcome to Django</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font:small sans-serif; }
body>div { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; }
code { background: #ffd; }
#summary { background: #34383c; }
#summary h1 { color: #fff; }
#explanation { background:#eee; }
#instructions { background:#f6f6f6; }
#instructions ol li { margin: 0.2em 0 0.2em 2em; }
</style>
</head>
<body>
<div id="summary">
<h1>Your Django-powered OpenShift project works!</h1>
</div>
<div id="instructions">
<p>
This project has just a skeleton for you to get started. It includes:
</p>
<ol>
<li>Django project created with <code>python manage.py startproject project .</code></li>
<li>Appropriate database configuration</li>
<li>Sample Django app created with <code>python manage.py startapp openshift</code></li>
</ol>
<p>
Now it is time to add your own code. Follow along the <a href="https://docs.djangoproject.com/en/1.8/intro/tutorial01/">Django tutorial</a> to learn more about Django.
</p>
</div>
<div id="explanation">
<p>
You can see more information about this request using the toolbar on the right.<br>
Please note that by default your Django settings have <code>DEBUG = True</code> and that is not appropriate for production use,
but very handy during development.<br>
Refer to the <a href="https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/">Deployment Checklist</a> before taking this project into a production environment.</p>
</div>
</body></html>

+ 3
- 0
openshift/tests.py View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

+ 6
- 0
openshift/views.py View File

@ -0,0 +1,6 @@
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'openshift/index.html')

+ 1
- 0
project/settings.py View File

@ -43,6 +43,7 @@ INSTALLED_APPS = (
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'debug_toolbar', 'debug_toolbar',
'openshift',
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (


+ 1
- 0
project/urls.py View File

@ -6,5 +6,6 @@ urlpatterns = [
# url(r'^$', 'project.views.home', name='home'), # url(r'^$', 'project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')), # url(r'^blog/', include('blog.urls')),
url(r'^$', 'openshift.views.index'),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
] ]

Loading…
Cancel
Save