Dynastie seems OK, start generators

This commit is contained in:
2012-07-15 18:21:26 +02:00
parent df10e56234
commit d6f9dfa76d
6 changed files with 118 additions and 45 deletions

1
generators/__init__.py Normal file
View File

@@ -0,0 +1 @@
__all__ = ["generator", "index"]

6
generators/generator.py Normal file
View File

@@ -0,0 +1,6 @@
class DynastieGenerator:
def generate(self, blog, src, output):
return

16
generators/index.py Normal file
View File

@@ -0,0 +1,16 @@
from xml.dom.minidom import parse
from dynastie.generators.generator import DynastieGenerator
from django.db import models
class Index(DynastieGenerator):
def generate(self, blog, src, output):
from dynastie.models import *
articles = Article.objects.all()
dom = parse(src + '/_index.html')
for node in dom.NodeList:
print node
return