diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..78ec9b2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: + - repo: git@github.com:astral-sh/ruff-pre-commit + rev: v0.4.4 + hooks: + - id: ruff + + - repo: git@github.com:pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace diff --git a/Dockerfile b/Dockerfile index ff6e66a..94f3258 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,17 @@ -FROM python:3.8.1 +FROM python:3.8.18 -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - -RUN apt-get -y install nodejs -RUN apt-get -y install libcairo-dev +# Install dependencies for node +RUN apt-get update && \ + apt-get install -y curl ca-certificates && \ + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ + apt-get install -y nodejs && \ + node --version && npm --version +RUN apt-get -y install libcairo-dev RUN mkdir -p /usr/src/app COPY package.json /usr/src/app/ +RUN npm --version RUN npm install --prefix /usr/src/app/ COPY requirements.txt /usr/src/app diff --git a/LICENSE b/LICENSE index 1d2f9c3..c798866 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 pythonph +Copyright (c) 2025 pythonph Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/common/templates/base.html b/common/templates/base.html index 8c112d1..6ac9e2b 100644 --- a/common/templates/base.html +++ b/common/templates/base.html @@ -12,7 +12,8 @@ {% block css %} - + + {% compress css %} {% endcompress %} diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index bede0c3..ff77733 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,38 +1,41 @@ -source: - image: pythonph/pythonph - volumes: - - /usr/src/app/venv - - /usr/src/app/node_modules - - /usr/src/app/bower_components - - /usr/src/app/static - environment: - - ENV=DEV - env_file: dev.env - command: bin/install +version: "3" -db: - image: postgres:latest - environment: - - ENV=DEV - env_file: dev.env - -web: - image: pythonph/pythonph - volumes_from: - - source - environment: - - ENV=DEV - env_file: dev.env - ports: - - 8000:8000 - links: - - db:db - command: gunicorn -b 0.0.0.0:8000 --access-logfile - --error-logfile - pythonph.wsgi - -nginx: - build: nginx - ports: - - 8080:80 - - 443:443 - links: - - web:web +services: + source: + image: pythonph/pythonph + volumes: + - /usr/src/app/venv + - /usr/src/app/node_modules + - /usr/src/app/bower_components + - /usr/src/app/static + environment: + - ENV=DEV + env_file: dev.env + command: bin/install + + db: + image: postgres:latest + environment: + - ENV=DEV + env_file: dev.env + + web: + image: pythonph/pythonph + volumes_from: + - source + environment: + - ENV=DEV + env_file: dev.env + ports: + - 8000:8000 + links: + - db:db + command: gunicorn -b 0.0.0.0:8000 --access-logfile - --error-logfile - pythonph.wsgi + + nginx: + build: nginx + ports: + - 8080:80 + - 443:443 + links: + - web:web diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index b6fa456..c1d0626 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -1,28 +1,32 @@ -source: - image: pythonph/pythonph - volumes: - - /usr/src/app/venv - - /usr/src/app/node_modules - - /usr/src/app/bower_components - - /usr/src/app/static - environment: - - ENV=PROD - env_file: prod.env - command: bin/install +version: "3" -web: - image: pythonph/pythonph - volumes_from: - - source - environment: - - ENV=PROD - env_file: prod.env - command: gunicorn -b 0.0.0.0:8000 --access-logfile - --error-logfile - pythonph.wsgi - -nginx: - build: nginx - ports: - - 80:80 - - 443:443 - links: - - web:web +services: + source: + image: pythonph/pythonph + volumes: + - /usr/src/app/venv + - /usr/src/app/node_modules + - /usr/src/app/bower_components + - /usr/src/app/static + environment: + - ENV=PROD + env_file: prod.env + command: bin/install + + web: + image: pythonph/pythonph + volumes_from: + - source + environment: + - ENV=PROD + env_file: prod.env + command: gunicorn -b 0.0.0.0:8000 --access-logfile - --error-logfile - pythonph.wsgi + + nginx: + build: nginx + ports: + - 80:80 + - 443:443 + links: + - web:web + \ No newline at end of file diff --git a/landing/admin.py b/landing/admin.py index 7db14e9..006b70e 100644 --- a/landing/admin.py +++ b/landing/admin.py @@ -1,4 +1,3 @@ -from adminsortable2.admin import SortableAdminMixin from django.contrib import admin from django.utils.encoding import force_text @@ -42,7 +41,7 @@ def get_queryset(self, request): @admin.register(Section) -class SectionAdmin(SortableAdminMixin, admin.ModelAdmin): +class SectionAdmin(admin.ModelAdmin): search_fields = ('name',) list_filter = (IsArchivedListFilter,) diff --git a/landing/static/landing/assets/img/people/aira.jpg b/landing/static/landing/assets/img/people/aira.jpg new file mode 100644 index 0000000..92187e2 Binary files /dev/null and b/landing/static/landing/assets/img/people/aira.jpg differ diff --git a/landing/static/landing/assets/img/people/alex.jpg b/landing/static/landing/assets/img/people/alex.jpg new file mode 100644 index 0000000..5150bc7 Binary files /dev/null and b/landing/static/landing/assets/img/people/alex.jpg differ diff --git a/landing/static/landing/assets/img/people/cyrus.jpg b/landing/static/landing/assets/img/people/cyrus.jpg new file mode 100644 index 0000000..9f0c6bb Binary files /dev/null and b/landing/static/landing/assets/img/people/cyrus.jpg differ diff --git a/landing/static/landing/assets/img/people/freilla.png b/landing/static/landing/assets/img/people/freilla.png new file mode 100644 index 0000000..cb7eff9 Binary files /dev/null and b/landing/static/landing/assets/img/people/freilla.png differ diff --git a/landing/static/landing/assets/img/people/lalaine.jpg b/landing/static/landing/assets/img/people/lalaine.jpg new file mode 100644 index 0000000..3e73f22 Binary files /dev/null and b/landing/static/landing/assets/img/people/lalaine.jpg differ diff --git a/landing/static/landing/assets/img/people/rodney.jpg b/landing/static/landing/assets/img/people/rodney.jpg new file mode 100644 index 0000000..54bc84c Binary files /dev/null and b/landing/static/landing/assets/img/people/rodney.jpg differ diff --git a/landing/templates/landing/footer.html b/landing/templates/landing/footer.html new file mode 100644 index 0000000..bec635e --- /dev/null +++ b/landing/templates/landing/footer.html @@ -0,0 +1,36 @@ +{% load static %} + + diff --git a/landing/templates/landing/gallery1.html b/landing/templates/landing/header/gallery1.html similarity index 99% rename from landing/templates/landing/gallery1.html rename to landing/templates/landing/header/gallery1.html index 561acbe..f35fdd2 100644 --- a/landing/templates/landing/gallery1.html +++ b/landing/templates/landing/header/gallery1.html @@ -1,4 +1,4 @@ -{% load static from staticfiles %} +{% load static %}
+ + {% include "landing/footer.html" %} - + + + + + diff --git a/landing/templates/landing/old_index.html b/landing/templates/landing/old_index.html deleted file mode 100644 index ce6ffb3..0000000 --- a/landing/templates/landing/old_index.html +++ /dev/null @@ -1,81 +0,0 @@ -{% load static from staticfiles %} -{% load compress %} - - - - - - - - - Python Philippines - - - - - - {% compress css %} - - {% endcompress %} - - - -
-
-
-
- -
-

- Python - Philippines -

-
- -
- - {% if sections %} - {% for section in sections %} -
-

{{ section.name }}

- {{ section.content|safe }} -
- {% endfor %} - {% endif %} - - {% if events %} -
-

Public Trainings

- -
- {% endif %} - - {% include "landing/team.html" %} - -
-
- - - diff --git a/landing/templates/landing/our_aim.html b/landing/templates/landing/our_aim.html new file mode 100644 index 0000000..b457250 --- /dev/null +++ b/landing/templates/landing/our_aim.html @@ -0,0 +1,56 @@ +{% load static %} + +
+
+ +
+
+
+

+ Our Aim +

+
    +
  • + To show that Python has something for everyone: from hobbyists, to educators, to students, to professionals. +
  • +
  • + To inspire Filipinos to excel in their craft through Python and Open Source. +
  • +
  • + To provide a safe space where the Python programming language and surrounding technologies can be explored, discussed and exercised. +
  • +
+
+

+ We believe that we create small dents of improvement in the PH Tech industry when we foster environments that inspire and motivate individuals to be technically competent and passionate about their craft. +

+ + Get to know us + +
+
+
+
diff --git a/landing/templates/landing/our_team.html b/landing/templates/landing/our_team.html index 269a9a7..09ee789 100644 --- a/landing/templates/landing/our_team.html +++ b/landing/templates/landing/our_team.html @@ -1,4 +1,4 @@ -{% load static from staticfiles %} + {% load static %}
+ + {% for member in board_members %}
@@ -77,139 +79,22 @@ class="w-full h-full object-cover rounded-13 md:rounded-24 cursor-pointer max-w-144 max-h-144" data-bs-toggle="tooltip" data-bs-html="true" - title="
Micaela Reyes
Director of Operations
" - src="{% static "landing/assets/img/people/micaela.jpg" %}" - data-aos="py-slide" - /> -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
-
+ {% endfor %} +

