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
a0a062be
Commit
a0a062be
authored
Aug 07, 2016
by
okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making migrations
parent
e20da055
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
picampaign/importer/models.py
picampaign/importer/models.py
+3
-1
No files found.
picampaign/importer/models.py
View file @
a0a062be
from
django.db
import
models
from
django.utils.translation
import
ugettext_lazy
as
_
from
picampaign.campaign.models
import
Campaign
class
Importer
(
models
.
Model
):
"""Importer model. Used to populate campaign with contacts"""
id
=
models
.
AutoField
(
primary_key
=
True
)
...
...
@@ -9,7 +11,7 @@ class Importer(models.Model):
data_format
=
models
.
CharField
(
max_length
=
4
,
choices
=
[(
'JSON'
,
'json'
),
(
'CSV'
,
'csv'
)])
file
=
models
.
FileField
(
upload_to
=
'imports/'
,
blank
=
True
,
null
=
True
)
url
=
models
.
URLField
(
blank
=
True
,
null
=
True
)
campaign
=
models
.
ForeignKey
(
'Campaign'
,
on_delete
=
models
.
SET_NULL
)
campaign
=
models
.
ForeignKey
(
Campaign
,
on_delete
=
models
.
SET_NULL
,
null
=
True
)
def
__str__
(
self
):
return
_
(
u
'%{name}: %{format} %{type} importer'
%
{
'format'
:
self
.
data_format
,
...
...
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