home

Fix bugs in new wishlist code

Author
Maarten Vangeneugden
Date
Feb. 10, 2023, 3:16 p.m.
Hash
79f82af0c61e7a7ac67a73fe33a4692c4307cd2c
Parent
64a4b8c6a3bc093d814d0c87fb3076899e483bf7
Modified files
templates/about/about.djhtml
templates/about/main_content.djhtml
templates/about/verlanglijst.djhtml
urls.py
views.py

templates/about/about.djhtml

2 additions and 3 deletions.

View changes Hide changes
1
1
{% load i18n %}
2
2
{% load static %}
3
3
4
4
{% block title %}{% translate "About myself" %}{% endblock title %}
5
5
{% block description %}{% blocktranslate trimmed %}A page where I talk about myself, what I
6
6
	do, what I (dis)like, ...{% endblocktranslate %}
7
7
{% endblock description %}
8
8
{% block main %}
9
9
{# TODO sections: languages "link naar paper"; meer redenen voor mijn website en
10
-
waarom ik trots ben daarop #}
11
-
<section>
+
10
<section>
12
11
<p>
13
12
    {% blocktranslate trimmed %}Hello! Thanks for stopping by! As I mentioned on my
14
13
    homepage, My name is Maarten. I'm a {{ age }} years old student, and I dabble in
15
14
    a lot of things that I enjoy doing.
16
15
    Some of these things I put on display here, my website, for the world to
17
16
    see!<br>
18
17
    On this page, I talk a bit about myself, my daily routine, what I do, my
19
18
    view on life, ...
20
19
    It's not all-encompassing, and I've narrowed it down quite a bit to the most
21
20
    important things. I share more about me (and other interesting things) on 
22
21
    <a href="{% url 'blog-index' %}">my blog</a>, so be sure to check that out
23
-
    as well!
+
22
    as well!
24
23
    {% endblocktranslate %}
25
24
</p>
26
25
27
26
<h3 id="kodumuli">{% translate "Hacking" %}</h3>
28
27
<p> 
29
28
    {% blocktranslate trimmed %}What I do most at work and in my spare time is
30
29
    hacking/coding. It's kind of my jam. I've 
31
30
        been working and playing with computers since I was a toddler, so it
32
31
        shouldn't come as a surprise that that became a big hobby for me.
33
32
        I'm doing a lot of other things as well, but they're either not really well
34
33
        enough developed to talk about, or too minor to mention.
35
34
    {% endblocktranslate %}
36
35
</p>
37
36
<h3 id="muziko">{% translate "Music" %}</h3>
38
37
<p>
39
38
    {% blocktranslate trimmed %}I don't like rap and pop music. I get annoyed by
40
39
        hearing most of it, so I try to avoid it. Especially recent popular songs can
41
40
        irritate me to no end, almost without exception. Luckily I don't get that much
42
41
        joy out of listening music anyway, so I don't feel like I miss out a lot.<br>
43
42
    {% endblocktranslate %}
44
43
</p>
45
44
46
45
<h3 id="manĝaĵo">{% translate "Food" %}</h3>
47
46
<p>
48
47
    {% blocktranslate trimmed %}I'm an omnivore, and eat everything that I like to eat. I like
49
48
        a variety of different things, but I heavily dislike pureed food, beans
50
49
        and peas, and complex desserts. I'll seldom turn down things like
51
50
        hamburgers, pizzas, ...<br>
52
51
        Spaghettis (and other pastas) are extremely satisfying for me to eat, because
53
52
        practically
54
53
        everyone knows how to make it, but almost every time I try someone's version,
55
54
        it's a different taste. I love how many varieties of all the pastas exist!<br>
56
55
        This is quite the opposite with fries: Only Belgians seem to know how
57
56
        fries are served properly. I've seen (and sadly, tasted) the ways fries
58
57
        are prepared abroad, and it's often an insult against our national
59
58
        pride, so much so that I avoid eating them outside of Belgium.<br>
60
59
        I enjoy Belgian fries a lot, but I am picky about them. I consider my portion
61
60
        "great" if fresh potatoes are used, they're medium sized, and well baked,
62
61
        topped off with a generous amount of (real) mayonnaise. Eating them with a
63
62
        <a href="https://en.wikipedia.org/wiki/Frikandel" target="_blank">frikandel</a>
64
63
        makes me feel like a true Belgian.<br>
65
64
        
66
65
        These days my diet is mostly vegetarian; I make an effort to restrict
67
66
        purchasing meat as much as possible. This definitely helps to reduce my
68
67
        carbon footprint. Even though vegetarian replacements are still
69
68
        incredibly expensive, I will keep buying them for the foreseeable
70
69
        future.
71
70
    {% endblocktranslate %}
72
71
</p>
73
72
74
73
<h3 id="narkotoj">{% translate "Drugs" %}</h3>
75
74
<p>
76
75
  {% blocktranslate trimmed %}I have banned recreational use of all drugs out of my life for as long as I
77
76
  can remember. This includes nicotine products and alcoholic beverages.<br>
78
77
  I do this for multiple reasons:
79
78
  <ul>
80
79
	<li>I don't believe drugs are necessary to have fun. When I'm with friends
81
80
	they may be drinking alcohol, but I enjoy my time just as much with
82
81
	  non-alcoholic drinks like sodas.</li>
83
82
	<li>Drugs are unhealthy. Most of them cause damage to organs, and can badly
84
83
        affect the body long-term. I have no desire for any of that.</li>
85
84
	<li>For social purposes, it's always easy that I am the person that's
86
85
	sober. This can be for multiple reasons; an emergency, being the driver of
87
86
	  the evening, ...</li>
88
87
	<li>Drugs alter the user's perception of, and actions in reality. I don't
89
88
	  have any need to go through that. I enjoy being sober.</li>
90
89
  </ul>
91
90
  That being said, I do see why people enjoy them, and I've read about how
92
91
  cannabis is sometimes used for medical purposes (which I would do as well
93
92
  should I need it, since that's not recreational), so I don't oppose to others
94
93
  using them, nor do I refrain from buying them if I know they will be consumed
95
94
  in moderation. I do oppose to usage that inflicts harm to others, or in
96
95
  general, forces other people to use it as well in a passive way.{% endblocktranslate %}
97
96
</p>
98
97
99
98
100
99
<h3 id="studoj">{% translate "Studies &amp; work" %}</h3>
101
100
<p>
102
101
    {% blocktranslate trimmed %}I hold an undergraduate Informatics degree from Hasselt University.
103
102
    (coloquially named UHasselt), and a graduate degree of Scientific
104
103
    Engineering Informatics from Ghent University, specialisation Artificial
105
104
    Intelligence.<br>
106
105
    Currently I'm employed as a doctorate researcher at the University of
107
106
    Antwerp. I chose this because I want to keep learning about informatics as
108
107
    much as possible, and researching it at a university is the best way to do
109
108
    that.
110
109
    {% endblocktranslate %}
111
110
</p>
112
111
<p>
113
112
  {% blocktranslate trimmed %}I cycle approximately 13 kilometres per day, because I use my
114
113
  bicycle to commute to work. I also use my bicycle for getting around in
115
114
  general. That way, I can combine my need for transport with my need to sport.
116
115
  This saves me a lot of time, because I don't have to spend it with going to a
117
116
  gym.
118
117
  {% endblocktranslate %}
119
118
</p>
120
119
<h3 id="politics">{% translate "Politics" %}</h3>
121
120
    {% blocktranslate trimmed %}I keep myself informed about political subjects that
122
121
    interest me. A list of some subjects I follow with hightened attention:
123
122
    <ul>
124
123
        <li>Law enforcement</li>
125
124
        <li>Public transport</li>
126
125
        <li>Climate mayhem</li>
127
126
        <li>Freedom and privacy</li>
128
127
        <li>Human rights</li>
129
128
        <li>Digital agenda</li>
130
129
        <li>Copyright abuse &amp; reform</li>
131
130
        <li>Belgian communautarian debate</li>
132
131
        <li>Governmental &amp; corporate accountability</li>
133
132
    </ul>
134
133
    I also hold opinions on many issues, which I believe to be rational (but
135
134
    who doesn't, right?), but I don't feel attached to a political orientation, nor do I
136
135
    change my viewpoint to better align with one. I will say that <em>in
137
136
    general</em> I tend to lean towards ideas that ecological parties and pirate
138
137
    parties often espouse. But again, my opinions might differ
139
138
    drastically. Do ask me if you would like to know more, I'm all for
140
139
    explaining.{% endblocktranslate %}
141
140
</p>
142
141
143
142
<h3 id="computing">{% translate "How I do my computing" %}</h3>
144
143
<p>
145
144
    {% blocktranslate trimmed %}It's what I do most, so for those interested, I
146
145
    figured I'd talk about how I do the things with computers =3{% endblocktranslate %}
147
146
</p>
148
147
<p>
149
148
    {% blocktranslate trimmed %}I have a reliable computer that I built myself, a
150
149
    companion laptop through Hasselt University, and a work laptop from the
151
150
    University of Antwerp. Both run
152
151
    <a href="https://archlinux.org" target="_blank">Arch</a>,
153
152
    the best
154
153
    <a href="https://GNU.org" target="_blank">GNU</a> distro out there.
155
154
    I do almost all my stuff in
156
155
    <a href="https://www.gnu.org/software/emacs/" target="_blank">GNU Emacs</a>, like
157
156
    programming, maintaining my diary, working, and system maitenance. 
158
157
    I sometimes also use
159
158
    <a  href="https://neovim.io" target="_blank">NeoVim</a>.
160
159
    &gt;80% of my work is text
161
160
    related, and terminals are just better at that than a fully fledged desktop
162
161
    environment.<br>
163
162
    Languages I prefer are
164
163
    <a href="https://en.wikipedia.org/wiki/C_%28programming_language%29" target="_blank">C</a>,
165
164
    <a href="https://www.python.org/" target="_blank">Python</a>,
166
165
    <a href="https://clojure.org" target="_blank">Clojure</a>,
167
166
    and (my current favourite)
168
167
    <a href="https://haskell.org" target="_blank">Haskell</a>. I'm still
169
168
    learning how to fully use the latter one, which is a very exicting journey.
170
169
    It almost feels like learning to program for the second time!<br>
171
170
    I run
172
171
    <a href="https://lineageos.org/" target="_blank">Lineage OS</a>
173
172
    on my phone (In laymen terms: It's basically
174
173
    a cool and slim Android/Linux version with next to no Google interference).<br>
175
174
    Code repositories are always
176
175
    <a href="https://git-scm.com/" target="_blank">Git</a>
177
176
    repos, no exceptions. Depending on
178
177
    the project size, I use a simple dependency listing, or a recognized project
179
178
    manager like
180
179
    <a href="https://leiningen.org/" target="_blank">Leiningen</a>,
181
180
    <a href="https://STACKLINK.org/" target="_blank">Stack</a>
182
181
    or
183
182
    <a href="http://doc.crates.io/" target="_blank">Cargo</a>.
184
183
    {% endblocktranslate %}
185
184
</p>
186
185
<h4 id="retejo">{% translate "My website" %}</h4>
187
186
<p>
188
187
    {% blocktranslate trimmed %}
189
188
    My web server runs on
190
189
    <a href="https://nginx.com" target="_blank">Nginx</a>with an enabled QUIC
191
190
    module.
192
191
    The website itself is built using 
193
192
    <a href="https://djangoproject.com" target="_blank">Django</a>, a Python
194
193
    web framework that's extremely well written. Data is stored in a PostgreSQL
195
194
    database. On that amazing foundation, I've been
196
195
    able to build a very strong and secure website that's 100% mine.
197
196
    {% endblocktranslate %}
198
197
</p>
199
198
<p>
200
199
    {% blocktranslate trimmed %}I take pride in how I present my website, since
201
200
    I do so by only using the best practices, of which a lot have been forgotten by
202
201
    other web developers, even in university courses: The most noteworthy aspect
203
202
    of that is that I do not use any JavaScript in my
204
203
    website: A cornerstone of good web
205
204
    design is that your website ought to retain its functionality even if
206
205
    JavaScript is not available. I go one step further than that, and don't
207
206
    write JavaScript at all! This way, I can show the world by example that
208
207
    you <em>can</em> create nice-looking, interactive, responsive and fast
209
208
    websites for
210
209
    both desktop computers and phones without having to resort to JS.<br>
211
210
    Compare that to other websites that, once you visit them, are caught
212
211
    with their pants on their knees and a sad line of text on the upper
213
212
    left corner (if anything is shown at all) á la “Please enable
214
213
    JavaScript for our web application”, which actually means: “We're so bad at making
215
214
    websites we can't even show you some basic text and images without client-side
216
215
    scripting, yet we're so full of it we think
217
216
    our garbage qualifies for the word 'application'.” How pathetic!
218
217
    {% endblocktranslate %}
219
218
</p>
220
219
<p>
221
220
    {% blocktranslate trimmed %}I regularly add new texts to my website, or do general
222
221
    maitenance. I try to extract time where I can, but maintaining a website
223
222
    (and doing it well) is not an easy job. 
224
223
    Nevertheless, if I find a free spot somewhere, I might very well be updating
225
224
    my website. It's satisfying work to see my own place grow under my
226
225
    fingertips, albeit slower than I want it to.<br>
227
226
    Sometimes, it might seem I've not been doing anything on my website for a
228
227
    while. This might indicate real-life obligations, but might also be
229
228
    invisible changes to the source code, which are just as important as
230
229
    anything else I do around here. 
231
230
    {% endblocktranslate %}
232
231
</p>
233
232
<p>
234
233
    {% blocktranslate trimmed %}
235
234
    I try to make my website available in multiple languages, more specifically
236
235
    in those languages that I feel comfortable enough with to translate myself.
237
236
    To this end, I use a translator program that can translate from and to more
238
237
    than 100 languages. The core of that program is made up of 
239
238
    <a href="https://apertium.org" target="_blank">Apertium</a> and the 
240
239
    <a href="link naar paper" target="_blank">M2M-100</a> neural translator
241
240
    model.
242
241
    Both of these are free/libre software, and can operate without any
243
242
    internet connection, so I highly recommend both projects for your (digital)
244
243
    translation tasks.<br>
245
244
246
245
    I refuse to use any
247
246
    <a href="https://www.gnu.org/philosophy/who-does-that-server-really-serve.html"
248
247
    target="_blank"><abbr title="Service as a Software
249
248
        Substitute">SaaSS</abbr></a> (especially if made by
250
249
    <a href="https://stallman.org/google.html" target="_blank">Google</a>),
251
250
    which means I won't use Google Translate (or any other SaaSS), because these
252
251
    services are made to take away digital independence (i.e. freedom) from the people, in the
253
252
    same way that proprietary software tries to embed digital dependence in our society.<br>
254
253
255
254
    While machine translators lack the quality of a human translator, that's no
256
255
    problem for me: I only use my program to do the "bulk translations", which are very
257
256
    tedious and can take
258
257
    up months of my time, time that I simply don't have. After those translations
259
258
    are made, I go over them manually to fix all the remaining mistakes, and add
260
259
    the missing details and contextual nuances (if necessary) that machine
261
260
    translators have a lot of trouble with. That is how I'm able to maintain
262
261
    so many different translations of my website on my own.
263
262
    {% endblocktranslate %}
264
263
</p>
265
264
266
265
<p>
267
266
    {% blocktranslate trimmed %}I use Esperanto for hyperlinks, because I want my web
268
267
    pages to be navigated in a language-agnostic way, and in those cases, a
269
268
    politically neutral, international language is best.{% endblocktranslate %}
270
269
</p>
271
270
272
271
<h4 id="sociaj-retejoj">{% translate "Social media" %}</h4>
273
272
<p>
274
273
    {% blocktranslate trimmed %}I do not have/use a social media account on any big platform.
275
274
    Most of these platforms (like Facebook, Instagram, Whatsapp, ...) vehemently
276
275
    violate their <s>users'</s> useds'
277
276
    privacy in order to get more profits. I will not create an account on those.
278
277
    I also hope others will follow me in this decision, as being on platforms like
279
278
    Facebook compels others to do the same. An easy way to break their power is to
280
279
    refuse being used, and additionally, this makes it easier for others to act
281
280
    similarly.{% endblocktranslate %}
282
281
</p>
283
282
284
283
<h4 id="retumili">{% translate "Browsing" %}</h4>
285
284
<p>
286
285
    {% blocktranslate trimmed %}I fully condemn the practice of tracking people's (browser)
287
286
        habits for financial gain without proper consent (and no, clicking "I agree"
288
287
        does not imply giving proper consent),
289
288
        and I refuse to tolerate it. That's why I often browse using
290
289
        <a href="https://torproject.org" target="_blank">Tor</a>
291
290
        to conceal my identity. You can do so likewise, even for practical purposes;
292
291
        the network is steadily gaining more speed because of the growing amount of
293
292
        people concerned with their privacy. Some offer Tor nodes that speed the
294
293
        network up and increase the security. If you really want to, you can also
295
294
        help by becoming a <strong>non</strong>-exit node (because exit nodes
296
295
        may get blocked by some websites, I don't recommend doing that 
297
296
        unless you know what you're doing).
298
297
    {% endblocktranslate %}
299
298
</p>
300
299
<p id="kontrareklamo">
301
300
    {% blocktranslate trimmed %}I normally would not use an adblocker to browse the web. As much as I
302
301
    resent the use of advertisements, I understand that keeping a website up
303
302
    costs money, and advertising is an easy way to fund that, a practice of which traces
304
303
    can be found back until the Roman empire. Because their existence is not
305
304
    harmful to society either (they're merely annoying), I see no valid ethical objection to an
306
305
    advertisement on a website. I also don't oppose the
307
306
    use of adblockers by others: I think people have a right to decide whether they
308
307
    want to see ads or not.<br>
309
308
    However, I do use
310
309
    <a href="https://noscript.net" target="_blank">NoScript</a>,
311
310
    which is a <em>script blocker</em>. It helps me stay anonymous on the
312
311
    internet by blocking (mostly client side) scripts that may reveal my
313
312
    identity.<br>
314
313
    Unfortunately, a lot of websites have started using tracking scripts to
315
314
    trace what I see, what I do, what I surf to on the internet, and use that
316
315
    for advertising, profiling, and identifying me, which is ethically wrong.
317
316
    Because I oppose this practice, I go one
318
317
    step further by using <a href="https://adnauseam.io">AdNauseam</a>, which goes beyond simply
319
318
    blocking spyware-like advertising, but also randomly clicks on the ads in the
320
319
    background, which causes the advertiser to pay for a worthless
321
320
    advertisement, while at the same time 
322
321
    <a href="https://ceur-ws.org/Vol-1873/IWPE17_paper_23.pdf">it obfuscates the data obtained by Google</a>,
323
322
    <a href="https://rednoise.org/AdNauseamVsGoogle.pdf">making it decrease in value</a>.
324
323
    This is a zero-effort way for me (and you!) to
325
324
    legally rebel against an unjust system that violates our privacy for profit,
326
325
    and you get an ad-free experience in return! If there's anything I'd want
327
326
    you to remember from this entire page, is that you should install AdNauseam right
328
327
    now. Really, do it now! Do it 
329
328
    <a href="https://github.com/dhowe/AdNauseam/wiki/Install-AdNauseam-on-Chromium-based-browsers#install-adnauseam">on Chrome!</a>
330
329
    Do it 
331
330
    <a href="https://microsoftedge.microsoft.com/addons/detail/adnauseam/mlojlfildnehdpnlmpkeiiglhhkofhpb">on Edge!</a>
332
331
    Do it 
333
332
    <a href="https://addons.mozilla.org/en-US/firefox/addon/adnauseam/">on Firefox!</a>
334
333
    Do it 
335
334
    <a href="https://addons.opera.com/en/extensions/details/adnauseam-2/">on Opera!</a>
336
335
    <strong>Just do it!</strong>{% endblocktranslate %}
337
336
</p>
338
337
339
338
<h4 id="libera-programaro">{% translate "Free software" %}</h4>
340
339
<p>
341
340
    {% blocktranslate trimmed %}I am a very strong supporter of the free/libre software
342
341
    movement and organizations that battle to preserve our computing freedom,
343
342
    which I regard as a human right. I go out of my
344
343
    way to find replacements for any proprietary software, and have a high
345
344
    tolerance for practical ease of use I'm willing to sacrifice.<br>
346
345
    Very seldom, I use Windows for some programs that I need to 
347
346
    run for my university courses, as annoying and terrible I might find that.<br>
348
347
349
348
    I also voluntarily help people move from using proprietary software to free
350
349
    software. I feel responsible for doing so, because I'm an informatician, and
351
350
    not many people understand these subjects well.
352
351
    If you want to try it (on your own), you can find a lot of GNU/Linux distros on the
353
352
    internet that are pretty easy for novice free/libre software users. You can
354
353
    also install them alongside an existing operating system, giving you the
355
354
    chance to make an easy transition to computing freedom (which I admit, is
356
355
    difficult when you're not used to it). For your freedom's sake, I implore
357
356
    you to give it a shot too.{% endblocktranslate %}
358
357
</p>
359
358
360
359
<h4 id="kulturo">{% translate "Cultural works" %}</h4>
361
360
<p>
362
361
    {% blocktranslate trimmed %}Although I avoid proprietary software, I take a mild
363
362
    approach to proprietary video games. This is because games
364
363
    serve a cultural/entertainment purpose, not a general/functional
365
364
    purpose. They're a form of art, so to speak. That's a fundamental
366
365
    difference from other types of software, and that reflects in how I
367
366
    experience the (lack of) freedom in games.
368
367
369
368
    I do draw the line with
370
369
    <a href="https://www.gnu.org/proprietary/malware-games.html" target="_blank">games that
371
370
    are distributed with malware</a>, most often taking the form of
372
371
    <a
373
372
    href="https://www.defectivebydesign.org/what_is_drm_digital_restrictions_management"
374
373
    target="_blank">intrusive DRM</a>.
375
374
376
375
    <br>
377
376
    However, I still think that games also ought to be free software, because
378
377
    that would also make them free cultural works.
379
378
    Proprietary games can get
380
379
    lost because of technical changes (ranging from instruction set architecture
381
380
    to a specific high-level library or simply the DRM), making them unplayable
382
381
    as time goes on.
383
382
    {% endblocktranslate %}
384
383
</p>
385
384
386
385
     
387
386
</section>
388
387
{% endblock main %}
389
388

templates/about/main_content.djhtml

5 additions and 5 deletions.

View changes Hide changes
1
1
{% load static %}
2
2
<section class="emphasis">
3
3
<h4> {% translate "Welcome!" %}</h4>
4
4
<p>
5
5
6
6
        {% blocktranslate trimmed %}Hello there! I'm Maarten, a happy
7
7
        student from Belgium, and this is my amazing personal website.
8
8
        I like a lot of things, and I share some of those in here. Take
9
9
        a look around, read a bit, talk with me, and most importantly,
10
10
        enjoy your stay!{% endblocktranslate %}
11
11
        </p>
12
12
<!--
13
13
<section class="emphasis" style="background-color: #ffde00; color: black;">
14
14
    <h1 style="color: black;">Geplande werkzaamheden</h1>
15
15
    <h4 style="color: black;">
16
16
        Maitenance announcement{% translate "Welcome!" %}</h4>
17
17
    <p style="color: black;">
18
18
        {% blocktranslate trimmed %}Hello there! I'm Maarten, a happy
19
19
        student from Belgium, and this is my amazing personal website.
20
20
        I like a lot of things, and I share some of those in here. Take
21
21
        a look around, read a bit, talk with me, and most importantly,
22
22
        enjoy your stay!{% endblocktranslate %}
23
23
        Van dinsdag 1 februari (1)2022 tot en met zondag 27 februari (1)2022
24
24
        zal deze website niet beschikbaar zijn omwille van onderhoudswerken.
25
25
        Moest ik eerder klaar zijn, dan zal hij ook eerder terug online komen,
26
26
        maar daar kan ik geen beloftes over doen.
27
27
    </p>
28
28
    <h4 style="color: black;">Créneau de maintenance</h4>
29
29
    <p style="color: black;">
30
30
    Du mardi 1er février (1)2022 au dimanche 27 février (1)2022, mon site web ne sera
31
31
    pas disponible en raison des traveaux de maintenance. Si je finis de bonne
32
32
    heure, il sera disponible plus tôt, mais je ne peux pas le prévoir pour le
33
33
    moment.
34
34
    </p>
35
35
    <h4 style="color: black;">Geplante Wartung</h4>
36
36
    <p style="color: black;">
37
37
    Vom Dienstag, den 1. Februar (1)2022 bis Sonntag, den 27. Februar (1)2022, wird
38
38
    meine Website aufgrund von Wartungsarbeiten nicht verfügbar sein. Wenn ich
39
39
    früh fertig bin, wird es früher verfügbar sein, aber das kann ich momentan
40
40
    nicht vorhersehen.
41
41
    </p>
42
42
    <h4 style="color: black;">Maintenance announcement</h4>
43
43
    <p style="color: black;">
44
44
        From Tuesday, February 1 (1)2022 until Sunday, February
45
45
        27 (1)2022, my website will be unavailable due to maitenance purposes. If
46
46
        I finish early, it will be available sooner, but I can't foresee that at
47
47
        the moment.
48
48
    </p>
49
49
-->
50
50
</section>
51
51
<div class="cards">
52
52
    {# Blog card #}
53
53
    <div class="card">
54
-
        <img src="/media/main/blog.jpg" />
+
54
        <img src="/media/main/blog.jpg" />
55
55
        <h3>{% translate "Blog" %}</h3>
56
56
        <p>
57
57
            {% blocktranslate trimmed %}My personal scribblepad, written from scratch,
58
58
            on which I ramble about everything I like. Highly recommended
59
59
            while eating breakfast.{% endblocktranslate %}
60
60
        </p>
61
61
        <a class="btn text" href="{% url 'blog-index' %}">{% translate "Visit blog" %}</a>
62
62
    </div>
63
63
64
64
    {# Gitar card #}
65
65
    <div class="card" style="flex-grow: 2">
66
-
        <!-- HAHAHAA I CAN'T DESIGN LOGOS -->
+
66
        <!-- HAHAHAA I CAN'T DESIGN LOGOS -->
67
67
        <img src="/media/main/gitar.png" />
68
68
        <h3>Gitar</h3>
69
69
        <p>
70
70
            {% blocktranslate trimmed %}I actually don't use GitHub to host my code,
71
71
            contrary to a lot of other coders. Instead, I've been trying to
72
72
            create something that's just fit to my taste. I host a couple of
73
73
            archive repositories there, as well as dotfiles, and that jazz. It's
74
74
            a continuing work, so don't flip your desk if the layout is upside
75
75
            down tomorrow =3{% endblocktranslate %}
76
76
        </p>
77
77
        <!--<span class="btn text" style="color:lightgrey;" disabled>{% translate "Temporarily unavailable" %}</span>-->
78
78
        <a class="btn text" href="{% url 'gitar-index' %}">
79
79
        {% translate "Check code" %}</a>
80
80
    </div>
81
81
82
82
    {# About myself card #}
83
83
    <div class="card">
84
84
        <img src="/media/about/images/parallax.png" />
85
85
        <!-- I still don't have a good picture or still life about
86
86
            myself, so yes, I'm copying my parallax for a while. Sorry! -->
87
87
        <h3>{% translate "About me" %}</h3>
88
88
        <p>
89
89
            {% blocktranslate trimmed %}Well, if you wish to know more of me, I have a page
90
90
            where I describe myself in a couple more sentences. You know,
91
91
    because I can =)
92
92
            {% endblocktranslate %}
93
93
        </p>
94
94
        <a class="btn text" href="{% url "main-myself" %}">{% translate "Read on" %}</a>
95
95
    </div>
96
96
97
97
    {# Publications card #}
98
98
    <div class="card">
99
-
        <!--<img src="/media/about/images/publications.png" />-->
+
99
        <!--<img src="/media/about/images/publications.png" />-->
100
100
        <h3>{% translate "Publications" %}</h3>
101
101
        <p>
102
102
            {% blocktranslate trimmed %}Throughout my academic career, I've written a lot,
103
103
            sometimes together with other people. To avoid that these papers get
104
104
            lost to the passing of time, I've decided to publish them on my website, should somebody
105
105
            want to read them.{% endblocktranslate %}
106
106
        </p>
107
107
        <a class="btn text" href="{% url "publications-index" %}">{% translate "Consult publications" %}</a>
108
108
    </div>
109
109
110
110
    {# Projects card #}
111
111
    <div class="card">
112
-
        <h3>{% translate "Other projects" %}</h3>
+
112
        <h3>{% translate "Other projects" %}</h3>
113
113
        <p>
114
114
            {% blocktranslate trimmed %}Projects come and go, and with my website I can
115
115
            present them to you. This cards takes you to the
116
116
            archive of past projects.
117
117
            {% endblocktranslate %}
118
118
        </p>
119
119
        <a class="btn text disabled" href="{% url "main-project-archive" %}">
120
120
            {% translate "View projects" %}</a>
121
121
    </div>
122
122
123
123
    {# Activism card #}
124
124
    <!--<div id="aktivismo" class="card">
125
125
        <h3>{% translate "Activism" %}</h3>
126
126
        <p>
127
127
            {% blocktranslate trimmed %}Trying to make this place better takes some time. So
128
128
            I made a page in the hopes that it can engage you to partake in that
129
129
            process. Because it's never too late to begin.
130
130
            {% endblocktranslate %}
131
131
        </p>
132
132
        <a class="btn text" href="{% url "activism" %}">
133
133
            {% translate "List talking points" %}</a>
134
134
    </div>-->
135
135
    {# Demobel card #}
136
136
    <!--<div id="demobel" class="card">
137
137
        <h3>Demobel</h3>
138
138
        <p>
139
139
            {% blocktranslate trimmed %}Demobel is a voluntary project I created
140
140
            to make Belgian politics understandable for normal people. It is a
141
141
            database of all politicians and parties, together with the
142
142
            parliaments and the laws they proposed. Not only that, but it's also
143
143
            available in no less than 7 languages (!), complete with statistics,
144
144
            commentary and grading, all provided by yours truly. It is by far
145
145
            the biggest project of my entire website, so be sure to check it out
146
146
            if you're wondering which politicians are actually trying to make
147
147
            Belgium better, and which ones are lying their ears off!
148
148
            {% endblocktranslate %}
149
149
        </p>
150
150
        <a class="btn text" href="{% url "demobel-index" %}">{% translate "Open Demobel" %}</a>
151
151
    </div>-->
152
152
153
153
    {# Friends card #}
154
154
    <div class="card">
155
-
        <img src="{% get_media_prefix %}about/images/het-avondmaal.jpg" />
+
155
        <img src="{% get_media_prefix %}about/images/het-avondmaal.jpg" />
156
156
        <h3>{% translate "Qzertyuiop network" %}</h3>
157
157
        <p>
158
158
            {% blocktranslate trimmed %}This website is part of the Qzertyuiop network,
159
159
            connecting my closest friends over the internet. From this card, you
160
160
            can go to their websites as well!
161
161
            {% endblocktranslate %}
162
162
        </p>
163
163
        <p>
164
164
        <a href="https://jecey.xyz">drs. Jeroen Ceyssens</a><br>
165
165
        <a href="https://jorrit.info">m.sc. Jorrit Gerets</a><br>
166
166
        <a href="https://jherbots.info">drs. Joris Herbots</a><br>
167
167
        <a href="https://github.com/MannuLambrichts">drs. Mannu Lambrichts</a><br>
168
168
        </p>
169
169
    </div>
170
170
</div>
171
171
{% if contact_response %}
172
172
<div class="snackbar">
173
173
    {{ contact_response }}
174
174
</div>
175
175
{% endif %}
176
176
<section>
177
177
    <h2>{% translate "Contact me" %}</h2>
178
178
    <p>{% blocktranslate trimmed %}If you wish to contact me, use this convenient form,
179
179
        the most direct link to yours truly. Leave me a thank you note, tell me
180
180
        something important, or correct a typo I made, it's all good, I love to
181
181
        hear from you!
182
182
        <!--If necessary, put some contact info of yourself in your message so I can get
183
183
        back to you. Do <em>not</em> put a hyperlink in your message. Adding a
184
184
        hyperlink will put automatically ban your computer from my website
185
185
        and probably make it explode, so don't do that.-->{% endblocktranslate %}</p>
186
186
    <form action="" method="post">
187
187
        {% csrf_token %}
188
188
        <input type="text" name="name" mozactionhint="send" enterkeyhint="send" maxlength="64" required>
189
189
        <label for="name">{% translate "Your name" %}</label>
190
190
        <br>
191
191
        <textarea maxlength="2000" spellcheck="true" name="message" placeholder="{% translate "Your message" %}" required></textarea>
192
192
        <br>
193
193
        {% blocktranslate trimmed %}Bot check: Enter the name of any Belgian province in
194
194
        one of the three Belgian languages (just check Wikipedia!):{% endblocktranslate %}
195
195
        <input type="text" name="provincio" id="provincio" mozactionhint="send" enterkeyhint="send" maxlength="64" required>
196
196
        <label for="provincio">{% translate "Province" %}</label><br>
197
197
        <input type="submit" value="✉️ {% translate "Send" %}">
198
198
    </form>
199
199
</section>
200
200

templates/about/verlanglijst.djhtml

1 addition and 1 deletion.

View changes Hide changes
1
1
{% load i18n %}
2
2
{% load static %}
3
3
{% get_language_info for LANGUAGE_CODE as lang %}
4
4
5
5
{# NOG TOEVOEGEN:
6
6
https://www.demorgen.be/nieuws/filip-dewinter-wordt-cafebaas-in-kroeg-waar-collaborateurs-nog-aan-de-muur-hangen-je-ziet-hier-ook-de-zwarte-bladzijden-van-de-vlaamse-beweging~bcffd103/?fbclid=IwAR2lASmVssh_oW458oOzJOnJyvy3jDm_2-Uj0Q1jcyr9iztGbQfSfaTphgw&referrer=https%3A%2F%2Fold.reddit.com%2Fr%2Fbelgium%2Fcomments%2Fok1qm9%2Ffilip_dewinter_wordt_caf%25C3%25A9baas_in_kroeg_waar%2F #} 
7
7
{# TEKST OP ANDER BESTAND #}
8
8
9
9
{% block stylesheets %}
10
10
    {{ block.super }}
11
11
    <!-- NOTE: This is a temporary stylesheet for this page, until I've added
12
12
    the table stylesheet to Material3.-->
13
13
    <style>
14
14
    div.purchased {
15
15
        border-color: red;
16
16
        border-style: dashed;
17
17
        border-width: 2em;
18
18
    }
19
19
        </style>
20
20
        {% endblock stylesheets %}
21
21
{% block title %}{% translate "Activism" %}{% endblock title %}
22
22
{% block description %}{% blocktranslate trimmed %}For the greater good. Find out about some interesting things to better the world as we all know it.{% endblocktranslate %}
23
23
{% endblock description %}
24
24
{% block main %}
25
25
<section class="emphasis">
26
26
<h3>Lees eerst even dit:</h3>
27
27
<p>Elke keer als mensen aan mij vragen wat ik wil hebben, gebiedt de eerlijkheid
28
28
mij te antwoorden met “geluk en gezondheid”, maar blijkbaar is dat niet waar de
29
29
meesten op doelen. Neen, men wilt weten welke materiële dingen ik verlang.
30
30
</p>
31
31
<p>En die vraag komt altijd als een verassing, zelfs in aanloop naar Kerstmis.
32
32
Materieel bezit doet mij erg weinig en het kan makkelijk een week duren
33
33
vooraleer ik met één goed idee op de proppen kom.
34
34
Maar ik ben geen eremiet en heb ook af en toe wel gewoon iets nodig om mijn
35
35
leven zijn gang te laten gaan.
36
36
</p>
37
37
<p>Voor zij die op zoek zijn naar iets waar ze mij en/of Jonathan een plezier
38
38
mee kunnen doen: Ge zijt op het juiste adres, figuurlijk en letterlijk. Op deze
39
39
pagina lijsten wij samen doorheen het jaar allerlei dingen op die gekocht kunnen
40
40
worden. Ze zijn gesorteerd op prijs om het gemakkelijk te maken voor u.<br>
41
41
Om te voorkomen dat iets dubbel gekocht wordt: <strong>Als ge iets ziet dat gij
42
42
gaat kopen, klik dan op de knop “Ik koop dat” zodat het voor anderen
43
43
uit de lijst gehaald wordt!</strong> Dat 'iets' wordt dan als dusdanig
44
44
aangemerkt en kan dan niet meer door anderen gekozen worden.<br>
45
45
Merk ook op dat ik niet naar een naam of zo vraag; ik weet dus niet wie het is
46
46
die iets voor mij zal kopen en ik krijg hier ook geen melding van. Zo zal het
47
47
ook zeker een verrassing blijven!
48
48
</p>
49
49
<p>Mogen wij u ook <strong>met aandrang</strong> vragen om NOOIT (en al
50
50
<em>zeker niet voor ons</em>) iets bij Amazon te kopen: Amazon is één van 's
51
51
werelds slechtste bedrijven waar mensenrechten met de voeten getreden worden,
52
52
van de privacy van klanten tot en met arbeidsrechten van werknemers en alles
53
53
daartussenin. Voor een steeds verder aangevulde lijst van wanpraktijken kunt u
54
54
<a href="https://stallman.org/amazon.html">hier</a> klikken. Serieus, als ge het
55
55
nergens anders dan op Amazon kunt vinden, dan hebben wij VEEL liever dat ge
56
56
gewoon niks
57
57
koopt voor mij/ons dan dat ge aan dat bedrijf geld geeft, en dan zegt dat mijn
58
58
uitleg hier u overtuigd heeft om dat te doen. Wij boycotten Amazon
59
59
en het laatste wat wij willen is dat mensen door maatschappelijke druk om
60
60
geschenken te geven geld spenderen aan dat bedrijf.
61
61
</p>
62
62
<p>Moest ge nog vragen hebben, aarzel niet om mij te contacteren via mijn
63
63
GSM-nummer of 
64
64
het contactformulier op <a href="https://maartenv.be">mijn startpagina</a>.
65
65
</p>
66
66
</section>
67
67
68
68
<section>
69
69
    {% for product in products %}
70
70
71
71
    {% if address == product.purchaser %}
72
72
    <div class="purchased">
73
73
    {% endif %}
74
74
75
75
    <h3 id="{{ product.id }}">{{ product.name }} (~ €{{ product.price }})</h3>
76
76
    {% if product.picture %}
77
77
    <img src="{{ product.image }}">
78
78
    {% endif %}
79
79
    <dl>
80
80
        {% if product.url %}
81
81
            <dt>URL<dt>
82
82
            <dd><a href="{{ product.url }}">{{ product.url }}</a></dd>
83
83
        {% endif %}
84
84
        {% if product.isbn %}
85
85
            <dt>ISBN<dt>
86
86
            <dd>{{ product.isbn_pretty }}</dd>
87
87
        {% endif %}
88
88
        <dt>Voor Jonathan?</dt>
89
89
            <dd>
90
90
    </dl>
91
91
    {% if product.extra_info %}
92
92
        <p>{{ product.extra_info|maakurlsaan }}</p>
93
-
    {% endif %}
+
93
    {% endif %}
94
94
95
95
    <form method="POST" action="#{{ product.id }}">
96
96
        <input type="hidden" name="product_id" value="{{ product.id }}">
97
97
        <input type="submit" value="Ik ga dit kopen">
98
98
    </form>
99
99
100
100
    {% if address == product.purchaser %}
101
101
    </div>
102
102
    {% endif %}
103
103
    {% endfor %}
104
104
</section>
105
105
106
106
{% endblock main %}
107
107

urls.py

1 addition and 0 deletions.

View changes Hide changes
1
1
2
2
from . import views # Imports the views from the same directory (which is views.py).
3
3
4
4
urlpatterns = [
5
5
        re_path(r'^$', views.index, name='about-index'),
6
6
        re_path(r'^myself$', views.myself, name='main-myself'), 
7
7
        re_path(r'^projektoj-arkivo$', views.project_archive, name='main-project-archive'),
+
8
        re_path(r'^projektoj-arkivo$', views.project_archive, name='main-project-archive'),
8
9
        re_path(r'^activismo$', views.activism, name='activism'),
9
10
        ]
10
11

views.py

7 additions and 6 deletions.

View changes Hide changes
1
1
import requests  # For direct communication with me
2
2
from datetime import date
3
3
from django.utils import timezone
4
4
from django.shortcuts import get_object_or_404, render # This allows to render the template with the view here. It's pretty cool and important.
5
5
from django.http import HttpResponseRedirect, HttpResponse # Why?
6
6
from django.urls import reverse # Why?
7
7
from django.utils.translation import gettext as _
8
8
from .models import *
9
9
from .forms import MessageForm
10
10
from ipware import get_client_ip
11
11
12
12
13
13
def get_age():
14
14
    """Returns my current age."""
15
15
    today = date.today()
16
16
    birthday = date(1996, 8, 28)
17
17
    age = today - birthday
18
18
    years = str(int(age.days / 365))
19
19
    return years
20
20
21
21
def footer_description():
22
22
    return _("Main pages of Maarten's website, a %(years)s year old Belgian programmer. Also an undergraduate student of Informatics @ UHasselt, and graduate student of Engineering Informatics at Ghent University.") % {'years': get_age()}
23
23
24
24
def footer_links():
25
25
    footer_links = [
26
26
        [_("Contact me"), "mailto:maarten.vangeneugden@student.uhasselt.be"],
27
27
        [_("Hasselt University"), "https://www.uhasselt.be"],
28
28
        [_("Ghent University"), "https://www.ugent.be"],
29
29
            ]
30
30
    return footer_links
31
31
32
32
# TODO: Move this stuff to the template module. This is basically a description
33
33
# of HOW to display data, but the view module is only responsible for WHAT data
34
34
# to display.
35
35
def standard_context():
36
36
    context = {
37
37
            'navbar_backArrow': True,
38
38
            'footer_title': _("Home page"),
39
39
            'footer_description': footer_description(),
40
40
            'footer_links': footer_links(),
41
41
            'stylesheet_name': "home",
42
42
            }
43
43
    return context
44
44
45
45
def get_current_status(dt = None):
46
46
    """Returns a string specifying my current state (and sometimes location).
47
47
48
48
    This function is actually based on my weekly schedule. I'd normally hook it
49
49
    up to my iCal files, but that doesn't include things like sleeping. Not to
50
50
    mention my university has a hard time following standards like "Put the
51
51
    location in the location field, not in the title of the appointment". I
52
52
    figured a simple function would do the job just as well.
53
53
54
54
    Keyword arguments:
55
55
    dt -- The datetime object of the day to check (defaults to current local time)
56
56
    """
57
57
58
58
    MONDAY = 0
59
59
    TUESDAY = 1
60
60
    WEDNESDAY = 2
61
61
    THURSDAY = 3
62
62
    FRIDAY = 4
63
63
    SATURDAY = 5
64
64
    SUNDAY = 6
65
65
66
66
    if dt is None:
67
67
        timezone.activate("Europe/Brussels")
68
68
        dt = timezone.localtime(timezone.now())
69
69
70
70
    day = dt.weekday()
71
71
    hour = dt.time().hour
72
72
    minute = dt.time().minute
73
73
74
74
    """ Note on usage of the range() function:
75
75
    range(x, y) returns a list, beginning from x, but excluding y. So if a
76
76
    course runs from 13:00 to 15:00, then y should still be 15. Why? Because
77
77
    that makes it so that 14:59 is included, but 15:00 is not. if y would be 16,
78
78
    then 15:30 would also be included.
79
79
    """
80
80
81
81
    # If nothing's returned by now, return a general response
82
82
    return _("Probably chilling a bit. Feel free to talk! ❤")
83
83
84
84
def send_message(name, ip, message):
85
85
    """ Sends a message to me if the visitor submits one on my website. """
86
86
    # First task: Retrieve the token, which mustn't be in the tracker:
87
87
    with open("token.txt", 'r') as f:
88
88
        url = f.readline()
89
89
    url += name + " (" +str(ip)+ ") stuurt:\n" + message
90
90
    
91
91
    response = requests.get(url)
92
92
    return response.status_code == 200
93
93
94
94
def contains_hyperlink(string):
95
95
    return ("https://" in string.lower() or "http://" in string.lower())
96
96
  
97
97
98
98
def add_to_bots(request):
99
99
    client_ip, is_routable = get_client_ip(request)
100
100
    if client_ip is not None:
101
101
        with open('blog/bot-ip-addresses.txt', 'a') as f:
102
102
            print("deny " + str(client_ip) + ";  # Abused contact form.", file=f)
103
103
104
104
105
105
# Views:
106
106
107
107
def index(request):
108
108
    from django.utils.translation import gettext as _
109
109
    context = standard_context()
110
110
    # First, handle possible contact
111
111
    if request.method == "POST":  # Message received
112
112
        form = MessageForm(request.POST)
113
113
        if form.is_valid():
114
114
            clean_message = form.cleaned_data
115
115
            # Bot test:
116
116
            if clean_message["provincio"].lower() not in [
117
117
                    "limburg", "limbourg",
118
118
                    "antwerpen", "anvers", "antorf", "antorff",
119
119
                    "vlaams-brabant", "brabant flamand", "flämisch-brabant",
120
120
                    "oost-vlaanderen", "flandre-orientale", "ostflandern",
121
121
                    "west-vlaanderen", "flandre-occidentale", "westflandern",
122
122
                    "henegouwen", "hainaut", "hennegau",
123
123
                    "luik", "liège", "lüttich",
124
124
                    "luxemburg", "luxembourg",
125
125
                    "namen", "namur", "namür",
126
126
                    "waals-brabant", "brabant wallon", "wallonisch-brabant",
127
127
                    "brussel", "bruxelles", "brüssel",
128
128
                    ]:
129
129
                context["contact_response"] = _("The province you entered (") + \
130
130
                clean_message["provincio"] + _(") was a misspelling, or is not a Belgian province. Message discarded.")
131
131
            elif "henryquorp" in clean_message["name"].lower():  # Removed the hyperlink detector, since I'm allowing that now. 
132
132
                add_to_bots(request)
133
133
            else:
134
134
                # Neutralize possible hyperlinks
135
135
                neutralized_message = clean_message["message"].replace(".", ".   ")
136
136
                client_ip, _ = get_client_ip(request)
137
137
                if send_message(clean_message["name"], str(client_ip), neutralized_message):
138
138
                    from django.utils.translation import gettext as _
139
139
                    context["contact_response"] = _("Message sent!")
140
140
                else:
141
141
                    from django.utils.translation import gettext as _
142
142
                    context["contact_response"] = _("An error occured while trying to send the message. Please try again later.")
143
143
        else:  # The submitted form data was invalid
144
144
            from django.utils.translation import gettext as _
145
145
            context["contact_response"] = _("The submitted form contained invalid data, and was discarded.")
146
146
        
147
147
148
148
    
149
149
    timezone.activate("Europe/Brussels")
150
150
    time_string = timezone.localtime(timezone.now()).strftime(" (%H:%M) ")
151
151
    #status = _("Current status/location:") + time_string + get_current_status()
152
152
    template = "about/index.djhtml"
153
153
154
154
    return render(request, template, context)
155
155
156
156
def verlanglijst(request):
157
157
    if request.method == "POST":  # Handling a reply if one is sent
158
158
        form = ProductForm(request.POST)
159
159
160
160
        product = models.Product.objects.get(id=form.id)
161
-
        product.purchaser = request.META['REMOTE_ADDR']
+
161
        product.purchaser = request.META['REMOTE_ADDR']
162
162
        if form.is_valid():
163
163
            new_comment = form.save(commit=False)
164
164
            context["comment_response"] = _("Comment succesfully submitted!")
165
165
        else:
166
166
            print("ERROR")
167
167
            print(form.errors)
168
168
            context["contact_response"] = _("An error occured while trying to submit your comment. Please try again later.")
169
169
170
170
    template = "about/verlanglijst.djhtml"
171
171
    context = {
172
172
            'js': models.Product.objects.filter(jonathan=True,maarten=False,purchaser=None),
173
-
            'ms': models.Product.objects.filter(jonathan=False,maarten=True,purchaser=None),
174
-
            'jms': models.Product.objects.filter(jonathan=True,maarten=True,purchaser=None),
175
-
            'boughts': models.Product.objects.exclude(purchaser=None),
176
-
            'address': request.META['REMOTE_ADDR'],
+
173
            'ms': Product.objects.filter(jonathan=False,maarten=True,purchaser=None),
+
174
            'jms':Product.objects.filter(jonathan=True,maarten=True,purchaser=""),
+
175
            'boughts': Product.objects.exclude(purchaser=None),
+
176
            'address': request.META['REMOTE_ADDR'],
177
177
            }
178
178
    context.update(standard_context())
179
-
+
179
    return render(request, template, context)
+
180
180
181
181
182
def myself(request):
182
183
    template = "about/about.djhtml"
183
184
184
185
    context = {
185
186
            'subject': _("Myself"),
186
187
            'navbar_title': _("Myself"),
187
188
            'age': get_age(),
188
189
            }
189
190
    context.update(standard_context())
190
191
    return render(request, template, context)
191
192
192
193
def project_archive(request):
193
194
    template = "about/project-archive.djhtml"
194
195
    context = standard_context()
195
196
    return render(request, template, context)
196
197
197
198
def activism(request):
198
199
    template = "about/activism.djhtml"
199
200
    context = standard_context()
200
201
    return render(request, template, context)
201
202
    
202
203