Bump version, cleanup
This commit is contained in:
parent
d88f61b281
commit
6978bbd03e
@ -1,19 +1,22 @@
|
|||||||
# Generated by Django 3.0.6 on 2020-05-07 21:23
|
# Generated by Django 3.0.6 on 2020-05-07 21:23
|
||||||
|
|
||||||
import core.models
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import core.models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('core', '0005_service_ignored_ips'),
|
("core", "0005_service_ignored_ips"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='service',
|
model_name="service",
|
||||||
name='hide_referrer_regex',
|
name="hide_referrer_regex",
|
||||||
field=models.TextField(blank=True, default='', validators=[core.models._validate_regex]),
|
field=models.TextField(
|
||||||
|
blank=True, default="", validators=[core.models._validate_regex]
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -84,7 +84,7 @@ class Service(models.Model):
|
|||||||
|
|
||||||
def get_ignored_referrer_regex(self):
|
def get_ignored_referrer_regex(self):
|
||||||
if len(self.hide_referrer_regex.strip()) == 0:
|
if len(self.hide_referrer_regex.strip()) == 0:
|
||||||
return re.compile(r".^") # matches nothing
|
return re.compile(r".^") # matches nothing
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
return re.compile(self.hide_referrer_regex)
|
return re.compile(self.hide_referrer_regex)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
from django.conf import settings
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.messages.views import SuccessMessageMixin
|
from django.contrib.messages.views import SuccessMessageMixin
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.shortcuts import get_object_or_404, reverse
|
from django.shortcuts import get_object_or_404, reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.conf import settings
|
|
||||||
from django.views.generic import (
|
from django.views.generic import (
|
||||||
CreateView,
|
CreateView,
|
||||||
DeleteView,
|
DeleteView,
|
||||||
|
@ -14,7 +14,7 @@ import os
|
|||||||
from django.contrib.messages import constants as messages
|
from django.contrib.messages import constants as messages
|
||||||
|
|
||||||
# Increment on new releases
|
# Increment on new releases
|
||||||
VERSION = "v0.3.2"
|
VERSION = "v0.4.0"
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
Loading…
Reference in New Issue
Block a user