Commit 1617e0e9 authored by Elias Sagmo Larsen's avatar Elias Sagmo Larsen
Browse files

pylint/models_TooLongLines

parent dcbea426
Pipeline #127913 passed with stage
in 35 seconds
"""Module for registering facilities from facility app to admin page so that they appear
"""
from django.contrib import admin
from .models import Facility
# Register your models here.
from .models import Facility
admin.site.register(Facility)
......@@ -10,4 +10,5 @@ class FacilitiesConfig(AppConfig):
name (str): The name of the application
"""
name = "facilities"
\ No newline at end of file
name = "facilities"
\ No newline at end of file
......@@ -44,10 +44,16 @@ class Facility(models.Model):
description = models.TextField(validators=[max_words])
latitude = models.DecimalField(
decimal_places=5, max_digits=7, validators=[MaxValueValidator(90), MinValueValidator(-90)])
decimal_places=5,
max_digits=7,
validators=[MaxValueValidator(90), MinValueValidator(-90)]
)
longitude = models.DecimalField(
decimal_places=5, max_digits=8, validators=[MaxValueValidator(180), MinValueValidator(-180)])
decimal_places=5,
max_digits=8,
validators=[MaxValueValidator(180), MinValueValidator(-180)]
)
image1 = models.CharField(max_length=2048)
image2 = models.CharField(max_length=2048, blank=True)
......@@ -60,4 +66,4 @@ class Facility(models.Model):
ordering = ["-date"]
def __str__(self):
return self.name
\ No newline at end of file
return self.name
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment