Skip to content

Commit 979c53a

Browse files
committed
Corectare problema cu locales pe windows in stil "la tara mere". Ca Python nu stie sa scrie marti calumea, ceapa lui.
1 parent 06ac765 commit 979c53a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
TIMEZONE = 'Europe/Bucharest'
2020

2121
LOCALE = 'rom', 'ro_RO',
22-
DEFAULT_DATE_FORMAT = '%A, %d %B %Y'
22+
DEFAULT_DATE_FORMAT = '%d %B %Y'
2323
DEFAULT_LANG = 'ro'
2424

2525
FEED_ALL_RSS = 'feeds/all.rss.xml'

theme/templates/article.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,24 @@
99
{% block content %}
1010
<div itemscope itemtype="http://schema.org/Article">
1111
<h1 class="title" itemprop="name">{{ article.title }}</h1>
12-
<p class="date"> {{ article.locale_date }}</p>
12+
<p class="date">
13+
{% if article.date.isoweekday() == 1 %}
14+
Luni,
15+
{% elif article.date.isoweekday() == 2 %}
16+
Marți,
17+
{% elif article.date.isoweekday() == 3 %}
18+
Miercuri,
19+
{% elif article.date.isoweekday() == 4 %}
20+
Joi,
21+
{% elif article.date.isoweekday() == 5 %}
22+
Vineri,
23+
{% elif article.date.isoweekday() == 6 %}
24+
Sâmbătă,
25+
{% elif article.date.isoweekday() == 7 %}
26+
Duminică,
27+
{% endif %}
28+
{{ article.locale_date }}
29+
</p>
1330
<blockquote class="attributes">
1431
{% if article.category %}
1532
<p class="location">Locație:

0 commit comments

Comments
 (0)