Add gitlab ci settings
This commit is contained in:
parent
a798b9858c
commit
88cf5f9bd4
14 changed files with 61 additions and 34 deletions
|
|
@ -10,6 +10,6 @@ EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
|||
INSTALLED_APPS += ["debug_toolbar", "django_extensions"]
|
||||
|
||||
try:
|
||||
pass
|
||||
from .local import * # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
|||
15
src/newsreader/conf/gitlab.py
Normal file
15
src/newsreader/conf/gitlab.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from .base import * # noqa
|
||||
|
||||
|
||||
DEBUG = True
|
||||
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||
"NAME": "newsreader",
|
||||
"USER": "newsreader",
|
||||
"HOST": "postgres",
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
# Generated by Django 2.2 on 2019-07-05 20:59
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
from typing import ContextManager
|
||||
|
||||
from requests.exceptions import ConnectionError as RequestConnectionError
|
||||
from requests.exceptions import (
|
||||
HTTPError,
|
||||
RequestException,
|
||||
SSLError,
|
||||
TooManyRedirects,
|
||||
)
|
||||
|
||||
from newsreader.news.collection.exceptions import (
|
||||
StreamConnectionError,
|
||||
|
|
|
|||
|
|
@ -23,12 +23,7 @@ from newsreader.news.collection.utils import build_publication_date
|
|||
from newsreader.news.core.models import Post
|
||||
from newsreader.news.core.tests.factories import PostFactory
|
||||
|
||||
from .mocks import (
|
||||
duplicate_mock,
|
||||
empty_mock,
|
||||
multiple_mock,
|
||||
multiple_update_mock,
|
||||
)
|
||||
from .mocks import duplicate_mock, empty_mock, multiple_mock, multiple_update_mock
|
||||
|
||||
|
||||
class FeedCollectorTestCase(TestCase):
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@ from unittest.mock import MagicMock, patch
|
|||
from django.test import TestCase
|
||||
|
||||
from requests.exceptions import ConnectionError as RequestConnectionError
|
||||
from requests.exceptions import (
|
||||
HTTPError,
|
||||
RequestException,
|
||||
SSLError,
|
||||
TooManyRedirects,
|
||||
)
|
||||
from requests.exceptions import HTTPError, RequestException, SSLError, TooManyRedirects
|
||||
|
||||
from newsreader.news.collection.exceptions import (
|
||||
StreamConnectionError,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
from django.urls import path
|
||||
|
||||
from newsreader.news.collection.views import (
|
||||
CollectionRuleAPIListView,
|
||||
CollectionRuleDetailView,
|
||||
)
|
||||
from newsreader.news.collection.views import CollectionRuleAPIListView, CollectionRuleDetailView
|
||||
|
||||
|
||||
endpoints = [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
from rest_framework.generics import (
|
||||
ListCreateAPIView,
|
||||
RetrieveUpdateDestroyAPIView,
|
||||
)
|
||||
from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView
|
||||
|
||||
from newsreader.core.pagination import ResultSetPagination
|
||||
from newsreader.news.collection.models import CollectionRule
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
# Generated by Django 2.2 on 2019-07-05 20:59
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ from rest_framework.generics import (
|
|||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
from newsreader.auth.permissions import IsPostOwner
|
||||
from newsreader.core.pagination import (
|
||||
LargeResultSetPagination,
|
||||
ResultSetPagination,
|
||||
)
|
||||
from newsreader.core.pagination import LargeResultSetPagination, ResultSetPagination
|
||||
from newsreader.news.core.models import Category, Post
|
||||
from newsreader.news.core.serializers import CategorySerializer, PostSerializer
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue