Commit 9450b0f4 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Make code more PEP8

parent baab2415
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from api import views
from django.conf.urls import include
from .views.RecipeList import RecipeList
from .views.RecipeById import RecipeById
from .views.RecipeBySlug import RecipeBySlug
from .views.Categories import Categories
urlpatterns = [
url(r'^$', views.RecipeList.as_view()),
url(r'^recipe/by-id/([0-9]+)$', views.RecipeById.as_view()),
url(r'^recipe/by-slug/([\w_]+)$', views.RecipeBySlug.as_view()),
url(r'^categories/', views.Categories.as_view()),
url(r'^$', RecipeList.as_view()),
url(r'^recipe/by-id/([0-9]+)$', RecipeById.as_view()),
url(r'^recipe/by-slug/([\w_]+)$', RecipeBySlug.as_view()),
url(r'^categories/', Categories.as_view()),
url(r'^auth/', include('rest_framework.urls',
namespace='rest_framework')),
]
......
from .RecipeBySlug import RecipeBySlug
from .RecipeById import RecipeById
from .RecipeList import RecipeList
from .Categories import Categories
......@@ -3,7 +3,10 @@ from django.utils.translation import ugettext as _
from django.utils.translation import pgettext
from django.views.generic.base import RedirectView
from .views import IndexView, RecipesView, RecipesChangeView, RecipeView
from .views.IndexView import IndexView
from .views.RecipesView import RecipesView
from .views.RecipesChangeView import RecipesChangeView
from .views.RecipeView import RecipeView
favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True)
......
from .IndexView import IndexView
from .RecipesView import RecipesView
from .RecipesChangeView import RecipesChangeView
from .RecipeView import RecipeView
from .MainConfig import MainConfig
\ No newline at end of file
from .CommentForm import CommentForm, CommentFormAuthenticated
from .LoginForm import LoginForm
\ No newline at end of file
......@@ -3,7 +3,10 @@ from django.utils.translation import ugettext as _
from django.utils.translation import pgettext
from django.views.generic.base import RedirectView
from .views import IndexView, RecipeView, LoginView, LogoutView
from .views.IndexView import IndexView
from .views.RecipeView import RecipeView
from .views.LoginView import LoginView
from .views.LogoutView import LogoutView
favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True)
......
from main.models.Category import Category
from website.config import MainConfig
from website.config.MainConfig import MainConfig
class GenericView:
......
......@@ -2,7 +2,7 @@ from django.views.generic import FormView
from django.shortcuts import render, redirect
from django.contrib.auth import login
from pywebcooking.settings import SITE_NAME
from website.forms import LoginForm
from website.forms.LoginForm import LoginForm
class LoginView(FormView):
......
......@@ -6,7 +6,8 @@ from django.shortcuts import redirect
from django.contrib.auth.models import User
from django_gravatar.helpers import get_gravatar_url
from website.forms import CommentForm, CommentFormAuthenticated
from website.forms.CommentForm import CommentForm
from website.forms.CommentForm import CommentFormAuthenticated
from main.controllers.C_Recipe import CRecipe
from main.controllers.C_Comment import CComment
......
from .IndexView import IndexView
from .RecipeView import RecipeView
from .GenericView import GenericView
from .LoginView import LoginView
from .LogoutView import LogoutView
\ No newline at end of file
Markdown is supported
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