diff --git a/.env_production_sample b/.env_production_sample
index 37f7f4a99..b9830ec63 100644
--- a/.env_production_sample
+++ b/.env_production_sample
@@ -130,7 +130,6 @@ WEB_CONCURRENCY=16
#SOCIAL_AUTH_CHAHUB_BASE_URL=https://chahub.org
-
# ----------------------------------------------------------------------------
# Logging
# ----------------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 56a7f067a..11fddc157 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,6 @@
!certs/.gitkeep
certs/
var/*
-var_*/
docker-compose.override.yml
*_old/
.pytest_cache
diff --git a/codalab/apps/api/serializers.py b/codalab/apps/api/serializers.py
index 1f06633d1..4dc8446f2 100644
--- a/codalab/apps/api/serializers.py
+++ b/codalab/apps/api/serializers.py
@@ -54,29 +54,10 @@ class Meta:
class PhaseSerial(serializers.ModelSerializer):
start_date = serializers.DateField(format='%Y-%m-%d')
- is_active = serializers.Field()
class Meta:
model = webmodels.CompetitionPhase
- fields = (
- 'competition',
- 'description',
- 'phasenumber',
- 'label',
- 'start_date',
- 'max_submissions',
- 'max_submissions_per_day',
- 'is_scoring_only',
- 'id',
- 'is_migrated',
- 'is_active',
- 'phase_never_ends',
- )
- extra_kwargs = {
- 'datasets': {'read_only': True},
- 'is_active': {'read_only': True},
- 'id': {'read_only': True},
- }
+ read_only_fields = ['datasets']
class CompetitionPhaseSerial(serializers.ModelSerializer):
end_date = serializers.DateField(format='%Y-%m-%d')
diff --git a/codalab/apps/web/static/less/main.less b/codalab/apps/web/static/less/main.less
index 05290df53..336649afb 100644
--- a/codalab/apps/web/static/less/main.less
+++ b/codalab/apps/web/static/less/main.less
@@ -329,21 +329,6 @@ starting_kit_table {
border: 1px solid #000000;
}
-#chahub_embed {
- width: 100%;
- height: 100%;
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- border: 0;
-
- // Doing padding instead of top: 50px makes body not have a scrollbar
- padding-top: 50px;
- padding-bottom: 25px;
-}
-
.finished-submission {
background-color: rgba(0, 255, 0, 0.1) !important;
}
diff --git a/codalab/apps/web/templates/web/competitions/index.html b/codalab/apps/web/templates/web/competitions/index.html
index dbf7246e9..9d3107537 100644
--- a/codalab/apps/web/templates/web/competitions/index.html
+++ b/codalab/apps/web/templates/web/competitions/index.html
@@ -1,10 +1,96 @@
{% extends 'base.html' %}
+{% block head_title %}Competitions{% endblock head_title %}
+{% block page_title %}Competitions{% endblock page_title %}
+{% block content %}
{% load static %}
+
+
+ {% comment commenting out until we have sorting %}
+
+ {% endcomment %}
+
+
+
-{% block head_title %}Competitions search{% endblock head_title %}
-{% block nosubheader %}{% endblock %} {# don't show header #}
+
+
+ {% if not competitions %}
+
There are no competitions.
+ {% else %}
+ {% for competition in competitions %}
+ {% include "web/my/_competition_tile.html" with competition=competition %}
+ {% endfor %}
+ {% endif %}
+
+
+Learn how to create your own competition.
+{% endblock content%}
-{% block content_wrapper %}
-
-{% endblock %}
\ No newline at end of file
+{% block js %}
+ function populate(frm, data) {
+ $.each(data, function(key, value){
+ var $ctrl = $('[name='+key+']', frm);
+ switch($ctrl.attr("type"))
+ {
+ case "text":
+ case "hidden":
+ $ctrl.val(value);
+ break;
+ case "radio":
+ case "checkbox":
+ $ctrl.each(function(){
+ if(value=='on') {
+ $(this).attr("checked",value);
+ }
+ });
+ break;
+ default:
+ $ctrl.val(value);
+ }
+ });
+ }
+ $('.competition-tile').on('click',function(){
+ var competitionID = $(this).find('#competitionID').val();
+ window.location.href = '/competitions/' + competitionID;
+ });
+
+ var params = {}
+ location.search.substr(1).split("&").forEach(function(item) {params[item.split("=")[0]] = item.split("=")[1]})
+
+ populate('#search_form', params);
+{% endblock js %}
diff --git a/codalab/apps/web/templates/web/highlights.html b/codalab/apps/web/templates/web/highlights.html
index 9e4831be8..5395b28de 100644
--- a/codalab/apps/web/templates/web/highlights.html
+++ b/codalab/apps/web/templates/web/highlights.html
@@ -15,138 +15,121 @@
-
-
-
+
+
-
-
10,000 Users
-
December 2017: Codalab exceeds 10000 users with 480 competitions (145 public)
+
+
+
+
-
-
-
CiML workshop
-
- December 2017: Codalab presented at the Challenges in Machine Learning workshop [slides].
-
+
-
-
-
Version 1.5 is out!
-
- November 2017: Explore the new features: scale up your code submission competition with
- your own compute workers (full privacy, dockers); organize RL challenges and hook up simulators
- providing data on demand (with your own "ingestion program"); use the ChaLab wizard to create
- competitions in minutes.
-
+
-
+
-
-
-
-

+
+
Powered By
+
@@ -564,11 +411,7 @@
@@ -588,6 +431,7 @@
$('.fixed.menu').transition('fade out')
}
})
+
// create sidebar and attach to menu open
$('.ui.sidebar')
.sidebar('attach events', '.toc.item')
diff --git a/codalab/apps/web/urls/__init__.py b/codalab/apps/web/urls/__init__.py
index 4b0e1ec2d..07858a6d4 100644
--- a/codalab/apps/web/urls/__init__.py
+++ b/codalab/apps/web/urls/__init__.py
@@ -9,7 +9,7 @@
from .. import views
urlpatterns = patterns('',
- url(r'^old_home_page$', views.HomePageView.as_view(), name='old_home'),
+ url(r'^$', views.HomePageView.as_view(), name='home'),
url(r'^_ver', views.VersionView.as_view(),name='_version'),
url(r'^my/', include('apps.web.urls.my')),
url(r'^profile/(?P
\d+)$', views.UserDetailView.as_view(), name='user_details'),
@@ -36,12 +36,13 @@
url(r'^(?i)Caption/?', RedirectView.as_view(url='https://www.codalab.org/competitions/3221')),
# Static pages
- url(r'^$', views.HomePageView.as_view(), name="home"),
+ url(r'^(?i)highlights/?', TemplateView.as_view(template_name='web/highlights.html'), name="highlights"),
# Helper that closes window upon visiting
url(r'^close/$', TemplateView.as_view(template_name='close.html')),
)
+
if settings.DEBUG:
'''
Debugging email templates
diff --git a/codalab/apps/web/views.py b/codalab/apps/web/views.py
index 52daab21e..2485ea3c0 100644
--- a/codalab/apps/web/views.py
+++ b/codalab/apps/web/views.py
@@ -103,7 +103,7 @@ def get_context_data(self, **kwargs):
class HomePageView(TemplateView):
"""Template View for homepage."""
- template_name = "web/highlights.html"
+ template_name = "web/index.html"
def get(self, *args, **kwargs):
if settings.SINGLE_COMPETITION_VIEW_PK:
diff --git a/codalab/codalab/context_processors.py b/codalab/codalab/context_processors.py
index e2ed37087..314523859 100644
--- a/codalab/codalab/context_processors.py
+++ b/codalab/codalab/context_processors.py
@@ -1,5 +1,6 @@
from django.conf import settings
+from apps.customizer.models import Configuration
from codalab import settings as codalab_settings
@@ -20,9 +21,6 @@ def common_settings(request):
'local_ace_editor': codalab_settings.LOCAL_ACE_EDITOR,
'is_dev': codalab_settings.IS_DEV,
'USE_AWS': codalab_settings.USE_AWS,
- # Just get the base of the URL
- 'CHAHUB_URL': '//{}'.format(settings.CHAHUB_API_URL.split("//")[-1].split("/")[0].split('?')[0]),
- 'CHAHUB_PRODUCER_ID': settings.CHAHUB_PRODUCER_ID,
'CODALAB_SITE_DOMAIN': codalab_settings.CODALAB_SITE_DOMAIN,
'USE_MAILCHIMP': bool(settings.MAILCHIMP_API_KEY),
}
diff --git a/codalab/codalab/settings/base.py b/codalab/codalab/settings/base.py
index 30de47390..8727281e5 100644
--- a/codalab/codalab/settings/base.py
+++ b/codalab/codalab/settings/base.py
@@ -270,8 +270,7 @@ class Base(Settings):
}
# Authentication configuration
- # LOGIN_REDIRECT_URL = '/'
- LOGIN_REDIRECT_URL = '/my/'
+ LOGIN_REDIRECT_URL = '/'
ANONYMOUS_USER_ID = -1
ACCOUNT_AUTHENTICATION_METHOD='username_email'
ACCOUNT_EMAIL_REQUIRED = True
diff --git a/docker-compose.yml b/docker-compose.yml
index 6106549fb..cf80321b3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,6 @@ services:
- ./certs:/app/certs
- ./docker:/app/docker
- ./codalab:/app/codalab
- - ./acme-challenge:/app/acme-challenge
- ${LOGGING_DIR}/nginx:/var/log/nginx/
env_file: .env
links:
diff --git a/docker/nginx/ssl.conf b/docker/nginx/ssl.conf
index b8af8f9c5..80f7f31ba 100644
--- a/docker/nginx/ssl.conf
+++ b/docker/nginx/ssl.conf
@@ -62,9 +62,4 @@ server {
proxy_redirect off;
proxy_buffering off;
}
-
- location /.well-known/acme-challenge {
- default_type "text/plain";
- root /app/acme-challenge;
- }
}