Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
db64fd4
Modification : initial commit, update setup.cfg and .gitignore, add f…
Tit-Co May 18, 2026
d401c94
File change and modification : make migrations into two new apps ; up…
Tit-Co May 18, 2026
ac51dad
Modification : update code after flake8 linting report in order to co…
Tit-Co May 19, 2026
0c5b955
Modification : fix admin plural issue, manage/customize 404 and 500 e…
Tit-Co May 19, 2026
e607c71
Modification : add docstrings and code typing
Tit-Co May 19, 2026
03322c7
File change and modification : add tests packages and modules, update…
Tit-Co May 20, 2026
f6967ac
Modification : add monitoring with Sentry, update tests fixtures, upd…
Tit-Co May 20, 2026
bbd4f96
Modification : update tests before CI/CD pipeline
Tit-Co May 20, 2026
58fecf5
Modification : update setup and gitignore files
Tit-Co May 22, 2026
518f4d5
File change : Create django.yml
Tit-Co May 22, 2026
b139986
Modification : update yaml for CI
Tit-Co May 22, 2026
7ab2b81
Modification : update yaml for CI
Tit-Co May 22, 2026
c36df22
Modification : update yaml for CI
Tit-Co May 22, 2026
b2f8253
Modification : update tests with refactoring in several modules
Tit-Co May 23, 2026
1e94a7d
Modification : update cfg files to run tests*.py
Tit-Co May 23, 2026
06ceb75
Modification : update tests with refactoring in several modules
Tit-Co May 23, 2026
758f28e
Modification : add dockerfile file, .dockerignore file and update ci/…
Tit-Co May 25, 2026
dde127b
Modification : add dockerfile file, .dockerignore file and update ci/…
Tit-Co May 25, 2026
dd89723
Modification : add dockerfile file, .dockerignore file and update ci/…
Tit-Co May 25, 2026
5261e36
Modification : update deployment in .yml file
Tit-Co May 25, 2026
72a96d4
Modification : update deployment in .yml file
Tit-Co May 25, 2026
d72f561
Modification : update deployment in .yml file
Tit-Co May 25, 2026
19ffc10
Modification : update deployment in .yml file
Tit-Co May 25, 2026
f7d99e8
Modification : update deployment in .yml file
Tit-Co May 25, 2026
6647ab1
Modification : update dockerfile for testing purpose
Tit-Co May 25, 2026
062b59c
Modification : update deployment in .yml file
Tit-Co May 25, 2026
2ee3b12
Modification : update deployment in .yml file
Tit-Co May 25, 2026
703183f
Modification : update deployment in .yml file
Tit-Co May 25, 2026
3f23cb3
Modification : update deployment in .yml file
Tit-Co May 25, 2026
3876f91
Modification : update readme.md
Tit-Co May 26, 2026
d973b83
Modification : add heroku.yml to fix heroku deployment issue
Tit-Co May 26, 2026
a8cb1d1
Modification : add .readthedocs.yaml file for ReadTheDocs documentation
Tit-Co May 26, 2026
4206d15
File change and Modification : add conf.py in docs folder and require…
Tit-Co May 26, 2026
38626ee
Modification : update rtd source files
Tit-Co May 26, 2026
975c13b
Modification : update rtd source files
Tit-Co May 26, 2026
266a0cd
File change : add rtd documentation
Tit-Co May 28, 2026
98b10fa
Modification : minor templates update to move base templates into oc_…
Tit-Co May 28, 2026
ceef88f
Modification : minor templates update to move base templates into oc_…
Tit-Co May 28, 2026
83e36af
Modification : minor templates update to move base templates into oc_…
Tit-Co May 28, 2026
f501489
Modification : minor templates update to move base templates into oc_…
Tit-Co May 28, 2026
7c670f9
Modification : update structure screenshot
Tit-Co May 28, 2026
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
Binary file added .coverage
Binary file not shown.
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[run]
omit =
*/tests.py
*/tests/*
*/test_*.py
*/tests_*.py
*/migrations/*
*/apps.py
*/__init__.py
*/admin.py
*/asgi.py
*/wsgi.py
*/settings.py
26 changes: 26 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
node_modules/
vendor/
__pycache__/
*.pyc

.git/
.gitignore
.vscode/
.idea/
*.swp

dist/
build/
*.log

.env
.env.local
*.pem
*.key
secrets/
.npmrc
.pypirc
kubeconfig

cov_html
flake8-report
106 changes: 106 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: OC Lettings site CI/CD

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
ci:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run Lint
run: |
flake8

- name: Upload flake8 report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: flake8-report
path: flake8-report/
if-no-files-found: warn
retention-days: 5

- name: Run Tests
run: |
pytest

- name: Upload coverage report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: cov_html
path: cov_html/
if-no-files-found: warn
retention-days: 5

deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: ci
environment: production
concurrency: production

steps:
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ secrets.DOCKER_USERNAME }}/oc_lettings_site

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v4
with:
no-cache: true
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install.sh | sh

- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.15.15
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "orange-county-lettings"
heroku_email: ${{ secrets.HEROKU_USER_EMAIL }}
usedocker: true
docker_build_args: |
SENTRY_KEY
env:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Temp files
**/__pycache__
*.pyc

# Virtual environment
venv
env
env-docs

# Idea
.idea

# Database
backup.sqlite3
oc-lettings-site_old.sqlite3

# .env file
.env
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.10"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally, but recommended,
# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ./requirements-docs.txt
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.10-slim

WORKDIR /app

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBUG=$DEBUG

COPY ./requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN python manage.py collectstatic --noinput

EXPOSE 8000

CMD gunicorn oc_lettings_site.wsgi:application --bind 0.0.0.0:${PORT:-8000}
Loading