Style fixes

This commit is contained in:
Oliver Walters 2017-04-16 01:01:48 +10:00
parent 2e133b7744
commit 7e1fbf8a04
9 changed files with 4 additions and 28 deletions

View File

@ -1,13 +1,9 @@
from rest_framework.views import exception_handler
#class APIValidationError()
def api_exception_handler(exc, context):
response = exception_handler(exc, context)
#print(response)
# Now add the HTTP status code to the response.
if response is not None:

View File

@ -187,20 +187,3 @@ class PartParameter(models.Model):
class Meta:
verbose_name = "Part Parameter"
verbose_name_plural = "Part Parameters"
class PartRevision(models.Model):
""" A PartRevision represents a change-notification to a Part
A Part may go through several revisions in its lifetime,
which should be tracked.
UniqueParts can have a single associated PartRevision
"""
part = models.ForeignKey(Part, on_delete=models.CASCADE)
name = models.CharField(max_length=100)
description = models.CharField(max_length=500)
revision_date = models.DateField(auto_now_add=True)
def __str__(self):
return self.name

View File

@ -1,4 +1,4 @@
from django.conf.urls import url, include
from django.conf.urls import url
from . import views

View File

@ -1,4 +1,3 @@
import django_filters
from django_filters.rest_framework import FilterSet, DjangoFilterBackend
from django_filters import NumberFilter

View File

@ -1,4 +1,4 @@
from django.conf.urls import url, include
from django.conf.urls import url
from . import views

View File

@ -1,4 +1,3 @@
import django_filters
from django_filters.rest_framework import FilterSet, DjangoFilterBackend
from django_filters import NumberFilter

View File

@ -5,7 +5,7 @@ from django.db import models
# from django.contrib.auth.models import User
from supplier.models import Customer
from part.models import Part, PartRevision
from part.models import Part
class UniquePartManager(models.Manager):

View File

@ -1,4 +1,4 @@
from django.conf.urls import url, include
from django.conf.urls import url
from . import views

View File

@ -1,4 +1,3 @@
import django_filters
from django_filters.rest_framework import FilterSet, DjangoFilterBackend
from django_filters import NumberFilter