-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
11,601 additions
and
4 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
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,3 +1,14 @@ | ||
# parlance.urls | ||
# Defines all of the routes and associated views with the urls for the app. | ||
# | ||
# Author: Benjamin Bengfort <[email protected]> | ||
# Created: Tue Oct 01 21:19:17 2024 -0500 | ||
# | ||
# Copyright (C) 2024 Rotational Labs, Inc. | ||
# For license information, see LICENSE | ||
# | ||
# ID: urls.py [] [email protected] $ | ||
|
||
""" | ||
URL configuration for parlance project. | ||
|
@@ -14,9 +25,22 @@ | |
1. Import the include() function: from django.urls import include, path | ||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | ||
""" | ||
|
||
########################################################################## | ||
## Imports | ||
########################################################################## | ||
|
||
from django.contrib import admin | ||
from django.urls import path | ||
|
||
from parlance.views import Dashboard | ||
|
||
|
||
########################################################################## | ||
## URL Patterns | ||
########################################################################## | ||
|
||
urlpatterns = [ | ||
path("", Dashboard.as_view(), name="dashboard"), | ||
path('admin/', admin.site.urls), | ||
] |
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,25 @@ | ||
# parlance.views | ||
# Site level views and pages not associated with a specific app. | ||
# | ||
# Author: Benjamin Bengfort <[email protected]> | ||
# Created: Tue Oct 01 21:17:47 2024 -0500 | ||
# | ||
# Copyright (C) 2024 Rotational Labs, Inc. | ||
# For license information, see LICENSE | ||
# | ||
# ID: views.py [] [email protected] $ | ||
|
||
""" | ||
Site level views and pages not associated with a specific app. | ||
""" | ||
|
||
########################################################################## | ||
## Imports | ||
########################################################################## | ||
|
||
from django.views.generic import TemplateView | ||
|
||
|
||
class Dashboard(TemplateView): | ||
|
||
template_name = "site/dashboard.html" |
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,18 @@ | ||
# parley.templatetags | ||
# Custom template tags and filters for parley views. | ||
# | ||
# Author: Benjamin Bengfort <[email protected]> | ||
# Created: Tue Oct 01 21:46:28 2024 -0500 | ||
# | ||
# Copyright (C) 2024 Rotational Labs, Inc. | ||
# For license information, see LICENSE | ||
# | ||
# ID: __init__.py [] [email protected] $ | ||
|
||
""" | ||
Custom template tags and filters for accounting views. | ||
""" | ||
|
||
########################################################################## | ||
## Imports | ||
########################################################################## |
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,35 @@ | ||
# parley.templatetags.gravatar | ||
# Helpers for user profile images | ||
# | ||
# Author: Benjamin Bengfort <[email protected]> | ||
# Created: Sat Dec 28 15:58:52 2019 -0600 | ||
# | ||
# ID: gravatar.py [] [email protected] $ | ||
|
||
""" | ||
Helpers for user profile images. | ||
TODO: move to profiles specific app when created. | ||
""" | ||
|
||
########################################################################## | ||
## Imports | ||
########################################################################## | ||
|
||
from hashlib import md5 | ||
from django import template | ||
|
||
register = template.Library() | ||
|
||
|
||
########################################################################## | ||
## Template Tags | ||
########################################################################## | ||
|
||
|
||
@register.filter(name="gravatar") | ||
def gravatar(user, size=64): | ||
email = str(user.email.strip().lower()).encode("utf-8") | ||
email_hash = md5(email).hexdigest() | ||
url = "//www.gravatar.com/avatar/{0}?s={1}&d=identicon&r=PG" | ||
return url.format(email_hash, size) |
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,32 @@ | ||
# parley.templatetags.version | ||
# Adds version information to the page. | ||
# | ||
# Author: Benjamin Bengfort <[email protected]> | ||
# Created: Tue Oct 01 21:52:22 2024 -0500 | ||
# | ||
# ID: version.py [] [email protected] $ | ||
|
||
""" | ||
Adds version information to the page. | ||
TODO: move to parlance specific app when created. | ||
""" | ||
|
||
########################################################################## | ||
## Imports | ||
########################################################################## | ||
|
||
from parlance import get_version | ||
from django import template | ||
|
||
register = template.Library() | ||
|
||
|
||
########################################################################## | ||
## Template Tags | ||
########################################################################## | ||
|
||
|
||
@register.simple_tag() | ||
def version(): | ||
return get_version(short=True, revision=False) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.