This commit is contained in:
Bernhard Posselt 2016-06-05 21:34:48 +02:00
Родитель 625efb7682
Коммит 118d63a80f
4 изменённых файлов: 66 добавлений и 23 удалений

Просмотреть файл

@ -1,20 +1,20 @@
- model: core.category
pk: games
pk: tools
fields:
name: Games
- model: core.category
pk: multimedia
fields:
name: Multimedia
- model: core.category
pk: pim
fields:
name: PIM
name: Tools
- model: core.category
pk: productivity
fields:
name: Productivity
- model: core.category
pk: tools
pk: pim
fields:
name: Tools
name: PIM
- model: core.category
pk: multimedia
fields:
name: Multimedia
- model: core.category
pk: games
fields:
name: Games

Просмотреть файл

@ -0,0 +1,12 @@
- model: core.database
pk: sqlite
fields:
name: SQLite
- model: core.database
pk: mysql
fields:
name: MySQL
- model: core.database
pk: pgsql
fields:
name: PostgreSQL

Просмотреть файл

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-05 18:31
# Generated by Django 1.9.7 on 2016-06-05 19:33
from __future__ import unicode_literals
from django.db import migrations, models
@ -33,7 +33,7 @@ class Migration(migrations.Migration):
name='AppRelease',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('version', models.CharField(max_length=128, unique=True)),
('version', models.CharField(max_length=128)),
('php_min', models.CharField(max_length=32)),
('php_max', models.CharField(blank=True, max_length=32)),
('platform_min', models.CharField(max_length=32)),
@ -56,22 +56,31 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Category',
fields=[
('id', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)),
('name', models.CharField(max_length=128, unique=True)),
('id', models.CharField(help_text='Category id which is used to identify a category. Used to identify categories when uploading an app', max_length=128, primary_key=True, serialize=False, unique=True)),
('name', models.CharField(help_text='Category name which will be presented to the user', max_length=128)),
],
options={
'verbose_name_plural': 'Categories',
'verbose_name': 'Category',
},
),
migrations.CreateModel(
name='Command',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, unique=True)),
('name', models.CharField(help_text='Name of a required shell command, e.g. grep', max_length=128, unique=True)),
],
),
migrations.CreateModel(
name='Database',
fields=[
('id', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)),
('id', models.CharField(help_text='Key which is used to identify a database', max_length=128, primary_key=True, serialize=False, unique=True)),
('name', models.CharField(help_text='Database name which will be presented to the user', max_length=128)),
],
options={
'verbose_name_plural': 'Databases',
'verbose_name': 'Database',
},
),
migrations.CreateModel(
name='DatabaseDependency',

Просмотреть файл

@ -21,7 +21,7 @@ class App(models.Model):
class AppRelease(models.Model):
version = models.CharField(max_length=128, unique=True)
version = models.CharField(max_length=128)
app = models.ForeignKey('App', on_delete=models.CASCADE)
# dependencies
libs = models.ManyToManyField('PhpLibrary', through='LibraryDependency')
@ -48,20 +48,42 @@ class Author(models.Model):
class Command(models.Model):
name = models.CharField(max_length=128, unique=True)
name = models.CharField(max_length=128, unique=True, help_text=_(
'Name of a required shell command, e.g. grep'))
class Category(models.Model):
id = models.CharField(max_length=128, unique=True, primary_key=True)
id = models.CharField(max_length=128, unique=True, primary_key=True,
help_text=_(
'Category id which is used to identify a '
'category. Used to identify categories when '
'uploading an app'))
# possible l10n
name = models.CharField(max_length=128, unique=True)
name = models.CharField(max_length=128, help_text=_(
'Category name which will be presented to the user'))
class Meta:
verbose_name = _('Category')
verbose_name_plural = _('Categories')
def __str__(self):
return self.name
class Database(models.Model):
id = models.CharField(max_length=128, unique=True, primary_key=True)
id = models.CharField(max_length=128, unique=True, primary_key=True,
help_text=_(
'Key which is used to identify a database'))
# possible l10n
name = models.CharField(max_length=128, help_text=_(
'Database name which will be presented to the user'))
class Meta:
verbose_name = _('Database')
verbose_name_plural = _('Databases')
def __str__(self):
return self.name
class DatabaseDependency(models.Model):