Core Volunteers

+
- {% for commitee in commitees %} + {% for committee in committees %} + {% if forloop.counter0|divisibleby:3 %} +
+
+ {% endif %}

- {{ commitee.name }} + {{ committee.name }}

    - {% for volunteer in commitee.volunteers.all %} -
  • {{ volunteer.display_name }}
  • + {% for volunteer in committee.volunteers.all %} +
  • {{ volunteer }}
  • {% endfor %}
{% endfor %}
+ - \ No newline at end of file + diff --git a/landing/templates/landing/what_we_do/index.html b/landing/templates/landing/what_we_do/index.html new file mode 100644 index 0000000..6fd8241 --- /dev/null +++ b/landing/templates/landing/what_we_do/index.html @@ -0,0 +1,155 @@ +{% load static %} +
+
+
+

+ What We Do +

+
+

+ In June 31-July 1 2012, we held the first ever PyCon Philippines. +

+

+ Today, we organize the yearly PyCon and also hold regular meet-ups, public python trainings and kaizend throughout the year. +

+

+ Whether you're new to programming, an experienced practitioner, or just plain curious what this Python programming language is about, you're much welcome to join this community! +

+
+
+ + +
+
+

+ Our Events +

+
+ + +
+
+
+

+ +

+
+
+
+

+ The goal of the conference is to provide a venue where the Python programming language and surrounding technologies can be explored, discussed and exercised. +

+

+ We gather software engineers, programming enthusiasts, startup founders, corporate IT decision makers, students and IT educators in a 2-day event where we can collaborate and learn from each other. +

+
+
+
+
+
+

+ +

+
+
+
+

+ Regular meetups where professionals and enthusiasts share and talk about Python. +

+
+
+
+
+
+

+ +

+
+
+
+

+ Low-cost Python Trainings covering various topics. +

+
+
+
+
+
+

+ +

+
+
+
+

+ A mastermind group and exclusive training program for core volunteers. This program is aimed to develop technically competent leaders and systematize succession plans for PythonPH. +

+
+
+
+
+ + + +
+ + +
+ +
+ +
+
+
diff --git a/landing/templates/landing/why_python.html b/landing/templates/landing/why_python.html new file mode 100644 index 0000000..57fb1f4 --- /dev/null +++ b/landing/templates/landing/why_python.html @@ -0,0 +1,27 @@ +
+
+
+

