-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
192 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
from google.appengine.ext import ndb | ||
import datetime | ||
|
||
|
||
class TimeOrderMixin(ndb.Model): | ||
|
||
""" | ||
The TimeOrderMixin defines entities that have a creation time. | ||
""" | ||
|
||
posted_at = ndb.DateTimeProperty(auto_now_add=True) | ||
posted_at = ndb.DateTimeProperty() | ||
|
||
@property | ||
def old(self): | ||
horizon = datetime.datetime.now() - self.MARK_AS_OLD_AFTER | ||
return (self.posted_at <= horizon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
body | ||
body:body | ||
body:of | ||
body:☆a | ||
cars | ||
category:cars | ||
listing | ||
of | ||
seller-a@uchicago.edu | ||
seller:seller-a@uchicago.edu | ||
title:listing | ||
title:☆a | ||
☆a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
New Listing | ||
Listing ☆A | ||
cars | ||
Posted 9w ago . | ||
Price: $3.10 | ||
" Listing ☆A " was posted more than 30 days ago, | ||
so it does not show up in searches, and will not receive inquiries. | ||
It has likely already been sold. | ||
Body of ☆A | ||
Manage Listing | ||
Sign in with CNetID | ||
to edit. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
caravel/tests/test_listings_publish_listing_with_cnetid_expect.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
New Listing | ||
Logged in as | ||
seller-b@uchicago.edu | ||
My Listings | ||
Logout | ||
Listing ☆A | ||
cars | ||
Posted 5h ago . | ||
Price: $3.10 | ||
Validated by GOOGLE_APPS. Originally posted by | ||
1.2.3.4 with | ||
mozilla. | ||
Body of ☆A | ||
Contact Seller | ||
From | ||
seller-b@uchicago.edu ( Logout ) | ||
Message | ||
--- | ||
New Listing | ||
Logged in as | ||
seller-b@uchicago.edu | ||
My Listings | ||
Logout | ||
Listing ☆A | ||
$3.10 | ||
cars | ||
5h ago | ||
Listing ☆B | ||
$71.10 | ||
apartments | ||
2d ago | ||
--- | ||
New Listing | ||
Logged in as | ||
seller-b@uchicago.edu | ||
My Listings | ||
Logout | ||
Listing ☆A | ||
$3.10 | ||
cars | ||
5h ago | ||
Listing ☆B | ||
$71.10 | ||
apartments | ||
2d ago | ||
--- | ||
New Listing | ||
Logged in as | ||
seller-b@uchicago.edu | ||
My Listings | ||
Logout | ||
Listing ☆A | ||
cars | ||
Posted 5h ago . | ||
Price: $3.10 | ||
Validated by GOOGLE_APPS. Originally posted by | ||
1.2.3.4 with | ||
mozilla. | ||
Body of ☆A | ||
Contact Seller | ||
From | ||
seller-b@uchicago.edu ( Logout ) | ||
Message | ||
--- | ||
New Listing | ||
Logged in as | ||
seller-b@uchicago.edu | ||
My Listings | ||
Logout | ||
Listing ☆A | ||
$3.10 | ||
cars | ||
5h ago | ||
Listing ☆B | ||
$71.10 | ||
apartments | ||
2d ago |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.