Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
campaign
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
Incidents
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
La Quadrature du Net
piphone
campaign
Commits
9e745f6b
Commit
9e745f6b
authored
Nov 21, 2014
by
Aymeric Barantal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
define some blank fields, and report correct entity name
parent
643e8d08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
campaign/campaign/models.py
campaign/campaign/models.py
+14
-5
campaign/organization/models.py
campaign/organization/models.py
+4
-1
No files found.
campaign/campaign/models.py
View file @
9e745f6b
...
...
@@ -8,8 +8,11 @@ class Contact(models.Model):
first_name
=
models
.
CharField
(
max_length
=
64
)
last_name
=
models
.
CharField
(
max_length
=
64
)
phone
=
models
.
CharField
(
max_length
=
32
)
twitter
=
models
.
CharField
(
max_length
=
64
)
mail
=
models
.
CharField
(
max_length
=
255
)
twitter
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
)
mail
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
)
def
__unicode__
(
self
):
return
'%s %s'
%
(
self
.
first_name
,
self
.
last_name
)
class
Group
(
models
.
Model
):
...
...
@@ -17,20 +20,26 @@ class Group(models.Model):
id
=
models
.
AutoField
(
primary_key
=
True
)
organisation_id
=
models
.
ForeignKey
(
Organization
)
name
=
models
.
CharField
(
max_length
=
64
)
type
=
models
.
CharField
(
max_length
=
255
)
media
=
models
.
CharField
(
max_length
=
255
)
type
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
)
media
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
)
contacts
=
models
.
ManyToManyField
(
Contact
)
def
__unicode__
(
self
):
return
self
.
name
class
Campaign
(
models
.
Model
):
"""Campaign model, describe what have to be achieved"""
id
=
models
.
AutoField
(
primary_key
=
True
)
title
=
models
.
CharField
(
max_length
=
255
)
description
=
models
.
CharField
(
max_length
=
512
)
description
=
models
.
CharField
(
max_length
=
512
,
blank
=
True
)
start_date
=
models
.
DateTimeField
()
end_date
=
models
.
DateTimeField
()
default_lang
=
models
.
CharField
(
max_length
=
5
)
def
__unicode__
(
self
):
return
self
.
title
class
Argumentary
(
models
.
Model
):
id
=
models
.
AutoField
(
primary_key
=
True
)
...
...
campaign/organization/models.py
View file @
9e745f6b
...
...
@@ -6,4 +6,7 @@ class Organization(models.Model):
id
=
models
.
AutoField
(
primary_key
=
True
)
name
=
models
.
CharField
(
max_length
=
64
)
sip_key
=
models
.
CharField
(
max_length
=
255
)
users
=
models
.
ForeignKey
(
User
)
users
=
models
.
ForeignKey
(
User
,
blank
=
True
)
def
__unicode__
(
self
):
return
self
.
name
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