class AliasAdmin(admin.ModelAdmin):
- list_display = ['source', 'destination']
+ search_fields = ['source', 'destination']
+ list_display = ['source', 'destination', 'mode']
+ list_filter = ['mode']
admin.site.register(models.Alias, AliasAdmin)
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-04-05 09:43+0200\n"
-"PO-Revision-Date: 2019-04-05 09:43+0200\n"
+"POT-Creation-Date: 2019-04-05 11:31+0200\n"
+"PO-Revision-Date: 2019-04-05 11:31+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pl\n"
msgid "destination"
msgstr "cel"
+#: models.py:8
+msgid "mode"
+msgstr "tryb"
+
+#: models.py:9
+msgid "Forward everything"
+msgstr "Przekazuj wszystko"
+
#: models.py:10
+msgid "Do not forward e-mail marked as spam."
+msgstr "Nie przekazuj wiadomości oznaczonych jako spam."
+
+#: models.py:14
msgid "alias"
msgstr "alias"
-#: models.py:11
+#: models.py:15
msgid "aliases"
msgstr "aliasy"
--- /dev/null
+# Generated by Django 2.2 on 2019-04-05 09:33
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('emails', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='alias',
+ name='mode',
+ field=models.CharField(blank=True, choices=[('', 'Forward everything'), ('@FORWARD', 'Do not forward e-mail marked as spam.')], default='', max_length=255, verbose_name='mode'),
+ ),
+ ]
class Alias(models.Model):
source = models.EmailField(_('source'), db_index=True)
destination = models.EmailField(_('destination'))
+ mode = models.CharField(
+ _('mode'), max_length=255, default='', blank=True, choices=[
+ ('', _('Forward everything')),
+ ('@FORWARD', _('Do not forward e-mail marked as spam.'))
+ ])
class Meta:
verbose_name = _('alias')