Passed
Push — master ( bb84d7...84c267 )
by Swen
02:15
created

LocalizedModel

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 0 Features 0
Metric Value
c 6
b 0
f 0
dl 0
loc 11
ccs 3
cts 3
cp 1
1 1
from psqlextra.models import PostgresModel
0 ignored issues
show
Configuration introduced by
The import psqlextra.models could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
2
3 1
from .mixins import AtomicSlugRetryMixin
4
5
6 1
class LocalizedModel(AtomicSlugRetryMixin, PostgresModel):
7
    """Turns a model into a model that contains LocalizedField's.
8
9
    For basic localisation functionality, it isn't needed to inherit
10
    from LocalizedModel. However, for certain features, this is required.
11
12
    It is definitely needed for :see:LocalizedUniqueSlugField, unless you
13
    manually inherit from AtomicSlugRetryMixin."""
14
15 1
    class Meta:
16
        abstract = True
17