Skip to content
Draft
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: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/.idea/
/venv/
*.egg-info
/staticfiles
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ following command to create a super user:
Finally, you're ready to start the application:

```bash
./run_dev.py
./manage.py runserver
```

Then open http://localhost:8007/admin to log in. Once redirected to the Django
Then open http://localhost:8000/admin to log in. Once redirected to the Django
admin interface, go back to the main interface. You're now logged in.

## Contributing
Expand Down
4 changes: 2 additions & 2 deletions media/commitfest/css/commitfest.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ div.form-group div.controls input.threadpick-input {
*/
#attachThreadListWrap.loading {
display: block;
background: url("/media/commitfest/spinner.gif") no-repeat center;
background: url("/static/commitfest/spinner.gif") no-repeat center;
width: 124px;
height: 124px;
margin: 0 auto;
Expand All @@ -73,7 +73,7 @@ div.form-group div.controls input.threadpick-input {
* Annotate message dialog */
#annotateMessageBody.loading {
display: block;
background: url("/media/commitfest/spinner.gif") no-repeat center;
background: url("/static/commitfest/spinner.gif") no-repeat center;
width: 124px;
height: 124px;
margin: 0 auto;
Expand Down
25 changes: 13 additions & 12 deletions pgcommitfest/commitfest/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{%load commitfest%}
{%load static%}
<!DOCTYPE html>
<html>
<head>
<title>{{title|default:'Commitfest' }}</title>
<link rel="stylesheet" href="/media/commitfest/css/jquery-ui.css" type="text/css">
<link rel="stylesheet" href="/media/commitfest/css/bootstrap.css?v=5.3.7" />
<link rel="stylesheet" href="/media/commitfest/css/bootstrap-icons.css" />
<link rel="stylesheet" href="/media/commitfest/css/selectize.bootstrap5.css" />
<link rel="stylesheet" href="/media/commitfest/css/commitfest.css?{% static_file_param %}" />
<link rel="shortcut icon" href="/media/commitfest/favicon.ico" />
<link rel="stylesheet" href="{% static 'commitfest/css/jquery-ui.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'commitfest/css/bootstrap.css' %}?v=5.3.7" />
<link rel="stylesheet" href="{% static 'commitfest/css/bootstrap-icons.css' %}" />
<link rel="stylesheet" href="{% static 'commitfest/css/selectize.bootstrap5.css' %}" />
<link rel="stylesheet" href="{% static 'commitfest/css/commitfest.css' %}?{% static_file_param %}" />
<link rel="shortcut icon" href="{% static 'commitfest/favicon.ico' %}" />
{%block extrahead%}{%endblock%}
{%if rss_alternate%} <link rel="alternate" type="application/rss+xml" title="{{rss_alternate_title}}" href="{{rss_alternate}}" />{%endif%}
</head>
Expand Down Expand Up @@ -59,7 +60,7 @@
</button>
</div>
</form>
<a class="btn btn-secondary" href="https://github.com/postgres/pgcommitfest" target="_blank"><img class="github-logo" src="/media/commitfest/github-mark.svg"/> Contribute</a>
<a class="btn btn-secondary" href="https://github.com/postgres/pgcommitfest" target="_blank"><img class="github-logo" src="{% static 'commitfest/github-mark.svg' %}"/> Contribute</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -103,10 +104,10 @@ <h1>{{title}}</h1>
{%block contents%}
{%endblock%}
</div>
<script src="/media/commitfest/js/jquery.js"></script>
<script src="/media/commitfest/js/jquery-ui.js"></script>
<script src="/media/commitfest/js/bootstrap.js?v=5.3.7"></script>
<script src="/media/commitfest/js/selectize.min.js"></script>
<script src="/media/commitfest/js/commitfest.js?{% static_file_param %}"></script>
<script src="{% static 'commitfest/js/jquery.js' %}"></script>
<script src="{% static 'commitfest/js/jquery-ui.js' %}"></script>
<script src="{% static 'commitfest/js/bootstrap.js' %}?v=5.3.7"></script>
<script src="{% static 'commitfest/js/selectize.min.js' %}"></script>
<script src="{% static 'commitfest/js/commitfest.js' %}?{% static_file_param %}"></script>
{%block morescript%}{%endblock%}
</html>
11 changes: 6 additions & 5 deletions pgcommitfest/commitfest/templates/commitfest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%extends "base.html"%}
{%load static%}
{%load commitfest %}
{%block contents%}

Expand Down Expand Up @@ -72,17 +73,17 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
<span class="badge bg-warning">Needs rebase!</span>
</a>
{%else%}
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="{% static 'commitfest/github-mark.svg' %}"/></a>
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{p.id}}"
title="View CI history. {%if p.failing_since%}Failing {% cfsince p.failing_since %}. {%endif%}{%if cfb.failed_task_names %}Failed jobs: {{cfb.failed_task_names}}{%endif%}">
{%if cfb.branch_status == 'failed' or cfb.branch_status == 'timeout' or cfb.failed_non_formatting > 0 %}
<img src="/media/commitfest/new_failure.svg"/>
<img src="{% static 'commitfest/new_failure.svg' %}"/>
{%elif cfb.failed > 0 %}
<img src="/media/commitfest/formatting_failure.svg"/>
<img src="{% static 'commitfest/formatting_failure.svg' %}"/>
{%elif cfb.completed < cfb.total %}
<img src="/media/commitfest/running.svg"/>
<img src="{% static 'commitfest/running.svg' %}"/>
{%else%}
<img src="/media/commitfest/new_success.svg"/>
<img src="{% static 'commitfest/new_success.svg' %}"/>
{%endif%}
<span class="run-counters">
{{cfb.completed}}/{{cfb.total}}
Expand Down
11 changes: 6 additions & 5 deletions pgcommitfest/commitfest/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%extends "base.html"%}
{%load static%}
{%load commitfest %}
{%block contents%}
{% if not is_experienced_user %}
Expand Down Expand Up @@ -179,17 +180,17 @@ <h3>{%if user.is_authenticated%}Open patches you are subscribed to{%elif p.is_op
<span class="badge bg-warning">Needs rebase!</span>
</a>
{%else%}
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="{% static 'commitfest/github-mark.svg' %}"/></a>
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{p.id}}"
title="View CI history. {%if p.failing_since%}Failing {% cfsince p.failing_since %}. {%endif%}{%if cfb.failed_task_names %}Failed jobs: {{cfb.failed_task_names}}{%endif%}">
{%if cfb.branch_status == 'failed' or cfb.branch_status == 'timeout' or cfb.failed_non_formatting > 0 %}
<img src="/media/commitfest/new_failure.svg"/>
<img src="{% static 'commitfest/new_failure.svg' %}"/>
{%elif cfb.failed > 0 %}
<img src="/media/commitfest/formatting_failure.svg"/>
<img src="{% static 'commitfest/formatting_failure.svg' %}"/>
{%elif cfb.completed < cfb.total %}
<img src="/media/commitfest/running.svg"/>
<img src="{% static 'commitfest/running.svg' %}"/>
{%else%}
<img src="/media/commitfest/new_success.svg"/>
<img src="{% static 'commitfest/new_success.svg' %}"/>
{%endif%}
<span class="run-counters">
{{cfb.completed}}/{{cfb.total}}
Expand Down
17 changes: 9 additions & 8 deletions pgcommitfest/commitfest/templates/patch.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%extends "base.html"%}
{%load static%}
{%load commitfest%}
{%block contents%}
{%include "patch_commands.inc"%}
Expand All @@ -21,27 +22,27 @@
<a href="{{cfbot_branch.apply_url}}">
<span class="badge bg-warning" title="View git apply logs">Needs rebase!</span></a>
Needs rebase {% cfsince cfbot_branch.needs_rebase_since %}. {%if cfbot_branch.failing_since and cfbot_branch.failing_since != cfbot_branch.needs_rebase_since %}Failing {% cfsince cfbot_branch.failing_since %}. {%endif%}<br>Additional links previous successfully applied patch (outdated):<br>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{patch.id}}~1...cf/{{patch.id}}" title="View previous successfully applied patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{patch.id}}~1...cf/{{patch.id}}" title="View previous successfully applied patch set on GitHub"><img class="github-logo" src="{% static 'commitfest/github-mark.svg' %}"/></a>
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{patch.id}}">
<span class="badge bg-secondary">Summary</span></a>
{%else%}
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{patch.id}}~1...cf/{{patch.id}}" title="View last patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{patch.id}}~1...cf/{{patch.id}}" title="View last patch set on GitHub"><img class="github-logo" src="{% static 'commitfest/github-mark.svg' %}"/></a>
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{patch.id}}">
<span class="badge bg-secondary">Summary</span></a>
{%for c in cfbot_tasks %}
{%if c.status == 'COMPLETED'%}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/new_success.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/new_success.svg' %}"/></a>
{%elif c.status == 'PAUSED'%}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/paused.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/paused.svg' %}"/></a>
{%elif c.status == 'CREATED' or c.status == 'SCHEDULED' %}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/waiting_to_start.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/waiting_to_start.svg' %}"/></a>
{%elif c.status == 'EXECUTING' %}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/running.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/running.svg' %}"/></a>
{%else %}
{%if c.task_name == 'FormattingCheck' %}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/formatting_failure.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/formatting_failure.svg' %}"/></a>
{%else%}
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="/media/commitfest/new_failure.svg"/></a>
<a href="https://cirrus-ci.com/task/{{c.task_id}}" title="{{c.task_name}}: {{c.status}}"><img src="{% static 'commitfest/new_failure.svg' %}"/></a>
{%endif%}
{%endif%}
{%endfor%}
Expand Down
45 changes: 14 additions & 31 deletions pgcommitfest/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Django settings for pgcommitfest project.

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

DEBUG = False
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = ["*"]
Expand Down Expand Up @@ -44,40 +49,17 @@
# calendars according to the current locale
USE_L10N = False

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ""

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ""

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ""

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = "/media/"

# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = "/media/admin/"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_URL = "/static/"

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
STATICFILES_DIRS = [
BASE_DIR / "media",
]

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = ()
# Directory where collectstatic will copy files for production
STATIC_ROOT = BASE_DIR / "staticfiles"

# Make this unique, and don't share it with anybody.
SECRET_KEY = "REALLYCHANGETHISINLOCAL_SETTINGS.PY"
Expand Down Expand Up @@ -116,6 +98,7 @@
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
# Uncomment the next line to enable the admin:
"django.contrib.admin",
# Uncomment the next line to enable admin documentation:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies = [

[project.optional-dependencies]
dev = [
"uwsgi",
"pycodestyle",
"ruff",
"djhtml",
Expand Down
35 changes: 0 additions & 35 deletions run_dev.py

This file was deleted.

12 changes: 0 additions & 12 deletions uwsgi_dev.ini

This file was deleted.