Commit ca70d86f authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added accidentally removed Seller

parent feba49ff
......@@ -3,6 +3,28 @@ from django.conf import settings
from model_utils.models import TimeStampedModel
from django.core.validators import RegexValidator
class Seller( models.Model ):
user = models.OneToOneField(User)
# name = models.CharField(max_length = 200, primary_key=True)
# username = models.CharField(max_length = 200)
# email = models.CharField(max_length = 200)
rating = models.IntegerField(null=True,default=0)
# object call
def __unicode__(self):
return '%s' % self.user
def get_absolute_url(self):
from django.core.urlresolvers import reverse
return reverse('profile', args=[self.user.username])
def create_user_profile(sender, instance, created, **kwargs):
if created:
post_save.connect(create_user_profile, sender=User)
# Create your models here.
class Course(TimeStampedModel):
name = models.CharField(max_length=255)
......@@ -4,7 +4,7 @@ from trades.forms import ListingForm, FinalPriceForm, CloseForm, BidForm
from lookouts.models import Lookout
from lookouts.forms import LookoutForm, DeleteLookoutForm
# where is seller???
from core.models import Seller
from django.views.generic import DetailView, ListView, CreateView, UpdateView, DeleteView
from braces.views import LoginRequiredMixin
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