massive change on how files are accessed.

moved from prviding a path to using unique id's
if there might have been any directory traversal issues they should be gone now.
This commit is contained in:
ajurna@gmail.com
2016-04-01 09:56:42 +01:00
parent d2f880bbae
commit 1a37db8f22
13 changed files with 555 additions and 145 deletions

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-31 10:40
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import uuid
class Migration(migrations.Migration):
dependencies = [
('comic', '0007_auto_20150626_1820'),
]
operations = [
migrations.CreateModel(
name='Directory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('selector', models.UUIDField(default=uuid.uuid4, null=True)),
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comic.Directory')),
],
),
migrations.AddField(
model_name='comicbook',
name='date_added',
field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2016, 3, 31, 10, 40, 30, 62170, tzinfo=utc)),
preserve_default=False,
),
migrations.AddField(
model_name='comicbook',
name='selector',
field=models.UUIDField(default=uuid.uuid4, null=True),
),
migrations.AddField(
model_name='comicbook',
name='version',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='comicbook',
name='directory',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comic.Directory'),
),
]