-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from moviepediafilms/feature/events
upgraded dependecies, added events seo
- Loading branch information
Showing
9 changed files
with
500 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
FROM python:3.8 | ||
FROM python:3.10 as base | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install --upgrade pip pipenv | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt requirements.txt | ||
COPY Pipfile Pipfile.lock ./ | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pipenv install --system --deploy --ignore-pipfile | ||
|
||
FROM base as dev | ||
RUN pipenv install --system --deploy --ignore-pipfile --dev | ||
|
||
FROM base as prod | ||
COPY . . | ||
|
||
EXPOSE 80 | ||
ENTRYPOINT ["/app/run.sh"] | ||
CMD ["/app/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
flask = "*" | ||
gunicorn = "*" | ||
flask-sqlalchemy = "*" | ||
mysqlclient = "*" | ||
|
||
[dev-packages] | ||
black = "*" | ||
flake8 = "*" | ||
|
||
[requires] | ||
python_version = "3.10" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Start server | ||
echo "Starting server" | ||
flask run --host=0.0.0.0 --port=8082 --reload | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'base.html' %} {% block head %} | ||
<title>{{ meta.title | default("Moviepedia Films") }}</title> | ||
<meta name="description" content="{{meta.about}}" /> | ||
<meta itemprop="description" content="{{meta.about}}" /> | ||
<meta name="keywords" content="{{meta.keywords}}" /> | ||
<meta name="author" content="Moviepedia Films" /> | ||
<meta itemprop="author" content="Moviepedia Films" /> | ||
<meta itemprop="image" content="{{base_url}}/{{meta.image}}" /> | ||
<meta property="og:site_name" content="Moviepedia Films" /> | ||
<meta property="og:title" content="Moviepedia Films | {{meta.title}}" /> | ||
<meta itemprop="og:title" content="Moviepedia Films | {{meta.title}}" /> | ||
<meta property="og:description" content="{{meta.about}}" /> | ||
<meta itemprop="og:description" content="{{meta.about}}" /> | ||
<meta property="og:url" content="{{base_url}}/events/{{meta.slug}}" /> | ||
<meta itemprop="og:url" content="{{base_url}}/events/{{meta.slug}}" /> | ||
<meta property="og:image" content="{{base_url}}/{{ meta.poster or '' }}" /> | ||
<meta itemprop="og:image" content="{{base_url}}/{{ meta.poster or '' }}" /> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:image:alt" content="{{meta.title}}" /> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from flask import Blueprint, render_template, Response | ||
from share.models import Movie | ||
|
||
app = Blueprint("event_app", __name__, url_prefix="/events") | ||
|
||
|
||
@app.route("/<string:slug>") | ||
def movie_detail(slug): | ||
events = { | ||
"iim-rohtak-2024": { | ||
"title": "IIM Rohtak 2024", | ||
"keywords": "IIM Rohtak 2024, IIM Rohtak, Moviepedia, Moviepediafilms, Moviepedia 2024", | ||
"about": "IIM Rohtak 2024 is a movie event organized by Moviepediafilms. It is a movie event for the students across the country.", | ||
"image": "img/events/iim-rohtak-2024.png", | ||
"slug": slug, | ||
"poster": "img/events/iim-rohtak-2024.png", | ||
} | ||
} | ||
meta = events.get(slug, None) | ||
if not meta: | ||
return Response("Not found", status=404) | ||
return render_template("events.html", meta=meta) |