summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-12-31 14:27:29 -0500
committerluxagraf <sng@luxagraf.net>2016-12-31 14:27:29 -0500
commit940412cc4b934c8bc48e5cb7939afa681cc8be0a (patch)
tree7521a948ea26de956cf6fd7a9b3812582bde1058 /app
parent2370d5eb25362b5f382b0ea07c433dc176bab74e (diff)
added end date for auction
Diffstat (limited to 'app')
-rw-r--r--app/ebay/migrations/0004_trackeditem_date_ending.py21
-rw-r--r--app/ebay/models.py2
2 files changed, 23 insertions, 0 deletions
diff --git a/app/ebay/migrations/0004_trackeditem_date_ending.py b/app/ebay/migrations/0004_trackeditem_date_ending.py
new file mode 100644
index 0000000..15f41e7
--- /dev/null
+++ b/app/ebay/migrations/0004_trackeditem_date_ending.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9 on 2016-12-31 14:26
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('ebay', '0003_auto_20161231_1419'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='trackeditem',
+ name='date_ending',
+ field=models.DateTimeField(default=django.utils.timezone.now),
+ ),
+ ]
diff --git a/app/ebay/models.py b/app/ebay/models.py
index 4338197..38f8e1c 100644
--- a/app/ebay/models.py
+++ b/app/ebay/models.py
@@ -1,6 +1,7 @@
import datetime
import re
from django.contrib.gis.db import models
+from django.utils import timezone
from bs4 import BeautifulSoup
import requests
@@ -22,6 +23,7 @@ class Item(models.Model):
class TrackedItem(models.Model):
url = models.CharField(max_length=200)
title = models.CharField(max_length=200)
+ date_ending = models.DateTimeField(default=timezone.now)
def save(self, **kwargs):
super(TrackedItem, self).save()