SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 34332532 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Start work on sponsors app

parent 801e85ea
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,9 @@ INSTALLED_APPS = (
'proceedings',
'production',
'profiles',
# TODO: partners to be deprecated in favour of sponsors
'partners',
'sponsors',
'preprints',
'funders',
'stats',
......
......@@ -54,7 +54,9 @@ urlpatterns = [
url(r'^proceedings/', include('proceedings.urls', namespace="proceedings")),
url(r'^production/', include('production.urls', namespace="production")),
url(r'^profiles/', include('profiles.urls', namespace="profiles")),
# TODO: partners to be deprecated in favour of sponsors
url(r'^partners/', include('partners.urls', namespace="partners")),
url(r'^sponsors/', include('sponsors.urls', namespace="sponsors")),
url(r'^stats/', include('stats.urls', namespace="stats")),
# Keep temporarily for historical reasons
url(r'^supporting_partners/', include('partners.urls', namespace="_partners")),
......
......@@ -14,6 +14,10 @@
<div class="row">
<div class="col-12">
<h2>Finances</h2>
<h3 class="highlight">Sponsors</h3>
<p>Visit our <a href="{% url 'finances:sponsors' %}">Sponsors page</a> to view our list of sponsors and more information on our sponsorship scheme.</p>
<h3 class="highlight">Subsidies</h3>
<ul>
<li><a href="{% url 'finances:subsidies' %}">View {% if perms.scipost.can_manage_subsidies %}(and manage) {% endif %}info on Subsidies obtained by SciPost</a></li>
......
......@@ -36,7 +36,6 @@ $(document).ready(function($) {
<div class="row">
<div class="col-12">
<h4>Subsidies obtained:</h4>
<table class="table table-hover mb-5">
<thead class="thead-default">
<tr>
......
__copyright__ = "Copyright 2016-2018, Stichting SciPost (SciPost Foundation)"
__license__ = "AGPL v3"
import datetime
from django.db import models
class OrganizationQuerySet(models.QuerySet):
def current_sponsors(self):
return self.filter(subsidy__date_until__gte=datetime.date.today())
......@@ -13,6 +13,7 @@ from django.urls import reverse
from django_countries.fields import CountryField
from .constants import ORGANIZATION_TYPES, ORGANIZATION_STATUSES, ORGSTATUS_ACTIVE
from .managers import OrganizationQuerySet
from scipost.models import Contributor
from journals.models import Publication, OrgPubFraction, UnregisteredAuthor
......@@ -63,6 +64,8 @@ class Organization(models.Model):
blank=True, null=True,
help_text='NB: nr_associated_publications is a calculated field. Do not modify.')
objects = OrganizationQuerySet.as_manager()
class Meta:
ordering = ['country', 'name']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment