
    

    <?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://ocw.cs.pub.ro/courses/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://ocw.cs.pub.ro/courses/feed.php">
        <title>CS Open CourseWare ii:labs:s2:03:tasks</title>
        <description></description>
        <link>http://ocw.cs.pub.ro/courses/</link>
        <image rdf:resource="http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico" />
       <dc:date>2026-04-05T12:08:02+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/01?rev=1711997967&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/02?rev=1711996764&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/03?rev=1711996771&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/04?rev=1711996781&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico">
        <title>CS Open CourseWare</title>
        <link>http://ocw.cs.pub.ro/courses/</link>
        <url>http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico</url>
    </image>
    <item rdf:about="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/01?rev=1711997967&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-01T21:59:27+03:00</dc:date>
        <title>01. [40p] Splitting web pages into Jinja2 templates</title>
        <link>http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/01?rev=1711997967&amp;do=diff</link>
        <description>01. [40p] Splitting web pages into Jinja2 templates

First, [download the lab archive].

We now want to move the design from last time (a static html file) to use Flask Jinja2-based template rendering.

For this, you must:

	*  Migrate / split the HTML code into templates/_base.html (base template) and templates/index.html (child);
		*  Note: use Jinja2 template inheritance and content blocks;
		*  Make sure to eliminate any duplicate code (the _base.html template should contain the common layou…</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/02?rev=1711996764&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-01T21:39:24+03:00</dc:date>
        <title>02. [30p] Mock Authentication</title>
        <link>http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/02?rev=1711996764&amp;do=diff</link>
        <description>02. [30p] Mock Authentication

Now, it's the time to add authentication to our website.

	*  Use a server-side session to store the user's state (e.g., an authenticated bool + username string keys).
		*  Don't forget to set a secret_key for the session, otherwise it won't work!</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/03?rev=1711996771&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-01T21:39:31+03:00</dc:date>
        <title>03. [30p] Advanced: File Database</title>
        <link>http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/03?rev=1711996771&amp;do=diff</link>
        <description>03. [30p] Advanced: File Database

We want to store some of the user's personal data into a simple file-based “database” on the server.

	*  Check the account-details.html template page for any TODOs there!
		*  Ultimately, the form inputs should be pre-filled with the values stores inside the database!
		*  Use the value HTML attribute on the &lt;input&gt; tags to write them from Jinja templates;</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/04?rev=1711996781&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-01T21:39:41+03:00</dc:date>
        <title>04. [20p] Bonus: file upload</title>
        <link>http://ocw.cs.pub.ro/courses/ii/labs/s2/03/tasks/04?rev=1711996781&amp;do=diff</link>
        <description>04. [20p] Bonus: file upload

Bonus task: add a upload image input inside the account-details that uploads a file to the public/images/profile subfolder (also: create it!):

	*  Use type=“file” attribute on the &lt;input&gt;;
	*  Use multipart/form-data encoding type attribute on the &lt;form&gt; (Google it!);
	*  Inside the Flask route function:
		*  Actually, Read The Fine Manual for this!</description>
    </item>
</rdf:RDF>
