FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
django-basic-apps/basic/tools/context_processors.py at master · libinpython/django-basic-apps · GitHub
libinpython
django-basic-apps
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
django-basic-apps
/
basic
/
tools
/
context_processors.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (13 loc) · 364 Bytes
Breadcrumbs
django-basic-apps
/
basic
/
tools
/
context_processors.py
Copy path
File metadata and controls
18 lines (13 loc) · 364 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from
datetime
import
datetime
from
django
.
conf
import
settings
from
django
.
contrib
.
sites
.
models
import
Site
def
site
(
request
):
"""
Adds the current site to the context.
"""
return
{
'site'
:
Site
.
objects
.
get
(
id
=
settings
.
SITE_ID
)}
def
now
(
request
):
"""
Add current datetime to template context.
"""
return
{
'now'
:
datetime
.
now
()}
Back
|
FazBrowse Home
|
New Git URL