Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3eb0db45
authored
Jan 27, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: add unique_together = ('hostname', 'vlan')
parent
4ba6d1d8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
circle/firewall/migrations/0042_auto__del_unique_host_hostname__add_unique_host_hostname_vlan.py
+0
-0
circle/firewall/models.py
+4
-1
No files found.
circle/firewall/migrations/0042_auto__del_unique_host_hostname__add_unique_host_hostname_vlan.py
0 → 100644
View file @
3eb0db45
This diff is collapsed.
Click to expand it.
circle/firewall/models.py
View file @
3eb0db45
...
@@ -365,7 +365,7 @@ class Host(models.Model):
...
@@ -365,7 +365,7 @@ class Host(models.Model):
A host of the network.
A host of the network.
"""
"""
hostname
=
models
.
CharField
(
max_length
=
40
,
unique
=
True
,
hostname
=
models
.
CharField
(
max_length
=
40
,
verbose_name
=
_
(
'hostname'
),
verbose_name
=
_
(
'hostname'
),
help_text
=
_
(
'The alphanumeric hostname of '
help_text
=
_
(
'The alphanumeric hostname of '
'the host, the first part of '
'the host, the first part of '
...
@@ -422,6 +422,9 @@ class Host(models.Model):
...
@@ -422,6 +422,9 @@ class Host(models.Model):
modified_at
=
models
.
DateTimeField
(
auto_now
=
True
,
modified_at
=
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
_
(
'modified at'
))
verbose_name
=
_
(
'modified at'
))
class
Meta
(
object
):
unique_together
=
(
'hostname'
,
'vlan'
)
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
self
.
hostname
return
self
.
hostname
...
...
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