Commit e9679b74 authored by Robert's avatar Robert
Browse files

Add basic activities

parent 70a5f9bf
from django.contrib import admin
from commoning.models import Need
from commoning.models import Activity, Need
admin.site.register(Activity)
admin.site.register(Need)
# Generated by Django 2.2.13 on 2020-06-14 17:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('commoning', '0002_auto_20200614_1520'),
]
operations = [
migrations.CreateModel(
name='Activity',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('creation_time', models.DateTimeField(auto_now_add=True)),
('activity_pattern_url', models.URLField()),
('need', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='commoning.Need')),
],
),
]
from django.db import models
class Activity(models.Model):
creation_time = models.DateTimeField(auto_now_add=True)
activity_pattern_url = models.URLField()
need = models.OneToOneField('commoning.Need', on_delete=models.CASCADE)
class Need(models.Model):
title = models.CharField(max_length=200)
description = models.TextField()
......
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