Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
1ac174f3
Verified
Commit
1ac174f3
authored
5 years ago
by
Tom Teichler
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 102-use-select2-everywhere
parents
1d419e94
ea1995c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!58
Resolve "Use Select2 everywhere"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
biscuit/core/anonymizers.py
+23
-0
23 additions, 0 deletions
biscuit/core/anonymizers.py
biscuit/core/settings.py
+3
-0
3 additions, 0 deletions
biscuit/core/settings.py
pyproject.toml
+1
-0
1 addition, 0 deletions
pyproject.toml
with
27 additions
and
0 deletions
biscuit/core/anonymizers.py
0 → 100644
+
23
−
0
View file @
1ac174f3
from
hattori.base
import
BaseAnonymizer
,
faker
from
.models
import
Person
class
PersonAnonymizer
(
BaseAnonymizer
):
model
=
Person
attributes
=
[
(
'
first_name
'
,
faker
.
first_name
),
(
'
last_name
'
,
faker
.
last_name
),
(
'
additional_name
'
,
''
),
(
'
short_name
'
,
lambda
**
kwargs
:
faker
.
pystr
(
min_chars
=
2
,
max_chars
=
4
,
**
kwargs
)),
(
'
street
'
,
faker
.
street_name
),
(
'
housenumber
'
,
faker
.
building_number
),
(
'
postal_code
'
,
faker
.
postalcode
),
(
'
place
'
,
faker
.
city
),
(
'
phone_number
'
,
faker
.
phone_number
),
(
'
mobile_number
'
,
''
),
(
'
email
'
,
faker
.
email
),
(
'
date_of_birth
'
,
lambda
**
kwargs
:
faker
.
date_of_birth
(
minimum_age
=
8
,
maximum_age
=
66
,
**
kwargs
)),
(
'
photo
'
,
''
)
]
This diff is collapsed.
Click to expand it.
biscuit/core/settings.py
+
3
−
0
View file @
1ac174f3
...
...
@@ -65,6 +65,7 @@ INSTALLED_APPS = [
'
debug_toolbar
'
,
'
contact_form
'
,
'
django_select2
'
,
'
hattori
'
,
'
biscuit.core
'
,
'
impersonate
'
,
]
...
...
@@ -314,4 +315,6 @@ CRON_CLASSES = [
'
biscuit.core.cronjobs.Backup
'
]
ANONYMIZE_ENABLED
=
_settings
.
get
(
'
maintenance.anonymisable
'
,
True
)
_settings
.
populate_obj
(
sys
.
modules
[
__name__
])
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
0
View file @
1ac174f3
...
...
@@ -46,6 +46,7 @@ django-impersonate = "^1.4"
python-memcached
=
"^1.59"
django-dbbackup
=
"^3.2"
django-cron
=
"^0.5.1"
django-hattori
=
"^0.2"
[tool.poetry.extras]
ldap
=
[
"django-auth-ldap"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment