Commit e6b04514 authored by Pranav Jerry's avatar Pranav Jerry

new versioning system

Modified templates and slightly changed
The version is now stored as a tuple in and converts the tuple using get_version()
from django.utils.version so django is now
a makedepend
parent a7b1b050
......@@ -6,23 +6,22 @@ This file is a blueprint of Taleverse.
A tale is a story filling utmost 4 pages.
In a model, Tale should have the following attributes:
- uuid: string, primary key (eg: `2bec724e-36c3-4149-a9b1-44257400b470`)
- uuid: string, automatically generated primary key
(eg: `2bec724e-36c3-4149-a9b1-44257400b470`).
- title: string (eg: `The Fox and the GNU`)
- license: string, any of `CC-BY-4.0`, `CC-BY-SA-4.0`, `CC0-1.0`
- language: two-letter string (eg: `en`)
- other_languages: tuple for mentioning other languages reffering to other
versions. For example:
"ml": "6c65e8b8-329e-4129-8dd9-b00998d3161c",
"de": "21c64fde-7002-4ca7-9cf4-1efe629c868e"
- authors: reference to user model (to be created)
## Notes
- users should be able to create stories
- stories can have translations in multiple languages
- users can edit other user's stories (like MediaWiki)
- the server should support federation (ActivityPub, anyone?)
- author: reference to user model (to be created)
- last_modified: date and time of last modification
- finished: boolean, whether this story is completely
developed or not
## User
A user is a person who can create stories. A user can edit
their own stories.
## Collaborative story
A derived form of Tale which can be developed by multiple users.
......@@ -2,6 +2,8 @@
import os
from setuptools import find_packages, setup
from django.utils.version import get_version
from taleverse import VERSION
with open(os.path.join(os.path.dirname(__file__), '')) as readme:
......@@ -9,9 +11,10 @@ with open(os.path.join(os.path.dirname(__file__), '')) as readme:
# allow to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
app_version = get_version(VERSION)
license='AGPL 3.0',
#!/usr/bin/env python3
# the version of taleverse is stored here
# this tuple is converted to PEP 440 compliant string in
VERSION = (0, 1, 0, 'alpha', 0)
<!DOCTYPE html>
{% load i18n %}
<meta charset="utf-8"/>
<title>{% block title %}Taleverse{% endblock %}</title>
<nav id="menu">
{% block menu %}
{% endblock %}
{% extends "taleverse/base.djhtml" %}
{% load i18n %}
{% block title %}
{% trans "Home" noop %}
{% endblock %}
<!DOCTYPE html>
{% if stories %}
{% for story in stories %}
<li>{{ story.title }}</li>
{% endfor %}
{% else %}
<p>No stories available</p>
{% endif %}
......@@ -4,4 +4,4 @@ from .models import Story
def index(request):
latest_story_list = Story.objects.order_by('-pub_date')[:5]
context = {"stories": latest_story_list}
return render(request, 'taleverse/index.html', context)
return render(request, 'taleverse/index.djhtml', context)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment