Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #47 from alvarogtx300/develop
Browse files Browse the repository at this point in the history
Call for papers 2019
  • Loading branch information
alvarogtx300 authored Oct 29, 2018
2 parents 93f344c + 674fa04 commit 32c4e4f
Show file tree
Hide file tree
Showing 14 changed files with 235 additions and 76 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# IDE
.vscode/
.idea/
__pycache__

Expand All @@ -9,11 +10,11 @@ media/
*env/

# DB
db.sqlite3
db.sqlite3_CS
db.sqlite3*

# vars
settings_secret.py


*.pyc

.tags
14 changes: 7 additions & 7 deletions TryIT/settings_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# MY VARS
LANDING = False
READY_FOR_NEW_ED = True
EDITION_YEAR = 2018
TICKETS_SALE = True
PRIZES_ACTIVE = True
REGISTER_VOLUNTEERS = True
REGISTER_COMPANIES = False
LANDING = True
READY_FOR_NEW_ED = False
EDITION_YEAR = 2019
TICKETS_SALE = False
PRIZES_ACTIVE = False
REGISTER_VOLUNTEERS = False
REGISTER_COMPANIES = True

# Application definition
INSTALLED_APPS = (
Expand Down
8 changes: 3 additions & 5 deletions congress/templates/congress/activities.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ <h5 class="header col s12">Del {{ edition.start_date|date:"j" }} al {{ edition.e
</div>
<div class="col s12 m7 l7 waves-effect" href ng-click="openModal({{ session.id }})">
<p class="collections-title" style="margin-top: 0px; margin-bottom: 0px">
{% for company in session.companies.all %}
{% if company.sponsor_type %}
<i id="award" class="fa fa-gift grey-text award"></i>
{% endif %}
{% endfor %}
{% if session.prize_set.count > 0 %}
<i id="award" class="fa fa-gift grey-text award"></i>
{% endif %}
{{ session.title }}
</p>
<p class="collections-content secondary-text" style="margin-top: 0px; margin-bottom: 0px">
Expand Down
16 changes: 8 additions & 8 deletions congress/templates/congress/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@
</a>
<a href="#" data-activates="mobile" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
<li><a href="{% url 'congress:activities' %}">Programa</a></li>
<li><a href="{% url 'congress:workshops' %}">Talleres</a></li>
<li><a href="{% url 'congress:contests' %}">Sorteos</a></li>
{#<li><a href="{% url 'congress:activities' %}">Programa</a></li>#}
{#<li><a href="{% url 'congress:workshops' %}">Talleres</a></li>#}
{#<li><a href="{% url 'congress:contests' %}">Sorteos</a></li>#}
<li><a href="{% url 'congress:last-editions' %}">Ediciones anteriores</a></li>
{#<li><a href="{% url 'register:register' %}">Call for papers</a></li>#}
<li><a href="{% url 'register:register' %}">Call for papers</a></li>
<li><a href="{% url 'congress:contact' %}">Contacto</a></li>
</ul>
</div>
</div>
</nav>
</div>
<ul class="side-nav" id="mobile">
<li><a href="{% url 'congress:activities' %}">Programa</a></li>
<li><a href="{% url 'congress:workshops' %}">Talleres</a></li>
<li><a href="{% url 'congress:contests' %}">Sorteos</a></li>
{#<li><a href="{% url 'congress:activities' %}">Programa</a></li>#}
{#<li><a href="{% url 'congress:workshops' %}">Talleres</a></li>#}
{#<li><a href="{% url 'congress:contests' %}">Sorteos</a></li>#}
<li><a href="{% url 'congress:last-editions' %}">Ediciones anteriores</a></li>
{# <li><a href="{% url 'register:register' %}">Call for papers</a></li>#}
<li><a href="{% url 'register:register' %}">Call for papers</a></li>
<li><a href="{% url 'congress:contact' %}">Contacto</a></li>
</ul>
</header>
Expand Down
20 changes: 10 additions & 10 deletions congress/templates/congress/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center light-green-text">Try IT! 2018</h1>
<h1 class="header center light-green-text">Try IT! 2019</h1>
<div class="row center">
<h5 class="header col s12 ">Bienvenido a la sexta edición</h5>
<h5 class="header col s12">Del 19 al 22 de Marzo</h5>
<h5 class="header col s12 ">Bienvenido a la séptima edición</h5>
<h5 class="header col s12">Del 18 al 22 de Marzo</h5>
</div>
<div class="row center">
<a href="{% url 'tickets:tickets' %}" class="btn-large waves-effect waves-light btn light-green">Consigue tu entrada</a>
Expand Down Expand Up @@ -77,12 +77,12 @@ <h2 class="header light-green-text center-align">¿Qué ofrecemos esta edición?
</div>
</div>
</div>

<div class="parallax-container">
<div class="row container center-align" style="margin-top:140px;">
<h2 class="header light-green-text">Patrocinadores</h2>
<br>

</div>
<div class="parallax"><img src="{% static 'congress/img/parallax02.jpg' %}" alt="Background Parallax TryIt 2018"></div>
</div>
Expand All @@ -107,7 +107,7 @@ <h4 class="partner-title gold">
<div>
<a href="https://www.everis.com/">
<img src="{% static 'congress/img/partners/2018_oro_everis.png' %}" alt="Logo Everis - TryIt 2018">
</a>
</a>
</div>
</div>
<div class="partner-logo partner-logo-lg">
Expand All @@ -124,7 +124,7 @@ <h4 class="partner-title gold">
</a>
</div>
</div>
</div>
</div>
</div>

<div class="">
Expand Down Expand Up @@ -166,12 +166,12 @@ <h4 class="partner-title silver">
<img src="{% static 'congress/img/partners/2018_silver_mso.jpg' %}" alt="Logo MSO - TryIt 2018">
</div>
</div>
</div>
</div>
</div>

<div class="">
<h4 class="partner-title bronze">
BRONCE
BRONCE
</h4>
<div class="partners-logos partners-logos-sm">
<div class="partner-logo partner-logo-sm">
Expand Down Expand Up @@ -202,7 +202,7 @@ <h4 class="partner-title bronze">
</a>
</div>
</div>
</div>
</div>
</div>
</section>

Expand Down
10 changes: 5 additions & 5 deletions congress/templates/congress/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center light-green-text">Try IT! 2018</h1>
<h1 class="header center light-green-text">Try IT! 2019</h1>
<div class="row center">
<h5 class="header col s12 ">Bienvenido a la sexta edición</h5>
<h5 class="header col s12">Del 19 al 22 de Marzo</h5>
<h5 class="header col s12 ">Bienvenido a la séptima edición</h5>
<h5 class="header col s12">Del 18 al 22 de Marzo</h5>
</div>
<div class="row center">
<a href="{% url 'congress:last-editions' %}" class="btn-large waves-effect waves-light btn light-green">Ediciones anteriores</a>
Expand Down Expand Up @@ -81,7 +81,7 @@ <h2 class="header light-green-text center-align">¿Qué ofrecemos esta edición?
</div>


<div class="parallax-container valign-wrapper">
<!--{#<div class="parallax-container valign-wrapper">
<div class="container">
<div class="row center">
<a href="{% url 'congress:hashcode' %}"><img class="responsive-img" src="{% static 'congress/img/hashcode_banner.png' %}"></a>
Expand All @@ -92,7 +92,7 @@ <h5 class="header col s12 ">Forma un equipo y resulve un reto de ingeniería de
</div>
</div>
<div class="parallax"><img src="{% static 'congress/img/hashcode_background.jpg' %}"></div>
</div>
</div>#}!-->

<!-- ========================== -->
<!-- editions -->
Expand Down
18 changes: 18 additions & 0 deletions congress/templates/congress/last_editions.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<div class="row grey darken-3 z-depth-2">
<div class="col s12">
<ul class="tabs grey darken-3 tabs-fixed-width">
<li class="waves-effect waves-light tab"><a class="white-text" href="#2018">2018</a>
</li>
<li class="waves-effect waves-light tab"><a class="white-text" href="#2017">2017</a>
</li>
<li class="waves-effect waves-light tab"><a class="white-text" href="#2016">2016</a>
Expand All @@ -19,6 +21,22 @@
</div>

<div ng-controller="editionsController">
<!-- 2018 edition -->
<div id="2018" class="container">
{% for date in ed_2018_dates %}
<ul class="collection with-header z-depth-1">
<li class="collection-header"><h5>{{ date|date:"d N" }}</h5></li>
{% for session in sessions_2018 %}
{% if session.start_date.date == date.date %}
<a class="collection-item waves-effect" href
ng-click="openModal({{ session.id }})">{{ session.title }}</a>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>


<!-- 2017 edition -->
<div id="2017" class="container">
{% for date in ed_2017_dates %}
Expand Down
6 changes: 6 additions & 0 deletions congress/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def contact(request):


def last_editions(request):
ed_2018 = Edition.objects.get(year='2018')
ed_2018_dates = ed_2018.sessions.datetimes(field_name='start_date', kind='day')
sessions_2018 = Session.objects.filter(edition__year='2018') \
.filter(Q(format__name='Taller') | Q(format__name='Ponencia'))
ed_2017 = Edition.objects.get(year='2017')
ed_2017_dates = ed_2017.sessions.datetimes(field_name='start_date', kind='day')
sessions_2017 = Session.objects.filter(edition__year='2017') \
Expand All @@ -79,11 +83,13 @@ def last_editions(request):
ed_2013_dates = ed_2013.sessions.datetimes(field_name='start_date', kind='day')

return render(request, template_name='congress/last_editions.html', context={
'sessions_2018': sessions_2018,
'sessions_2017': sessions_2017,
'ed_2016': ed_2016,
'ed_2015': ed_2015,
'ed_2014': ed_2014,
'ed_2013': ed_2013,
'ed_2018_dates': ed_2018_dates,
'ed_2017_dates': ed_2017_dates,
'ed_2016_dates': ed_2016_dates,
'ed_2015_dates': ed_2015_dates,
Expand Down
74 changes: 68 additions & 6 deletions editions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,41 @@ def end_date_format(self, obj):
end_date_format.short_description = 'end date'


class EditionAdmin(admin.ModelAdmin):
list_display = ('year',
'title', 'slogan', 'description',
'start_date', 'end_date',
'have_google_calendar_url')

def have_google_calendar_url(self, obj):
return obj.google_calendar_url != ""
have_google_calendar_url.boolean = True


class TrackAdmin(admin.ModelAdmin):
list_display = ('name', 'room', 'description')


class PrizeAdmin(admin.ModelAdmin):
list_filter = ('session__edition__year',)
list_display = ('session', 'have_winner', 'hide', 'company', 'prize_object', 'name')
ordering = ('session__start_date',)
raw_id_fields = ('winner',)

def have_winner(self, obj):
return obj.winner is not None

have_winner.boolean = True


class PrizeObjectAdmin(admin.ModelAdmin):
list_display = ('name', 'have_image', 'description')

def have_image(self, obj):
return obj.image != ""
have_image.boolean = True


class CompanyAdmin(admin.ModelAdmin):
list_display = ('name', 'sponsor_type', 'url', 'url_cv')
actions = ('remove_sponsor_type',)
Expand All @@ -49,52 +73,90 @@ def remove_sponsor_type(self, request, queryset):


class SpeakerAdmin(admin.ModelAdmin):
list_display = ('name', 'company', 'have_picture', 'have_twitter',
'have_github', 'have_gitlab', 'have_linkedin', 'have_google', 'have_facebook')
list_display = ('name', 'company',
'have_bio', 'have_picture', 'have_contact_email',
'have_phone_number', 'have_personal_web',
'have_twitter', 'have_github', 'have_gitlab',
'have_linkedin', 'have_facebook', 'have_google')
search_fields = ('name', 'company__name')

def have_bio(self, obj):
return obj.bio != ''

have_bio.boolean = True

def have_picture(self, obj):
return obj.picture != ''

have_picture.boolean = True
have_picture.short_description = u"PICTURE"

def have_contact_email(self, obj):
return obj.contact_email != ''
# return u'<img src="%s" />' % obj.admin_thumbnail.url
# _get_thumbnail.allow_tags = True
have_contact_email.boolean = True
have_contact_email.short_description = u"EMAIL"

def have_phone_number(self, obj):
return obj.phone_number != ''

have_phone_number.boolean = True
have_phone_number.short_description = u"PHONE"

def have_personal_web(self, obj):
return obj.personal_web != ''

have_personal_web.boolean = True
have_personal_web.short_description = u"WEB"

def have_twitter(self, obj):
return obj.twitter_profile != ''

have_twitter.boolean = True
have_twitter.short_description = u"TWITTER"

def have_facebook(self, obj):
return obj.facebook_profile != ''

have_facebook.boolean = True
have_facebook.short_description = u"FACEBOOK"

def have_linkedin(self, obj):
return obj.linkedin_profile != ''

have_linkedin.boolean = True
have_linkedin.short_description = u"LINKEDIN"

def have_github(self, obj):
return obj.github_profile != ''

have_github.boolean = True
have_github.short_description = u"GITHUB"

def have_gitlab(self, obj):
return obj.gitlab_profile != ''

have_gitlab.boolean = True
have_gitlab.short_description = u"GITLAB"

def have_google(self, obj):
return obj.googleplus_profile != ''

have_google.boolean = True
have_google.short_description = u"GOOGLE+"


class SponsorTypeAdmin(admin.ModelAdmin):
list_display = ('name', 'color')


admin.site.register(Company, CompanyAdmin)
admin.site.register(Edition)
admin.site.register(Edition, EditionAdmin)
admin.site.register(Speaker, SpeakerAdmin)
admin.site.register(SessionFormat)
admin.site.register(Session, SessionAdmin)
admin.site.register(Track)
admin.site.register(Track, TrackAdmin)
admin.site.register(Prize, PrizeAdmin)
admin.site.register(PrizeObject)
admin.site.register(SponsorType)
admin.site.register(PrizeObject, PrizeObjectAdmin)
admin.site.register(SponsorType, SponsorTypeAdmin)
Loading

0 comments on commit 32c4e4f

Please sign in to comment.