Browse Source

style(projet): make lint

master
François Poulain 4 years ago committed by François Poulain
parent
commit
09a16f5af2
  1. 2
      Makefile
  2. 3
      weo/admin.py
  3. 3
      weo/tests.py
  4. 3
      weo/views.py
  5. 3
      wss/admin.py
  6. 8
      wss/mixins.py
  7. 8
      wss/models.py
  8. 3
      wss/tests.py
  9. 3
      wss/views.py

2
Makefile

@ -101,4 +101,4 @@ serve: ### démarre un serveur local pour l'application @@ -101,4 +101,4 @@ serve: ### démarre un serveur local pour l'application
$(PYTHON) manage.py runserver
lint: ### vérifie la syntaxe et le code python
flake8 test-wagtail
$(VENV_DIR)/bin/flake8 test-wagtail wss weo

3
weo/admin.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.contrib import admin
# Register your models here.

3
weo/tests.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

3
weo/views.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.

3
wss/admin.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.contrib import admin
# Register your models here.

8
wss/mixins.py

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
class HomePage:
parent_page_types = ['wagtailcore.Page']
@classmethod
def can_create_at(cls, parent):
# Seulement une instance possible
return super().can_create_at(parent) and not cls.objects.exists()

8
wss/models.py

@ -1,14 +1,12 @@ @@ -1,14 +1,12 @@
from django.db import models
from wagtail.core.models import Page
from wagtail.core.fields import RichTextField, StreamField
from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, StreamFieldPanel
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
from wagtail.images.edit_handlers import ImageChooserPanel
#from wagtail.contrib.settings.models import BaseSetting, register_setting
# from wagtail.contrib.settings.models import BaseSetting, register_setting
from wss import mixins
import weo.models
class SitePage(Page):
class Meta:

3
wss/tests.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

3
wss/views.py

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.
Loading…
Cancel
Save
Map all the world