Skip to content

Commit

Permalink
Se integra nuestra primera vista y configuramos el motor de templates…
Browse files Browse the repository at this point in the history
… de Django
  • Loading branch information
alexdzul committed Apr 18, 2015
1 parent 762227a commit af06f22
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 5 deletions.
1 change: 1 addition & 0 deletions keyflavor/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'alex'
Empty file.
3 changes: 3 additions & 0 deletions keyflavor/apps/security/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
Empty file.
3 changes: 3 additions & 0 deletions keyflavor/apps/security/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
10 changes: 10 additions & 0 deletions keyflavor/apps/security/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>Hola Mundo</h1>
</body>
</html>
3 changes: 3 additions & 0 deletions keyflavor/apps/security/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
7 changes: 7 additions & 0 deletions keyflavor/apps/security/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__author__ = 'alex'
from django.conf.urls import patterns, url


urlpatterns = patterns('keyflavor.apps.security.views',
url(r'^$', 'index_view', name="index"),
)
7 changes: 7 additions & 0 deletions keyflavor/apps/security/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.shortcuts import render_to_response, RequestContext

# Create your views here.


def index_view(request):
return render_to_response('index.html', context=RequestContext(request))
3 changes: 2 additions & 1 deletion keyflavor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'keyflavor.apps.security',
)

MIDDLEWARE_CLASSES = (
Expand All @@ -55,7 +56,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(os.path.dirname(__file__), 'templates'), ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down
5 changes: 1 addition & 4 deletions keyflavor/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
from django.contrib import admin

urlpatterns = [
# Examples:
# url(r'^$', 'keyflavor.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
url(r'^', include('keyflavor.apps.security.urls')),
]

0 comments on commit af06f22

Please sign in to comment.