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
SRCT
go
Commits
cc00bce8
Commit
cc00bce8
authored
Dec 15, 2013
by
Jean Michel Rouly
Browse files
Added meta behavior for URL model
parent
6859cb16
Changes
1
Hide whitespace changes
Inline
Side-by-side
go/go/models.py
View file @
cc00bce8
...
...
@@ -11,3 +11,9 @@ class URL( models.Model ):
short
=
models
.
CharField
(
primary_key
=
True
,
max_length
=
50
)
clicks
=
models
.
IntegerField
(
default
=
0
)
expires
=
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)
def
__unicode__
(
self
):
return
'<URL: %s>'
%
self
.
short
class
Meta
:
ordering
=
[
'short'
]
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