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

DataModel

Mike Tigas edited this page May 1, 2014 · 6 revisions

Database models

A draft. In lieu of an actual ERD at this point, because this may very well be a one table app (at this prototype phase).


User -- Actually, just ignore this. We'll just use the User class provided by Django’s auth module.

Document

Field Django ModelField type Description
name CharField
slug SlugField
description TextField
license TextField
doc_file FileField file as stored in local filesystem (avoiding file because that's sometimes a reserved keyword)
filename CharField base filename
filesize BigIntegerField file size in bytes
sha256 CharField sha256 checksum (as per shasum -a 256 command)
sha512 CharField as above, but based on the sha512 checksum
gpgsig TextField GnuPG detached signature as generated by gpg -as --detach-sign, but stored as a text blob in the database instead of as a separate file.
uploaded DateTime, auto_now_add=True
updated DateTime, auto_now=True
Clone this wiki locally