CS125 Honors Project Illini TIX Austin Kramer Peter Kowalczyk Rohan Kapoor Jay Bensal
Mar 31, 2015
CS125 Honors ProjectIllini TIX
Austin KramerPeter KowalczykRohan KapoorJay Bensal
Right NowCurrently, many student tickets for sale via Facebook.
Market is defined; other students only.
Lots of hit and miss. Inefficient way to meet sellers/buyers of tickets on Facebook.
Right Now ( cont.)Tickets are often sold in a matter of
minutes.No way to organize posts by game,
cost, location, etc.Problem of coordinating in real-time.Requires a lot of work on user’s part.
◦e.g. commenting on multiple posts.
Goals & Accomplishments
- Change how tickets are sold by students on campus!- Learn web development, Django
- Took a strong first step- Gained some experience
How We Built itLanguages- Python, JavaScript, HTML, CSS
Web Framework - Django (uses Python)
CSS Library- Bootstrap from Twitter
Code: Django Modelsclass Ticket(models.Model):"""A ticket that students can exchange."""event = models.ForeignKey(Event)available = models.BooleanField()seat_location = models.CharField(max_length=20)sell_location = models.CharField(max_length=40)price = models.IntegerField()seller = models.ForeignKey(User, related_name='+', null=True)buyer = models.ForeignKey(User, related_name='+', null=True)creation_time = models.DateTimeField()
Code: Views@login_requireddef ticket_add(request): if request.method == 'POST': form = tix.forms.TicketForm(request.POST) if form.is_valid(): t = tix.models.Ticket() t.available = True t.seat_location = form.cleaned_data['seat_location'] t.price = form.cleaned_data['price'] t.sell_location = form.cleaned_data['sell_location'] t.event = form.cleaned_data['event'] t.creation_time = datetime.datetime.now() t.seller = request.user t.save() return HttpResponseRedirect('/ticket/posted/')
Code: Availability Check{% for t in ticket_list %} {% if t.available %} <tr> <td>{{ t.seller.first_name }} {{ t.seller.last_name }}</td> <td>{{ t.seat_location }}</td> <td>{{ t.sell_location }}</td> <td><button class="btn btn-info" onclick="javascript:window.location.href='/ticket/buy/{{ t.id }}'">${{ t.price }}</button></td> </tr> {% endif %} {% endfor %}
Code: Email if form.is_valid(): subject = form.cleaned_data['subject'] message = form.cleaned_data['message'] sender = form.cleaned_data['sender'] cc_myself = form.cleaned_data['cc_myself'] recipients = ['[email protected]'] if cc_myself: recipients.append(sender) send_mail(subject, message, sender, recipients) return HttpResponseRedirect('/thanks/')
Complications- Git commits, pulls, and merges- Constant updates to the Database- Deployment to Web Server- Unclear idea of vision for Android App
What we learnt
- First project built for other people.
- GitHub and collaborative code editing
- Team workflow and managing dynamics
- Designing own user authentication system is painful
Future Plans- Keep the site live; iterative improvements- Redesigned Android App- Facebook Integration for log in- Text messaging integration- Different sorts on website e.g. seat
section- View tickets by selling location(on Google
Maps)