Skip to content

Commit

Permalink
fixed post and added sort_by
Browse files Browse the repository at this point in the history
  • Loading branch information
el-agua committed Apr 25, 2024
1 parent 73f08c4 commit 5e52103
Show file tree
Hide file tree
Showing 211 changed files with 36,859 additions and 36,818 deletions.
58 changes: 29 additions & 29 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Docker
Dockerfile
Dockerfile.dev
.dockerignore

# git
.circleci
.git
.gitignore
.gitmodules
.env
**/*.md
LICENSE

# Misc
.coverage
**/__pycache__/
tests/
*.sqlite3
postgres/

# Dev
.vscode

# MacOS
.DS_Store

# PCX
pcr-backup
# Docker
Dockerfile
Dockerfile.dev
.dockerignore

# git
.circleci
.git
.gitignore
.gitmodules
.env
**/*.md
LICENSE

# Misc
.coverage
**/__pycache__/
tests/
*.sqlite3
postgres/

# Dev
.vscode

# MacOS
.DS_Store

# PCX
pcr-backup
40 changes: 20 additions & 20 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM pennlabs/django-base:9c4f31bf1af44219d0f9019271a0033a222291c2-3.10.1

LABEL maintainer="Penn Labs"

# Copy project dependencies
COPY Pipfile* /app/

# Install project dependencies
RUN pipenv install --system --deploy

# Copy project files
COPY . /app/

ENV DJANGO_SETTINGS_MODULE PennCourses.settings.production
ENV SECRET_KEY 'temporary key just to build the docker image'

COPY ./scripts/asgi-run /usr/local/bin/

# Collect static files
RUN python3 /app/manage.py collectstatic --noinput
FROM pennlabs/django-base:9c4f31bf1af44219d0f9019271a0033a222291c2-3.10.1

LABEL maintainer="Penn Labs"

# Copy project dependencies
COPY Pipfile* /app/

# Install project dependencies
RUN pipenv install --system --deploy

# Copy project files
COPY . /app/

ENV DJANGO_SETTINGS_MODULE PennCourses.settings.production
ENV SECRET_KEY 'temporary key just to build the docker image'

COPY ./scripts/asgi-run /usr/local/bin/

# Collect static files
RUN python3 /app/manage.py collectstatic --noinput
28 changes: 14 additions & 14 deletions backend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM pennlabs/django-base:f0f05216db7c23c1dbb5b95c3bc9e8a2603bf2fd

LABEL maintainer="Penn Labs"

WORKDIR /backend

# Copy project dependencies
COPY Pipfile* ./

# Install backend dependencies
RUN pipenv install --dev

# Alias runserver command
RUN echo 'alias runserver="python manage.py runserver 0.0.0.0:8000"' >> ~/.bashrc
FROM pennlabs/django-base:f0f05216db7c23c1dbb5b95c3bc9e8a2603bf2fd
LABEL maintainer="Penn Labs"
WORKDIR /backend
# Copy project dependencies
COPY Pipfile* ./
# Install backend dependencies
RUN pipenv install --dev
# Alias runserver command
RUN echo 'alias runserver="python manage.py runserver 0.0.0.0:8000"' >> ~/.bashrc
8 changes: 4 additions & 4 deletions backend/PennCourses/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .celery import app as celery_app


__all__ = ("celery_app",)
from .celery import app as celery_app


__all__ = ("celery_app",)
16 changes: 8 additions & 8 deletions backend/PennCourses/asgi.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os

from django.core.asgi import get_asgi_application


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PennCourses.settings.production")

application = get_asgi_application()
import os

from django.core.asgi import get_asgi_application


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PennCourses.settings.production")

application = get_asgi_application()
48 changes: 24 additions & 24 deletions backend/PennCourses/celery.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import os

from celery import Celery
from django.conf import settings


# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PennCourses.settings.development")

app = Celery("PennCourses", broker=settings.MESSAGE_BROKER_URL)

# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix.
app.config_from_object("django.conf:settings", namespace="CELERY")

# Load task modules from all registered Django app configs.
app.autodiscover_tasks()


@app.task(bind=True)
def debug_task(self):
print("Request: {0!r}".format(self.request))
import os

from celery import Celery
from django.conf import settings


# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PennCourses.settings.development")

app = Celery("PennCourses", broker=settings.MESSAGE_BROKER_URL)

# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix.
app.config_from_object("django.conf:settings", namespace="CELERY")

# Load task modules from all registered Django app configs.
app.autodiscover_tasks()


@app.task(bind=True)
def debug_task(self):
print("Request: {0!r}".format(self.request))
Loading

0 comments on commit 5e52103

Please sign in to comment.