Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robert
Commoning Engine
Commits
70a5f9bf
Commit
70a5f9bf
authored
Jun 14, 2020
by
Robert
Browse files
Add need pattern reference to need and in admin
parent
128d69da
Changes
3
Hide whitespace changes
Inline
Side-by-side
commoning/admin.py
View file @
70a5f9bf
from
django.contrib
import
admin
# Register your models here.
from
commoning.models
import
Need
admin
.
site
.
register
(
Need
)
commoning/migrations/0002_auto_20200614_1520.py
0 → 100644
View file @
70a5f9bf
# Generated by Django 2.2.13 on 2020-06-14 15:20
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'commoning'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'need'
,
name
=
'need_pattern_url'
,
field
=
models
.
URLField
(
blank
=
True
),
),
migrations
.
AlterField
(
model_name
=
'need'
,
name
=
'title'
,
field
=
models
.
CharField
(
max_length
=
200
),
),
]
commoning/models.py
View file @
70a5f9bf
...
...
@@ -2,6 +2,10 @@ from django.db import models
class
Need
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
2
55
)
title
=
models
.
CharField
(
max_length
=
2
00
)
description
=
models
.
TextField
()
creation_time
=
models
.
DateTimeField
(
auto_now_add
=
True
)
need_pattern_url
=
models
.
URLField
(
blank
=
True
)
def
__str__
(
self
):
return
self
.
title
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment