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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
5b3fa5ab
authored
Jan 08, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unicode love
parent
0920478b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
firewall/models.py
+3
-3
No files found.
firewall/models.py
View file @
5b3fa5ab
...
@@ -41,19 +41,19 @@ class Rule(models.Model):
...
@@ -41,19 +41,19 @@ class Rule(models.Model):
color_desc
.
allow_tags
=
True
color_desc
.
allow_tags
=
True
def
desc
(
self
):
def
desc
(
self
):
para
=
""
para
=
u
""
if
(
self
.
dport
):
if
(
self
.
dport
):
para
=
"dport=
%
s
%
s"
%
(
self
.
dport
,
para
)
para
=
"dport=
%
s
%
s"
%
(
self
.
dport
,
para
)
if
(
self
.
sport
):
if
(
self
.
sport
):
para
=
"sport=
%
s
%
s"
%
(
self
.
sport
,
para
)
para
=
"sport=
%
s
%
s"
%
(
self
.
sport
,
para
)
if
(
self
.
proto
):
if
(
self
.
proto
):
para
=
"proto=
%
s
%
s"
%
(
self
.
proto
,
para
)
para
=
"proto=
%
s
%
s"
%
(
self
.
proto
,
para
)
return
'['
+
self
.
r_type
+
'] '
+
(
self
.
vlan_l
()
+
' ▸ '
+
self
.
r_type
if
self
.
direction
==
'1'
else
self
.
r_type
+
' ▸ '
+
self
.
vlan_l
())
+
' '
+
para
+
' '
+
self
.
description
return
u'['
+
self
.
r_type
+
u'] '
+
(
self
.
vlan_l
()
+
u' ▸ '
+
self
.
r_type
if
self
.
direction
==
'1'
else
self
.
r_type
+
u' ▸ '
+
self
.
vlan_l
())
+
u' '
+
para
+
u
' '
+
self
.
description
def
vlan_l
(
self
):
def
vlan_l
(
self
):
retval
=
[]
retval
=
[]
for
vl
in
self
.
vlan
.
all
():
for
vl
in
self
.
vlan
.
all
():
retval
.
append
(
vl
.
name
)
retval
.
append
(
vl
.
name
)
return
', '
.
join
(
retval
)
return
u
', '
.
join
(
retval
)
class
Vlan
(
models
.
Model
):
class
Vlan
(
models
.
Model
):
vid
=
models
.
IntegerField
(
unique
=
True
)
vid
=
models
.
IntegerField
(
unique
=
True
)
...
...
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