Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
kszkepzes
old
kszkepzes-backend
Commits
e35230ae
Commit
e35230ae
authored
6 years ago
by
Bodor Máté
Browse files
Options
Downloads
Patches
Plain Diff
add absent filed to model
parent
a36c0862
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/stats/migrations/0003_auto_20190122_1449.py
+24
-0
24 additions, 0 deletions
src/stats/migrations/0003_auto_20190122_1449.py
src/stats/models.py
+6
-3
6 additions, 3 deletions
src/stats/models.py
with
30 additions
and
3 deletions
src/stats/migrations/0003_auto_20190122_1449.py
0 → 100644
+
24
−
0
View file @
e35230ae
# Generated by Django 2.0.1 on 2019-01-22 13:49
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
account
'
,
'
0002_auto_20190122_1341
'
),
(
'
stats
'
,
'
0002_event_description
'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'
event
'
,
name
=
'
absent
'
,
field
=
models
.
ManyToManyField
(
blank
=
True
,
related_name
=
'
events_absent
'
,
to
=
'
account.Profile
'
),
),
migrations
.
AlterField
(
model_name
=
'
event
'
,
name
=
'
visitors
'
,
field
=
models
.
ManyToManyField
(
blank
=
True
,
related_name
=
'
events_visitor
'
,
to
=
'
account.Profile
'
),
),
]
This diff is collapsed.
Click to expand it.
src/stats/models.py
+
6
−
3
View file @
e35230ae
from
django.db
import
models
from
django.db
import
models
from
account.models
import
Profile
from
account.models
import
Profile
from
common.middleware
import
CurrentUserMiddleware
from
common.middleware
import
CurrentUserMiddleware
from
django.utils
import
timezone
from
django.core.exceptions
import
ValidationError
class
Event
(
models
.
Model
):
class
Event
(
models
.
Model
):
...
@@ -11,7 +9,12 @@ class Event(models.Model):
...
@@ -11,7 +9,12 @@ class Event(models.Model):
description
=
models
.
TextField
(
blank
=
True
,
default
=
''
)
description
=
models
.
TextField
(
blank
=
True
,
default
=
''
)
visitors
=
models
.
ManyToManyField
(
visitors
=
models
.
ManyToManyField
(
Profile
,
Profile
,
related_name
=
'
events
'
,
related_name
=
'
events_visitor
'
,
blank
=
True
)
absent
=
models
.
ManyToManyField
(
Profile
,
related_name
=
'
events_absent
'
,
blank
=
True
blank
=
True
)
)
created_by
=
models
.
ForeignKey
(
created_by
=
models
.
ForeignKey
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment