Skip to content

Take summer/wintertime into account for displaying dates #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _ops/fix_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def parse_args():


def find_files(startpath, extensions):
for (dirpath, _, filenames) in os.walk(startpath):
for dirpath, _, filenames in os.walk(startpath):
for filename in filenames:
if os.path.splitext(filename)[-1].lower() in extensions:
yield os.path.join(dirpath, filename)
Expand Down
1 change: 0 additions & 1 deletion check_input/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
Expand Down
1 change: 0 additions & 1 deletion mainpage/templatetags/wl_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def _classify_link(tag):
return

if check_for_missing_wikipages and href.startswith("/wiki/"):

# Check for missing wikilink /wiki/PageName[/additionl/stuff]
# Using href because we need cAsEs here
article_name = urllib.parse.unquote(tag["href"][6:].split("/", 1)[0])
Expand Down
1 change: 0 additions & 1 deletion mainpage/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def virus_scan(uploaded_file):


def check_utf8mb3_preview(text):

for c in text:
if len(c.encode()) > 3:
return True
Expand Down
15 changes: 9 additions & 6 deletions mainpage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import locale
import codecs
import random
from datetime import datetime


def mainpage(request):
Expand Down Expand Up @@ -223,16 +224,18 @@ def custom_http_500(request):

def view_locale(request):
loc_info = (
"getlocale: "
"Server time: "
+ datetime.now().isoformat(" ", "seconds")
+ "<br /><br />getlocale: "
+ str(locale.getlocale())
+ "<br/>getdefaultlocale(): "
+ "<br />getdefaultlocale(): "
+ str(locale.getdefaultlocale())
+ "<br/>fs_encoding: "
+ "<br />fs_encoding: "
+ str(sys.getfilesystemencoding())
+ "<br/>sys default encoding: "
+ "<br />sys default encoding: "
+ str(sys.getdefaultencoding())
+ "<br><br> Environment variables:"
+ "<br>DISPLAY: "
+ "<br /><br /> Environment variables:"
+ "<br />DISPLAY: "
+ os.environ.get("DISPLAY", "Not set")
)
return HttpResponse(loc_info)
1 change: 0 additions & 1 deletion news/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
Expand Down
1 change: 0 additions & 1 deletion news/migrations/0002_auto_20170417_1857.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("news", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion news/migrations/0003_auto_20221208_1758.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("news", "0002_auto_20170417_1857"),
]
Expand Down
5 changes: 0 additions & 5 deletions news/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class NewsList(ArchiveIndexView):

template_name = "news/category_posts.html"
model = Post
date_field = "publish"
Expand All @@ -24,29 +23,25 @@ def get_context_data(self, **kwargs):


class YearNews(YearArchiveView):

model = Post
template_name = "news/post_archive_year.html"
date_field = "publish"
make_object_list = True


class MonthNews(MonthArchiveView):

model = Post
template_name = "news/post_archive_month.html"
date_field = "publish"


class NewsDetail(DateDetailView):

model = Post
template_name = "news/post_detail.html"
date_field = "publish"


class CategoryView(ListView):

template_name = "news/category_posts.html"

def get_context_data(self, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion notification/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
Expand Down
1 change: 0 additions & 1 deletion notification/migrations/0002_auto_20170417_1857.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("notification", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion notification/migrations/0003_auto_20190409_0924.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("notification", "0002_auto_20170417_1857"),
]
Expand Down
2 changes: 0 additions & 2 deletions notification/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class LanguageStoreNotAvailable(Exception):


class NoticeType(models.Model):

label = models.CharField(_("label"), max_length=40)
display = models.CharField(
_("display"), max_length=50, help_text=_("Used as subject when sending emails.")
Expand Down Expand Up @@ -363,7 +362,6 @@ def get_for(self, observed, observer, signal):


class ObservedItem(models.Model):

user = models.ForeignKey(User, verbose_name=_("user"), on_delete=models.CASCADE)

content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
Expand Down
1 change: 0 additions & 1 deletion privacy_policy/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion privacy_policy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class PrivacyPolicy(models.Model):

language = models.CharField(
default="English",
max_length=30,
Expand Down
1 change: 0 additions & 1 deletion pybb/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class PybbConfig(AppConfig):

name = "pybb"
verbose_name = "Pybb"

Expand Down
1 change: 0 additions & 1 deletion pybb/markups/mypostmarkup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def annotate_link(self, domain):

class CodeTagNoBreak(postmarkup.CodeTag):
def render_open(self, parser, node_index):

contents = self._escape(self.get_contents(parser))
contents = RE_FIRST_LF.sub("", contents)
self.skip_contents(parser)
Expand Down
Loading