+ Why Python? +

+
+

+ We believe Python changes lives. +

+ +

+ It gives everyday people the tools to create, solve problems, and share ideas with the world—while also powering industries from AI and data science to cloud computing and automation. +

+ +

+ From students building their first websites, to small teams streamlining workflows, to researchers and companies tackling big challenges—Python is there. +

+ +

+ Simple enough to start with, powerful enough to shape the future. + And at PythonPH, we see it every day in our community: people learning, teaching, and creating together. That’s the heart of why we do what we do. +

+
+
+
+
diff --git a/landing/views.py b/landing/views.py index ae41cde..914fed0 100644 --- a/landing/views.py +++ b/landing/views.py @@ -1,14 +1,9 @@ from django.shortcuts import render - -from .models import Event, Section -from organisation.models import Volunteer, Commitee +from organisation.models import Commitee def index(request): - events = Event.available_objects.all() - sections = Section.available_objects.all() - board_members = Volunteer.available_objects.filter(is_staff=True) - commitees = Commitee.available_objects.prefetch_related('volunteers') + committees = Commitee.available_objects.prefetch_related('volunteers') python_hour = [ { "link": "#", @@ -39,10 +34,57 @@ def index(request): } ] + board_members = [ + { + "name": "Matt Lebrun", + "position": "President", + "image": "landing/assets/img/people/matt.jpg", + }, + { + "name": "Micaela Reyes", + "position": "Director of Operations", + "image": "landing/assets/img/people/micaela.jpg", + }, + { + "name": "Sony Valdez", + "position": "Director of Community Relations", + "image": "landing/assets/img/people/shuny.jpg", + }, + { + "name": "Zorex Salvo", + "position": "Director of Engineering", + "image": "landing/assets/img/people/zorex.jpg", + }, + { + "name": "Ciara Bautista", + "position": "Treasurer", + "image": "landing/assets/img/people/ciara.jpg", + }, + { + "name": "Rodney Lei Estrada", + "position": "Board of Trustee and Corporate Secretary", + "image": "landing/assets/img/people/rodney.jpg", + }, + { + "name": "Cyrus Mante", + "position": "Board of Trustee", + "image": "landing/assets/img/people/cyrus.jpg", + }, + + { + "name": "Lalaine Diok", + "position": "Director of Marketing", + "image": "landing/assets/img/people/lalaine.jpg", + }, + { + "name": "Alex Reyes", + "position": "Director of Design", + "image": "landing/assets/img/people/alex.jpg", + }, + ] + return render(request, 'landing/index.html', { - 'events': events, - 'sections': sections, - 'board_members': board_members, - 'commitees': commitees, + 'committees': committees, 'python_hour': python_hour, + 'board_members': board_members }) diff --git a/pythonph/settings.py b/pythonph/settings.py index c52c269..bb67bb8 100644 --- a/pythonph/settings.py +++ b/pythonph/settings.py @@ -22,7 +22,6 @@ 'compressor', 'raven.contrib.django.raven_compat', 'markdownx', - 'adminsortable2', 'ckeditor', # pythonph 'landing', @@ -80,9 +79,6 @@ COMPRESS_ENABLED = True COMPRESS_OFFLINE = not DEBUG COMPRESS_OUTPUT_DIR = 'cache' -COMPRESS_PRECOMPILERS = ( - ('text/x-scss', 'django_libsass.SassCompiler'), -) TASTYPIE_DEFAULT_FORMATS = ['json'] diff --git a/requirements.txt b/requirements.txt index 0027c6b..e7a5b4c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,11 +3,9 @@ gunicorn==20.0.4 psycopg2-binary==2.8.5 Pillow==7.1.1 -django-admin-sortable2 django-ckeditor==6.0.0 django-compressor==2.4 django-debug-toolbar==2.2 -django-libsass==0.8 django-markdownx==3.0.1 django-storages==1.6.5 django-taggit==1.2.0