Skip to content

Commit

Permalink
Merge branch 'master' into no-downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
misli authored Mar 16, 2018
2 parents 75edec0 + ac03fbe commit 51c4064
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 21 deletions.
2 changes: 1 addition & 1 deletion conf/httpd/softwarecollections.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ErrorDocument 404 /media/404.html
ErrorDocument 500 /media/500.html

WSGIDaemonProcess softwarecollections.org user=softwarecollections group=softwarecollections processes=2 threads=15 display-name=%{GROUP}
WSGIDaemonProcess softwarecollections.org user=softwarecollections group=softwarecollections processes=5 threads=15 display-name=%{GROUP}
WSGIProcessGroup softwarecollections.org

AddIcon /static/images/rpm.png *.rpm
Expand Down
Binary file modified packaging-guide-1.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion rel-eng/packages/softwarecollections
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13-1 ./
0.14-1 ./
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name = "softwarecollections",
version = '0.13',
version = '0.14',
description = "Software Collection Management Website and Utils",
author = "Jakub Dorňák",
author_email = "[email protected]",
Expand Down
10 changes: 9 additions & 1 deletion softwarecollections.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%global guide_version 1

Name: softwarecollections
Version: 0.13
Version: 0.14
Release: 1%{?dist}

Summary: Software Collections Management Website and Utils
Expand Down Expand Up @@ -226,6 +226,14 @@ service httpd condrestart


%changelog
* Thu Aug 24 2017 Miroslav Suchý <[email protected]> 0.14-1
- Update packaging-guide ([email protected])
- typo in pagination.html ([email protected])
- Update packaging-guide ([email protected])
- Add Dockerfile for development and a test that executes it
([email protected])
- Make sure pagination persists search options ([email protected])

* Wed Dec 14 2016 Jakub Dorňák <[email protected]> 0.13-1
- updated contact information and project url ([email protected])
- softwarecollections-services-setup ([email protected])
Expand Down
16 changes: 10 additions & 6 deletions softwarecollections/management/commands/makesuperuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@


class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--database', action='store', dest='database',
default=DEFAULT_DB_ALIAS, help='Specifies the database to use. Default is "default".'),
)
args = '[ <username> ]'
help = 'Used to make user a superuser.'
def add_arguments(self, parser):
parser.add_argument(
'--database',
action='store',
dest='database',
default=DEFAULT_DB_ALIAS,
help='Specifies the database to use. Default is "default".',
)
parser.add_argument('username', nargs='?')
parser.help = 'Used to make user a superuser.'

requires_system_checks = False

Expand Down
6 changes: 4 additions & 2 deletions softwarecollections/scls/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
PER_PAGE_CHOICES = ((10, '10 per page'), (25, '25 per page'), (50, '50 per page'))

ORDER_BY_CHOICES = (
('-download_count', _('Sort: download count')),
('-create_date', _('Sort: recently created')),
('-score', _('Sort: score')),
('title', _('Sort: title')),
('-last_modified', _('Sort: recently built')),
# Not using stats that don't matter for non-copr SCLs
# ('-download_count', _('Sort: download count')),
# ('-last_modified', _('Sort: recently built')),
)


Expand Down
6 changes: 3 additions & 3 deletions softwarecollections/scls/templates/scls/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<nav class="paginator">
<ul class="pagination">
{% if collections.has_previous %}
<li><a href="?{% for key,value in request.GET.items %}{% if key != 'page' %}{{ key }}={{ value }}&{% endif %}{% endfor %}page={{ collections.previous_page_number }}">&laquo;</a></li>
<li><a href="?{% for key,value in request.GET.items %}{% if key != 'page' %}{{ key }}={{ value }}&amp;{% endif %}{% endfor %}page={{ collections.previous_page_number }}">&laquo;</a></li>
{% endif %}

{% for page in collections.paginator.page_range %}
<li {% if forloop.counter == collections.number %} class="active" {% endif %} ><a href="?page={{page}}">{{page}}</a></li>
<li {% if forloop.counter == collections.number %} class="active" {% endif %} ><a href="?{% for key,value in request.GET.items %}{% if key != 'page' %}{{ key }}={{ value }}&amp;{% endif %}{% endfor %}page={{page}}">{{page}}</a></li>
{% endfor %}

{% if collections.has_next %}
<li><a href="?{% for key,value in request.GET.items %}{% if key != 'page' %}{{ key }}={{ value }}&{% endif %}{% endfor %}page={{ collections.next_page_number }}">&raquo;</a></li>
<li><a href="?{% for key,value in request.GET.items %}{% if key != 'page' %}{{ key }}={{ value }}&amp;{% endif %}{% endfor %}page={{ collections.next_page_number }}">&raquo;</a></li>
{% endif %}
</ul>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2><a href='{{ scl.get_absolute_url }}'>{{ scl.title }}</a>
<p>
{{ scl.policy | policy_name }}
{% if scl.approved %}
| <span data-toggle="tooltip" data-placement="bottom" data-original-title="This collection has passed a review by professional to ensure it works properly." class="approved"><span class="glyphicon glyphicon-ok"></span> approved </span>
| <span data-toggle="tooltip" data-placement="bottom" data-original-title="This collection has passed a review by a professional to ensure it works properly." class="approved"><span class="glyphicon glyphicon-ok"></span> approved </span>
{% endif %}
{% if scl.download_count > 0 %}
| {{ scl.download_count }} downloads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class='page-header'>
<div class='icons'>
{% if scl.approved %}
<span data-toggle="tooltip" data-placement="bottom" data-original-title="This collection has passed a review by professional to ensure it works properly." class="approved"><span class="glyphicon glyphicon-ok"> </span> approved</span>
<span data-toggle="tooltip" data-placement="bottom" data-original-title="This collection has passed a review by a professional to ensure it works properly." class="approved"><span class="glyphicon glyphicon-ok"> </span> approved</span>
{% endif %}
</div>
<h1>{{ scl.title }}
Expand Down
6 changes: 2 additions & 4 deletions softwarecollections/scls/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
from django.core.urlresolvers import reverse
from django.db.models import Q, Manager
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.shortcuts import render, get_object_or_404
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.http import require_POST
Expand Down Expand Up @@ -69,8 +68,7 @@ def _list(request, template, queryset, dictionary, **kwargs):
dictionary['collections'] = collections
dictionary['filter_form'] = filter_form
dictionary['paginator'] = paginator
return render_to_response(template, dictionary,
context_instance = RequestContext(request))
return render(request, template, dictionary)


def list_all(request, **kwargs):
Expand Down

0 comments on commit 51c4064

Please sign in to comment.