Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
campaign
Commits
9b0d730d
Commit
9b0d730d
authored
Jan 30, 2017
by
okhin
Browse files
Adding a descriptive block for organisations
parent
275751e3
Pipeline
#817
failed with stages
in 3 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
picampaign/feedback/migrations/0002_feedback_date.py
0 → 100644
View file @
9b0d730d
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-25 17:25
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'feedback'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'feedback'
,
name
=
'date'
,
field
=
models
.
DateTimeField
(
auto_now_add
=
True
,
default
=
django
.
utils
.
timezone
.
now
),
preserve_default
=
False
,
),
]
picampaign/organization/migrations/0004_auto_20170130_1125.py
0 → 100644
View file @
9b0d730d
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-30 10:25
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'organization'
,
'0003_auto_20160807_1603'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'organization'
,
name
=
'description'
,
field
=
models
.
TextField
(
blank
=
True
),
),
migrations
.
AddField
(
model_name
=
'organization'
,
name
=
'description_de'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'organization'
,
name
=
'description_en'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'organization'
,
name
=
'description_fr'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'organization'
,
name
=
'logo'
,
field
=
models
.
ImageField
(
blank
=
True
,
upload_to
=
'organization/logos/'
),
),
]
picampaign/organization/models.py
View file @
9b0d730d
...
...
@@ -9,6 +9,8 @@ class Organization(models.Model):
sip_key
=
models
.
CharField
(
max_length
=
255
)
users
=
models
.
ManyToManyField
(
User
,
blank
=
True
,
related_name
=
'organizations'
)
description
=
models
.
TextField
(
blank
=
True
)
logo
=
models
.
ImageField
(
upload_to
=
'organization/logos/'
,
blank
=
True
)
def
__str__
(
self
):
return
self
.
name
...
...
picampaign/organization/translation.py
0 → 100644
View file @
9b0d730d
from
modeltranslation.translator
import
translator
,
TranslationOptions
from
picampaign.organization.models
import
Organization
class
OrganizationTranslationOptions
(
TranslationOptions
):
fields
=
(
'description'
,)
translator
.
register
(
Organization
,
OrganizationTranslationOptions
)
Write
Preview
Supports
Markdown
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