mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Updated doc, rename_app, added throttles
This commit is contained in:
@@ -114,6 +114,15 @@ Specific instructions
|
||||
The ``modoboa-dmarc``, ``modoboa-pdfcredentials`` and ``modoboa-imapmigration``
|
||||
plugins have been merged into the core.
|
||||
|
||||
Add ``'django_rename_app,'`` To ``INSTALLED_APPS``:
|
||||
|
||||
.. sourcecode:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
...,
|
||||
'django_rename_app',
|
||||
)
|
||||
|
||||
Add ``'modoboa.dmarc'``, ``'modoboa.pdfcredentials'`` and ``'modoboa.imap_migration'``
|
||||
to ``MODOBOA_APPS``:
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ INSTALLED_APPS = (
|
||||
'django_otp',
|
||||
'django_otp.plugins.otp_totp',
|
||||
'django_otp.plugins.otp_static',
|
||||
'django_rename_app',
|
||||
{% if devmode %} 'djangobower',{% endif %}
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 3.2.17 on 2023-04-18 12:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dmarc', '0004_auto_20220926_0913'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='record',
|
||||
name='id',
|
||||
field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='report',
|
||||
name='id',
|
||||
field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='reporter',
|
||||
name='id',
|
||||
field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='result',
|
||||
name='id',
|
||||
field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
]
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
from rest_framework import filters, mixins, permissions, viewsets
|
||||
|
||||
from ... import models
|
||||
from modoboa.lib.throttle import GetThrottleViewsetMixin
|
||||
|
||||
from ... import models
|
||||
from . import serializers
|
||||
|
||||
|
||||
class EmailProviderViewSet(viewsets.ModelViewSet):
|
||||
class EmailProviderViewSet(GetThrottleViewsetMixin, viewsets.ModelViewSet):
|
||||
"""ViewSet class for EmailProvider."""
|
||||
|
||||
filter_backends = (filters.SearchFilter, )
|
||||
@@ -20,7 +21,8 @@ class EmailProviderViewSet(viewsets.ModelViewSet):
|
||||
serializer_class = serializers.EmailProviderSerializer
|
||||
|
||||
|
||||
class MigrationViewSet(mixins.ListModelMixin,
|
||||
class MigrationViewSet(GetThrottleViewsetMixin,
|
||||
mixins.ListModelMixin,
|
||||
mixins.RetrieveModelMixin,
|
||||
mixins.DestroyModelMixin,
|
||||
viewsets.GenericViewSet):
|
||||
|
||||
@@ -5,6 +5,7 @@ django-reversion==5.0.4
|
||||
django-xforwardedfor-middleware==2.0
|
||||
django-otp==1.1.6
|
||||
django-filter
|
||||
django-rename-app
|
||||
|
||||
dj-database-url
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ INSTALLED_APPS = (
|
||||
'django_otp',
|
||||
'django_otp.plugins.otp_totp',
|
||||
'django_otp.plugins.otp_static',
|
||||
'django_rename_app',
|
||||
)
|
||||
|
||||
# A dedicated place to register Modoboa applications
|
||||
|
||||
Reference in New Issue
Block a user