Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request clase #41

Open
wants to merge 51 commits into
base: fix-countdown
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0984e82
Merge pull request #29 from Garinoth/fix-countdown
Garinoth Dec 14, 2013
1d31ab8
Add point recharge functionality (and add time to auction when bidding)
Garinoth Dec 14, 2013
d415c1d
Added help page (v1)
Inmakia Dec 14, 2013
1ea29a9
Merge pull request #30 from Garinoth/recharge
Garinoth Dec 14, 2013
d164ca8
Merge pull request #31 from Garinoth/ft/frontend-v2
Garinoth Dec 14, 2013
6d30e63
Add help url and view
Garinoth Dec 14, 2013
30fcabe
Remove subastas tag from the urls
Garinoth Dec 14, 2013
e0c4538
Fix activation url to match heroku
Garinoth Dec 14, 2013
4781759
Added points in base template and help link
Inmakia Dec 16, 2013
e528f97
Add basic search functionality (needs polish and finishing)
Garinoth Dec 16, 2013
2559793
Added some minor changes to the stylesheet and recharge first version…
Inmakia Dec 16, 2013
fa92d77
Merge branch 'ft/frontend-v2' into search
Garinoth Dec 16, 2013
f6bceef
Fix some details from merge to prepare for next stage
Garinoth Dec 16, 2013
9857310
Merge pull request #33 from Garinoth/search
Garinoth Dec 16, 2013
8628b25
Completed recharge template
Inmakia Dec 16, 2013
868a8a8
Search result page
Garinoth Dec 16, 2013
8225ed0
Add templates
Garinoth Dec 17, 2013
6d4cb2f
Merge branch 'develop' of github.com:Garinoth/subastasIS2 into ft/fro…
Garinoth Dec 17, 2013
8485533
Add succes template
Garinoth Dec 17, 2013
6948f85
Add redirection to success page
Garinoth Dec 17, 2013
f5218e1
Merge conflicts
Garinoth Dec 17, 2013
488ca4f
Fix
Garinoth Dec 17, 2013
b0009a4
Error messages for finished aution and offer or sold item and search …
Inmakia Dec 17, 2013
218df31
Merge pull request #34 from Garinoth/ft/frontend-v2
Inmakia Dec 17, 2013
d0a189a
Fix pull conflicts
Garinoth Dec 17, 2013
7dbb4e6
Fix conflicts
Garinoth Dec 17, 2013
d6bc353
Added auction and offer messages
Inmakia Dec 17, 2013
abf3cb1
Merge pull request #35 from Garinoth/ft/frontend-v2
Inmakia Dec 17, 2013
d136898
Add succesful polling version on auctions
Garinoth Dec 18, 2013
a35efc6
Fixed some style issues
Inmakia Dec 18, 2013
1b62858
Merge pull request #36 from Garinoth/ft/frontend-v2
Inmakia Dec 18, 2013
c384cab
Try to fix offers first version
Garinoth Dec 18, 2013
bfc66b2
Profile unfinished template done
Inmakia Dec 18, 2013
bda0873
Finish merge and offer polling
Garinoth Dec 18, 2013
1403f0c
Merge pull request #37 from Garinoth/ft/frontend-v2
Inmakia Dec 18, 2013
ae3ebe1
Merge branch 'develop' into polling
Garinoth Dec 18, 2013
b709a45
Merge pull request #38 from Garinoth/polling
Garinoth Dec 18, 2013
085f97d
Add user profiles
Garinoth Dec 18, 2013
ded0b6b
Update forms (specially existing user error)
Garinoth Dec 18, 2013
1d729cf
Fix import
Garinoth Dec 18, 2013
00bdb75
Profile and edit profile templates added
Inmakia Dec 18, 2013
d29ce20
New image added por profiles withouth photo
Inmakia Dec 18, 2013
36c8501
Fix form
Garinoth Dec 18, 2013
bf7bcc1
Merge branch 'profiles' of github.com:Garinoth/subastasIS2 into profiles
Garinoth Dec 18, 2013
ea1a1d0
Fix some minor bugs
Garinoth Dec 19, 2013
14ad9f6
BUg fixing in profiles
Inmakia Dec 19, 2013
3fba80a
Fix initial form values
Garinoth Dec 19, 2013
04a0415
Added correct styles to the user profiles
Inmakia Dec 19, 2013
1eba920
Add links to profiles
Garinoth Dec 19, 2013
a86939a
Added notification pop-ups
Inmakia Dec 19, 2013
fc9fba3
Merge pull request #39 from Garinoth/profiles
Garinoth Dec 19, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add user profiles
  • Loading branch information
Garinoth committed Dec 18, 2013
commit 085f97d1ed8a1e0aa5fb7f905dbbc1a288165719
7 changes: 7 additions & 0 deletions subastasIS2_django/subastas/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,10 @@ def clean(self):
)

return self.cleaned_data


class UpdateAuctionUserForm(ModelForm):
class Meta:
model = AuctionUser
fields = ['description',
'interests']
3 changes: 3 additions & 0 deletions subastasIS2_django/subastas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class AuctionUser(models.Model):
offer_points = models.PositiveIntegerField(default=0)
image = models.ImageField(upload_to='profiles/', default='items/noDisponible.jpg', blank=True)

description = models.TextField(blank=True)
interests = models.TextField(blank=True)

activation_key = models.CharField(max_length=40, blank=True)

def __unicode__(self):
Expand Down
1 change: 1 addition & 0 deletions subastasIS2_django/subastas/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
url(r'^auctions/(?P<pk>\d+)/$', views.auction, name='auction_detail'),
url(r'^offers/$', login_required(views.ListOffersView.as_view()), name='offers'),
url(r'^offers/(?P<pk>\d+)/$', views.offer, name='offer_detail'),
url(r'^users/(?P<pk>\d+)/$', views.user, name='profile'),
url(r'^recharge/$', views.recharge, name='recharge'),
url(r'^success/$', views.success, name='success'),
url(r'^poll_auction/$', views.poll_auction, name='poll_auction'),
Expand Down
32 changes: 32 additions & 0 deletions subastasIS2_django/subastas/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,38 @@ def offer(request, pk):
return render(request, 'subastas/offer_detail.html', ctx)


@login_required
def user(request, pk):
auction_user = AuctionUser.objects.get(pk=pk)

if request.method == 'POST':
edit_form = SaleForm(request.POST, user=request.user)
if edit_form.is_valid():
return HttpResponseRedirect(reverse('index'))

else:
edit_form = UpdateAuctionUserForm()

bids = Bid.objects.filter(user=auction_user)
auctions_bid = []
for b in bids:
if not b.auction in auctions_bid:
auctions_bid.append(b.auction)

auctions_won = Auction.objects.filter(winner=auction_user)
offers_won = Offer.objects.filter(winner=auction_user)

ctx = {
'auction_user': auction_user,
'edit_form': edit_form,
'auctions_bid': auctions_bid,
'auctions_won': auctions_won,
'offers_won': offers_won,
}

return render(request, 'subastas/profile.html', ctx)


@login_required
def recharge(request):
if request.method == 'POST':
Expand Down