-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
31b513f
commit 835c22b
Showing
12 changed files
with
147 additions
and
67 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Empty file.
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,10 @@ | ||
from django.apps import AppConfig | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class SiteConfig(AppConfig): | ||
name = "pycon_portugal_2022.site" | ||
verbose_name = _("SitePackage") | ||
|
||
def ready(self): | ||
pass |
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,61 @@ | ||
|
||
def links(request): | ||
return { | ||
'home': '/home/', | ||
'site_menu': { | ||
'Talks': { | ||
'dropdown': 'true', | ||
'submenu': { | ||
'Schedule': '/talks/schedule/', | ||
'Cfp': '/talks/cfp/', | ||
'Selection process': '/talks/selection_process/', | ||
}, | ||
}, | ||
'Information': { | ||
'dropdown': 'true', | ||
'submenu': { | ||
'Venue': '/information/venue/', | ||
'Swag bag': '/information/swag_bag/', | ||
'Grants': '/information/grants/', | ||
'Django girls': '/information/django_girls/', | ||
'Sprints': '/information/sprints/', | ||
'Announcements': '/information/announcements/', | ||
}, | ||
}, | ||
'Sponsors': { | ||
'dropdown': 'true', | ||
'submenu': { | ||
'Sponsors': '/sponsors/sponsors/', | ||
'Contributors': '/sponsors/contributors/', | ||
'Sponsorship': '/sponsors/sponsorship/', | ||
}, | ||
}, | ||
'Conduct': { | ||
'dropdown': 'true', | ||
'submenu': { | ||
'Code of conduct': '/conduct/code_of_conduct/', | ||
'Response guide': '/conduct/response_guide/', | ||
'Privacy guide': '/conduct/privacy_guide/', | ||
}, | ||
}, | ||
'Jobs': { | ||
'dropdown': 'false', | ||
'href': '/jobs/', | ||
}, | ||
'About': { | ||
'dropdown': 'true', | ||
'submenu': { | ||
'Tickets': '/about/tickets/', | ||
'Contact': '/about/contact/', | ||
'Credits': '/about/credits/', | ||
}, | ||
}, | ||
}, | ||
'social_media': { | ||
'twitter': 'https://twitter.com/', | ||
'slack': 'https://slack.com/', | ||
'youtube': 'https://youtube.com/', | ||
'linkedin': 'https://linked.in/', | ||
'github': 'https://github.com/pyconpt/2022/', | ||
} | ||
} |
Empty file.
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,24 @@ | ||
from django import template | ||
from django.template.defaultfilters import stringfilter | ||
|
||
import markdown as md | ||
|
||
register = template.Library() | ||
|
||
|
||
@register.filter() | ||
@stringfilter | ||
def markdown(value): | ||
r = {} | ||
f = open(value, 'r') | ||
f = f.read() | ||
m = md.Markdown(extensions = [ | ||
'extra', | ||
'nl2br', | ||
'sane_lists', | ||
'meta', | ||
'toc', | ||
]) | ||
r['html'] = m.convert(f) | ||
r['meta'] = m.Meta | ||
return r |
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,29 @@ | ||
from django.shortcuts import render | ||
from os import walk | ||
|
||
from config.settings.base import APPS_DIR | ||
|
||
|
||
def default_view(request, menu='home', submenu=None): | ||
path = APPS_DIR.__str__() + '/content/' + menu + ('/' + submenu if submenu else '') | ||
page = '' | ||
ctx = {} | ||
files = [] | ||
|
||
for dirpath, dirname, filenames in walk(path): | ||
files.extend(filenames) | ||
break | ||
|
||
ctx['files'] = [] | ||
for f in sorted(files): | ||
content = '%s/%s' % (path, f) | ||
ctx['files'].append(content) | ||
|
||
if menu == 'home': | ||
page += 'pages/' + menu | ||
elif len(files) == 0: | ||
page += '404' | ||
else: | ||
page += 'pages/' + 'default' | ||
|
||
return render(request, page + '.html', ctx) |
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