Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
django-panik-nonstop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
django-panik-nonstop
Commits
d4bc38c4
Commit
d4bc38c4
authored
Oct 03, 2017
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add creation timestamp to tracks
parent
f6fd9f5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
nonstop/migrations/0007_auto_20171003_1022.py
nonstop/migrations/0007_auto_20171003_1022.py
+23
-0
nonstop/models.py
nonstop/models.py
+5
-0
No files found.
nonstop/migrations/0007_auto_20171003_1022.py
0 → 100644
View file @
d4bc38c4
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'nonstop'
,
'0006_auto_20171002_2231'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'track'
,
options
=
{
'ordering'
:
[
'creation_timestamp'
]},
),
migrations
.
AddField
(
model_name
=
'track'
,
name
=
'creation_timestamp'
,
field
=
models
.
DateTimeField
(
auto_now_add
=
True
,
null
=
True
),
),
]
nonstop/models.py
View file @
d4bc38c4
...
...
@@ -44,6 +44,11 @@ class Track(models.Model):
cfwb
=
models
.
BooleanField
(
'CFWB'
,
default
=
False
)
nonstop_zones
=
models
.
ManyToManyField
(
'emissions.Nonstop'
,
blank
=
True
)
creation_timestamp
=
models
.
DateTimeField
(
auto_now_add
=
True
,
null
=
True
)
class
Meta
:
ordering
=
[
'creation_timestamp'
]
def
get_absolute_url
(
self
):
return
reverse
(
'track-view'
,
kwargs
=
{
'pk'
:
self
.
id
})
...
...
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