Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Revert "Using Django Template class"
Browse files Browse the repository at this point in the history
This reverts commit 3e23184.
  • Loading branch information
aboutaaron committed Apr 1, 2015
1 parent 3e23184 commit b6a8021
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions fabfile/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

django.settings_module("{{ project_name }}.settings")
from django.conf import settings
from django.template import Template

"""
Development Tasks
Expand Down Expand Up @@ -39,19 +38,17 @@ def template(template_name='template.html'):
Generate a template that inherits from 'base.html'
Optionally pass template file name. Defaults to 'template.html'
"""
template = Template("""
{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
{% endblock %}
""")
template = """
{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
{% endblock %}
"""
template_dir = os.path.join(settings.BASE_DIR, 'templates')
os.path.exists(template_dir) or os.mkdir(template_dir)

local("echo {} >> {}/{}".format(
template.origin.source, template_dir, template_name))
local("echo {} >> {}/{}".format(template, template_dir, template_name))


@task
Expand Down

0 comments on commit b6a8021

Please sign in to comment.