Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
api_endpoint = {
'contrihub_api_1': 'https://api.github.com/repos/ContriHUB/',
'contrihub_api_2': 'https://api.github.com/repos/contrihub/',
'contrihub_org_repos': 'https://api.github.com/orgs/ContriHUB/repos',
}

html_endpoint = {
Expand Down
11 changes: 2 additions & 9 deletions contrihub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import dj_database_url
from pathlib import Path
import os
from config import api_endpoint

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -185,14 +184,8 @@
EMAIL_USE_TLS = config('EMAIL_USE_TLS', default=True, cast=bool)
EMAIL_USE_SSL = config('EMAIL_USE_SSL', default=False, cast=bool)

AVAILABLE_PROJECTS = config(
'AVAILABLE_PROJECTS',
default='ContriHUB-24',
cast=lambda v: [s.strip() for s in v.split(',')],
)

CONTRIHUB_ORG_REPOS_ENDPOINT = config('CONTRIHUB_ORG_REPOS_ENDPOINT', default=api_endpoint['contrihub_org_repos'])

AVAILABLE_PROJECTS = config('AVAILABLE_PROJECTS', default="ContriHUB-24",
cast=lambda v: [s.strip() for s in v.split(',')])
LABEL_MENTOR = config('LABEL_MENTOR', default="mentor")
LABEL_LEVEL = config('LABEL_LEVEL', default="level")
LABEL_POINTS = config('LABEL_POINTS', default="points")
Expand Down
7 changes: 1 addition & 6 deletions home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
from user_profile.models import UserProfile
from .forms import ContactForm

# Legacy dashboard filters: initialise globals before any view runs
issues_qs = Issue.objects.none()
domain = 'All'
subdomain = 'All'


def home(request):
return render(request, 'home/index.html')
Expand Down Expand Up @@ -72,7 +67,7 @@ def filter_by_domain(request, domain_pk):

@complete_profile_required
def filter_by_subdomain(request, subdomain_pk):
global issues_qs, subdomain
global issues_qs, domain, subdomain
subdomain = SubDomain.objects.get(pk=subdomain_pk)
project_qs = Project.objects.all()
if domain != 'All':
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ class Project(models.Model):
api_url = models.URLField(verbose_name="API URL")

html_url = models.URLField(verbose_name="HTML URL")
description = models.URLField(verbose_name="Description", blank=True)
homepage = models.URLField(verbose_name="Homepage", blank=True)
topics_raw = models.TextField(verbose_name="Topics", blank=True)
pushed_at = models.DateTimeField(verbose_name="Last Pushed At", null=True, blank=True)
archived = models.BooleanField(default=False)
is_current = models.BooleanField(default=False)
domain = models.ForeignKey(Domain, on_delete=models.DO_NOTHING, null=True, default=None)
subdomain = models.ForeignKey(SubDomain, on_delete=models.DO_NOTHING, blank=True, default=None, null=True)

Expand Down
Loading
Loading