orionblastar / K666

K666 is forum discussion software, this is an attempt to write the Free version FreeK666 without violating copyright
http://k666.kr5ddit.com
MIT License
5 stars 0 forks source link

Create a Dynamic Template #3

Closed procrasti closed 8 years ago

procrasti commented 8 years ago

NewBranch: DynamicIndex

echo "HELLO TEMPLATES" > freek666/templates/index.html

Add the following line to freek666/urls.py: url(r'^index.html$', TemplateView.as_view(template_name="index.html")),

Now go to /index.html and it you should see HELLO TEMPLATES.

Additional Credit: Redirect root (/) to index.html.

orionblastar commented 8 years ago

I tried that but the index.html with the golden apple shows up instead of the template. Should the template directory be in freek666 or static?

procrasti commented 8 years ago

Should the template directory be in freek666 or static?

echo "HELLO TEMPLATES" > freek666/templates/index.html

It's not static, so no.

The link to it is /index.html... you shouldn't see an apple.

orionblastar commented 8 years ago

I made the template directory in freek666 made the templates directory in freek666 echoed the index.html file there in templates. Started the K666-env and I still see the golden apple.

I got root redirected to static/index.html that has the Apple but I can't see the Hello.

procrasti commented 8 years ago

Don't go to static/index.html, just index.html.

procrasti commented 8 years ago

Actually, add a link from the static page to the dynamic page!

procrasti commented 8 years ago

This is fixed in startup branch.

Once you have merged it... feel free to close this issue.

procrasti commented 8 years ago

Additional Credit: Redirect root (/) to index.html.

I think you can merge startup into master if everything looks good to you?

procrasti commented 8 years ago

Do this first: https://github.com/orionblastar/K666/issues/14

procrasti commented 8 years ago

We'll, we have this in mergetest now... will close.