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 413a5f9..94f3258 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,17 @@ -FROM python:3.8.1 +FROM python:3.8.18 -RUN apt-get -y update -RUN apt-get -y upgrade -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/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/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/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 565116d..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,154 +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 %}
+ 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..cf1bce9 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,62 @@ 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": "Freilla Mae Espinola", + "position": "Director of Diversity and Outreach", + "image": "landing/assets/img/people/freilla.png", + }, + { + "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 b3c93b1..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', diff --git a/requirements.txt b/requirements.txt index ff16151..e7a5b4c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,6 @@ gunicorn==20.0.4 psycopg2-binary==2.8.5 Pillow==7.1.1 -django-admin-sortable2==2.1.4 django-ckeditor==6.0.0 django-compressor==2.4 django-debug-toolbar==2.2