<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by A Beginner&#39;s Perspective on Medium]]></title>
        <description><![CDATA[Stories by A Beginner&#39;s Perspective on Medium]]></description>
        <link>https://medium.com/@ezekieleniola36?source=rss-6933aea46b54------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KAOsGmmpcS1gZcKF</url>
            <title>Stories by A Beginner&amp;#39;s Perspective on Medium</title>
            <link>https://medium.com/@ezekieleniola36?source=rss-6933aea46b54------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:27:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ezekieleniola36/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Breaking Down the First Four CISSP Security Domains: A Beginner’s Perspective]]></title>
            <link>https://meetcyber.net/breaking-down-the-first-four-cissp-security-domains-a-beginners-perspective-9ff3d7fa591e?source=rss-6933aea46b54------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ff3d7fa591e</guid>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[cissp]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-security-domain]]></category>
            <category><![CDATA[cyber]]></category>
            <dc:creator><![CDATA[A Beginner's Perspective]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 14:42:50 GMT</pubDate>
            <atom:updated>2025-09-23T18:23:14.977Z</atom:updated>
            <content:encoded><![CDATA[<p>Every strong security program rests on a solid foundation shaped by the <strong>eight CISSP security domains</strong>. Whether you’re just starting your cybersecurity journey or preparing for certification, understanding these domains is key. In this reading, we’ll look at the <strong>first four domains</strong> through a beginner’s lens, turning complex concepts into clear takeaways.</p><h4>What Are Security Domains?</h4><p>Think of building a fortress. You won’t just stack bricks randomly — you’d design it with parts that serve different purposes: a <strong>gate</strong> to control who enters, a <strong>tower</strong> to keep watch, and a <strong>storehouse</strong> to protect supplies. Each part plays a role in keeping the fortress safe.</p><p>That’s how <strong>security domains</strong> work in cybersecurity. They are the <strong>different categories</strong> that help professionals organise all the tasks needed to secure an organisation. Instead of seeing security as a messy pile of tools and rules, domains help us:</p><ul><li>Structure what we do every day.</li><li>Notice where security is weak.</li><li>Build a strong security posture.</li></ul><h4>What Is the CISSP?</h4><p>Now, who defined these categories? That’s where <strong>CISSP</strong> comes in.</p><p>CISSP stands for <strong>Certified Information Systems Security Professional</strong>. It’s one of the most respected certifications in cybersecurity, created and managed by <strong>(ISC)² (International Information System Security Certification Consortium)</strong>.</p><p>Holding a CISSP shows that a professional knows the key areas of cybersecurity and can actually put that knowledge into practice, not just in theory.</p><blockquote>In simple terms: T<strong>he domains are the building blocks, and CISSP is the certification that proves you know how to use them well.</strong></blockquote><p><strong>In CISSP, there are eight domains in total. But to keep it simple, we’ll start with the first four:</strong></p><ol><li>Security and Risk Management</li><li>Asset Security</li><li>Security Architecture and Engineering</li><li>Communication and Network Security</li></ol><h4><strong>Security and Risk Management</strong></h4><p>This domain shape how organisations protect what matters most. It starts with a key question: <em>what are we protecting, and why?</em></p><p>The focus is on building a strong <strong>security posture</strong> — an organisation’s ability to defend assets, manage risks, and adapt to change. This includes:</p><ul><li>Safeguarding customer data.</li><li>Ensuring system availability.</li><li>Following laws, regulations, and ethics.</li><li>Planning for risks, compliance, and recovery.</li></ul><p>It also ties to <strong>information security (InfoSec)</strong>, which puts these strategies into action through processes like incident response, vulnerability management, and application or cloud security.</p><blockquote>Think of it as the <strong>blueprint of the fortress</strong>. Without it, you might build tall towers but leave the gate unguarded. In cybersecurity terms: without strong risk management, you’ll invest in tools but still miss the real threats.</blockquote><h4>Asset Security</h4><p>This domain focuses on <strong>managing the cybersecurity process of organisational assets</strong>.</p><blockquote><em>An asset is anything valuable to an organisation</em> — from customer data and databases to laptops, servers, and even printed documents.</blockquote><p>It also covers the <strong>data lifecycle</strong>: how information is stored, maintained, retained, and securely destroyed when no longer needed.</p><blockquote>In our fortress analogy: this domain is about protecting the <strong>treasure room </strong>knowing what you own, guarding it properly, and making sure nothing valuable leaks out or is left unprotected.</blockquote><h4>Security Architecture and Engineering</h4><p>This domain is essentially the <strong>implementation of the Security and Risk Management plan</strong>. While Domain One sets the strategy (what to protect and why), Security Architecture and Engineering focuses on <strong>how to build it in practice</strong>.</p><p>It ensures the right systems, tools, and principles are in place, like least privilege, defence in depth, and zero trust, to turn strategy into working defences.</p><blockquote>In our fortress analogy: if Security and Risk Management is the blueprint, then Security Architecture and Engineering is the <strong>actual construction of the fortress walls, gates, and towers built to match the plan.</strong></blockquote><h4>Communication and Network Security</h4><p>This domain is about <strong>securing the flow of information</strong> across physical networks, wireless systems, and cloud environments. It covers on-site, hybrid, and remote communications, ensuring that data stays safe whether employees are in the office, working from home, or travelling.</p><p>Key practices include controlling network access, encrypting sensitive communications, and securing remote connections so outsiders can’t slip in unnoticed.</p><blockquote>In fortress terms: this is like <strong>protecting the roads, gates, and secret tunnels</strong> that connect your fortress to the outside world. You want goods and messages to flow smoothly, but only to the right people — and without enemies sneaking through.</blockquote><h4>Quick Recap of Domains 1–4</h4><ul><li><strong>Security and Risk Management = Why and what to protect.</strong></li><li><strong>Asset Security = What exactly you own and how valuable it is.</strong></li><li><strong>Security Architecture and Engineering = How to actually defend them.</strong></li><li><strong>Communication and Network Security = How to protect the channels your assets move.</strong></li></ul><p>That wraps up the <strong>first four CISSP security domains</strong>:</p><ul><li><strong>Security &amp; Risk Management →</strong> <em>the blueprint</em></li><li><strong>Asset Security →</strong> <em>the treasure room</em></li><li><strong>Security Architecture &amp; Engineering →</strong> <em>the fortress design</em></li><li><strong>Communication &amp; Network Security →</strong> <em>the guarded roads</em></li></ul><p>But we’re only halfway there<strong>. Watch out for the next four domains</strong>, where we’ll dive into identity, testing, operations, and software security. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ff3d7fa591e" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/breaking-down-the-first-four-cissp-security-domains-a-beginners-perspective-9ff3d7fa591e">Breaking Down the First Four CISSP Security Domains: A Beginner’s Perspective</a> was originally published in <a href="https://meetcyber.net/">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Down the Phases of Incident Response: A Beginner’s Perspective]]></title>
            <link>https://meetcyber.net/breaking-down-the-phases-of-incident-response-a-beginners-perspective-54de0ed396da?source=rss-6933aea46b54------2</link>
            <guid isPermaLink="false">https://medium.com/p/54de0ed396da</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[incident-response]]></category>
            <dc:creator><![CDATA[A Beginner's Perspective]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 15:52:57 GMT</pubDate>
            <atom:updated>2025-09-23T18:22:39.666Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when prevention fails? Firewalls, antivirus software, and training can reduce risks, but no system is 100% safe. When an attack slips through, organisations need a plan, and that plan is called <strong>Incident Response</strong>.</p><p><strong>Incident Response</strong> is the structured approach an organisation takes to prepare for, detect, contain, and recover from security incidents such as threats, vulnerabilities, and risks. It ensures that when something goes wrong, the impact is minimised, and normal operations can be restored quickly.</p><h4>Why Incident Response Matters</h4><p>Imagine you own a <strong>shop</strong>. You install <strong>strong locks</strong>, set up <strong>CCTV cameras</strong>, and even <strong>train your staff</strong> to be alert. That’s <strong>prevention, </strong>and it works most of the time. But one night, despite all your efforts, a <strong>thief breaks in</strong>. What happens next? Do you panic? Or do you follow a <strong>plan</strong>: call the <strong>police</strong>, lock the rest of the shop, and make sure the thief can’t steal more?</p><p>That’s exactly why <strong>Incident Response</strong> exists in cybersecurity. No matter how strong your <strong>defences</strong> are, attacks can still <strong>slip through</strong>. Without a proper <strong>response plan</strong>, a small <strong>breach</strong> can snowball into a disaster, like <strong>one stolen item</strong> leading to the <strong>entire shop</strong> being emptied.</p><p>Now here’s the key: <strong>smart shop owners</strong> don’t just react randomly when something goes wrong. They have a <strong>playbook</strong>. The playbook tells them exactly what to do: which <strong>staff member</strong> calls the <strong>police</strong>, who <strong>secures the shop</strong>, and who <strong>checks the CCTV footage</strong>. This way, when <strong>chaos strikes</strong>, everyone knows their <strong>role</strong>, and nothing important is missed.</p><blockquote>In cybersecurity, an <strong>Incident Response Playbook</strong> (sometimes called a <strong>Runbook</strong>) works the same way. It’s like a <strong>fire drill</strong> in a <strong>school, </strong>clear instructions that guide every step. By breaking the response process into structured <strong>phases</strong>, the <strong>organisation</strong> can act with <strong>order</strong> and <strong>precision</strong> instead of <strong>confusion</strong>, ensuring a <strong>quick recovery</strong> with <strong>minimal damage</strong>.</blockquote><p>So, what are these <strong>phases</strong>, and how do they work? Let’s break them down <strong>step by step</strong>.</p><h4>The common phases are:</h4><ol><li>Preparation</li><li>Detection and Analysis</li><li>Containment</li><li>Eradication and Recovery</li><li>Post-Incident Activity</li></ol><h4>Preparation</h4><p>Preparation is the phase where you get everything ready for an incident, putting the appropriate things in place<strong>. It’s basically saying, “this is what to do when there is an incident”.</strong> This means making sure your team, tools, and processes are ready before anything bad happens.</p><p>In our <strong>shop analogy</strong>, preparation is everything you do <em>before</em> the thief even shows up. It’s installing <strong>strong locks</strong>, setting up <strong>CCTV cameras</strong>, training your <strong>staff to stay alert</strong>, and even running <strong>mock drills</strong> so everyone knows what to do if something happens.</p><p>In cybersecurity, preparation looks like this:</p><ul><li>Setting up <strong>defence tools</strong> such as firewalls, antivirus software, and monitoring systems.</li><li>Defining <strong>roles and responsibilities</strong> (who investigates, who communicates, who fixes).</li><li>Building and practising an <strong>Incident Response Playbook</strong> so nobody panics when chaos strikes.</li><li>Keeping <strong>backups</strong> and documenting critical systems so recovery is easier.</li></ul><p>Without strong preparation, even the best response plan will fail — it’s like having a fire escape route but never showing your staff where the exits are.</p><h4>Detection and Analysis</h4><p>Detection and Analysis is the phase where you discover that something unusual is happening and try to understand what it is. It’s the moment when you ask, <strong><em>“Is this a real incident or just a false alarm?”</em></strong></p><p>In our <strong>shop analogy</strong>, this is like when the <strong>alarm goes off</strong> or a <strong>staff member notices a broken window</strong>. You don’t immediately know if it’s a thief, a cat that sneaked in, or just the wind knocking something over. So you <strong>check the cameras, inspect the shop floor, and confirm if it’s a real break-in.</strong></p><p>In cybersecurity, detection and analysis look like this:</p><ul><li><strong>Monitoring alerts and logs</strong> from tools like SIEM, IDS/IPS, or antivirus.</li><li><strong>Validating alerts</strong> to separate false positives from real threats.</li><li><strong>Collecting evidence</strong>: suspicious files, IP addresses, error logs.</li><li><strong>Classifying the incident’s severity</strong> (low, medium, high, critical) so the right response is triggered.</li></ul><p>Without proper detection and analysis, you may either <strong>panic over nothing</strong> (false alarms) or <strong>miss a real attack</strong> until it’s too late.</p><h4><strong>Containment</strong></h4><p>Containment is the phase where you block the incident from having any more effect beyond what it has already caused. The goal here isn’t to fix everything right away, but to stop the damage from spreading further.</p><p>In our <strong>shop analogy</strong>, this is like when the <strong>thief is inside the shop</strong> and you quickly <strong>lock down certain sections</strong> so they can’t reach more goods. Maybe you secure the storeroom, block off the cash register, or shut the shutters halfway to limit their movement. You haven’t removed the thief yet — but you’ve kept them from causing more loss.</p><p>In cybersecurity, containment looks like this:</p><ul><li><strong>Isolating affected systems</strong> from the network.</li><li><strong>Blocking malicious IPs, accounts, or processes</strong>.</li><li><strong>Applying temporary fixes</strong> to prevent further exploitation.</li><li><strong>Preserving evidence</strong> (logs, disk images) before making big changes, so the investigation isn’t compromised.</li></ul><p>Without effective containment, a small compromise (like one stolen item) can quickly escalate into a <strong>full-store wipeout</strong>.</p><h4>Eradication and Recovery</h4><p>Eradication and Recovery is the phase where we remove the “threat” completely and attempt to restore what was lost, stolen, or damaged. If possible, data is recovered from backups or recreated, and systems are brought back to normal operation<strong>.</strong></p><p>In our <strong>shop analogy</strong>, this is when the thief has been caught and taken away. Now you:</p><ul><li>Sweep the shop clean of any broken glass.</li><li>Repair the door or window that they broke.</li><li>Check your inventory to see what’s missing.</li><li>Replace stolen items with new stock (if possible).</li></ul><p>You’re not just blocking the thief anymore — you’re making sure the shop is safe, clean, and back in business.</p><p>In <strong>cybersecurity</strong>, eradication and recovery may include:</p><ul><li><strong>Removing malware, viruses, or malicious files</strong> from the system.</li><li><strong>Rebuilding compromised servers or reinstalling clean OS images.</strong></li><li><strong>Restoring lost or encrypted data from secure backups.</strong></li><li><strong>Patching vulnerabilities</strong> so the same exploit can’t happen again.</li><li><strong>Validating systems</strong> before putting them back online.</li></ul><p>This phase ensures the threat is gone for good, and operations can safely return to normal, stronger and more resilient than before.</p><h4>Post-Incident Activity</h4><p>Lastly, Post-Incident Activity, this is the phase where you document lessons learned, present them to the appropriate people, and apply those lessons to strengthen future responses.</p><p>In the <strong>shop analogy</strong>, once the thief is gone and the shop is back in order, you don’t just move on like nothing happened. You:</p><ul><li>Review what went wrong — how did the thief get in?</li><li>Write down everything that happened so you don’t forget.</li><li>Share the findings with your staff or management.</li><li>Improve your security (maybe stronger locks, a better alarm, or new staff training).</li></ul><p>In <strong>cybersecurity</strong>, Post-Incident Activity involves:</p><ul><li><strong>Documenting the full incident timeline</strong> (what happened, when, and how it was handled).</li><li><strong>Reporting findings to leadership, stakeholders, or regulators</strong> where necessary.</li><li><strong>Holding a “lessons learned” meeting</strong> with the incident response team.</li><li><strong>Updating policies, tools, and playbooks</strong> to prevent a repeat of the same incident.</li><li><strong>Training staff</strong> based on new insights.</li></ul><p>This phase makes sure the organisation grows stronger with each incident, turning every attack into an opportunity for improvement.</p><blockquote>“Some experts also highlight <strong>Coordination</strong> as a critical element. While not always listed as a separate phase, coordination is what keeps everyone aligned throughout the response ensuring the right people are informed, actions aren’t duplicated, and nothing slips through the cracks.”</blockquote><h4>Conclusion</h4><p>Incident Response isn’t just about fixing problems after they happen — it’s about having a clear plan so that when chaos strikes, your organisation can act quickly, stay calm, and minimise the damage. Think of it like running a shop: prevention keeps most thieves out, but when one does break in, a solid playbook ensures you don’t lose everything.</p><p>By understanding the phases — preparation, detection, containment, eradication, recovery, and post-incident activity — you can see how each step builds on the other to keep systems resilient. And with strong coordination throughout, nothing important gets missed.</p><p>The truth is, <strong>cyber incidents are not a matter of “if” but “when.”</strong> The real question is: <em>will you be ready to respond?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54de0ed396da" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/breaking-down-the-phases-of-incident-response-a-beginners-perspective-54de0ed396da">Breaking Down the Phases of Incident Response: A Beginner’s Perspective</a> was originally published in <a href="https://meetcyber.net/">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THE DJANGO ADMIN SITE]]></title>
            <link>https://awstip.com/the-django-admin-site-8eb7c8e63a3f?source=rss-6933aea46b54------2</link>
            <guid isPermaLink="false">https://medium.com/p/8eb7c8e63a3f</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django-framework]]></category>
            <category><![CDATA[django-admin]]></category>
            <dc:creator><![CDATA[A Beginner's Perspective]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 12:03:09 GMT</pubDate>
            <atom:updated>2022-12-19T17:39:42.137Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mkncq11E3UjluljBobdh1w.png" /></figure><p>In this article, I will show you how to use the Django admin site, its features, and its possibilities. As part of the demonstration, we’ll refer to the article on <a href="https://awstip.com/setting-up-a-django-project-c825f90ea8a5"><em>setting up a Django project</em></a>. You would need prior knowledge of how to set up a Django project, if you don’t you can check out my article on the topic <a href="https://awstip.com/setting-up-a-django-project-c825f90ea8a5"><em>here</em></a>.</p><h4>What is The Django Admin site?</h4><p>Django comes with a very powerful admin interface. This interface can use your models to automatically build a Website area that you can use to create, view, update, and delete records. This can save you a lot of time during development, making it very easy to test your models, interact with your model and get a feel of whether or not you have the <em>right</em> data. The admin application can also be useful for managing data in production, depending on the type of website.</p><p>The Django project recommends the admin application only for internal data management (i.e. just for use by admins, or people in your organization), as the model-centric approach is not necessarily the best possible interface for all users, and exposes a lot of unnecessary detail about the models. Also, Django gives us an opportunity to change the default admin interface using Admin Class Models present in the admin library.</p><p>All the configuration required to include the admin application in your website is done automatically when you <a href="https://awstip.com/setting-up-a-django-project-c825f90ea8a5">start a Django project</a>. Before we start developing we need to be in the URL path of the project.</p><p>We will now create two apps, “blog” and “library”. First, we need to activate our virtual environment.</p><pre>workon django_env </pre><p><strong>“workon”</strong> is the command for activating the virtual environment created with <strong><em>mkvirtualenv</em>.</strong> However, to use <em>mkvirtualenv </em>you need to have <strong><em>virtualenvwrapper</em>-<em>win</em></strong> or <strong><em>virtualenvwrapper</em></strong> installed, django_env is the name of the virtual environment.</p><p><strong>*Note</strong>: You can check the virtual environment setup with virtualenvwrapper-win or virtualenvwrapper <a href="https://awstip.com/setting-up-a-django-project-c825f90ea8a5"><em>here</em></a><em>.</em></p><p>Now we can create our apps.</p><pre>django-admin startapp blog</pre><pre>django-admin startapp library</pre><p>Then we open the project which is core and add our apps to the installed app in the setting.py file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TwrwMoWj6v0PMoHPo_BwfA.png" /></figure><h4>Accessing the admin site</h4><p>Before accessing the admin site a superuser is required. Now we migrate before creating a super user.</p><pre>python manage.py migrate</pre><p>If you see receive this message as feedback, your migration was successful.</p><pre>Operations to perform:<br>  Apply all migrations: admin, auth, contenttypes, sessions<br>Running migrations:<br>  Applying contenttypes.0001_initial... OK<br>  Applying auth.0001_initial... OK<br>  Applying admin.0001_initial... OK<br>  Applying admin.0002_logentry_remove_auto_add... OK<br>  Applying admin.0003_logentry_add_action_flag_choices... OK<br>  Applying contenttypes.0002_remove_content_type_name... OK<br>  Applying auth.0002_alter_permission_name_max_length... OK<br>  Applying auth.0003_alter_user_email_max_length... OK<br>  Applying auth.0004_alter_user_username_opts... OK<br>  Applying auth.0005_alter_user_last_login_null... OK<br>  Applying auth.0006_require_contenttypes_0002... OK<br>  Applying auth.0007_alter_validators_add_error_messages... OK<br>  Applying auth.0008_alter_user_username_max_length... OK<br>  Applying auth.0009_alter_user_last_name_max_length... OK<br>  Applying auth.0010_alter_group_name_max_length... OK<br>  Applying auth.0011_update_proxy_permissions... OK<br>  Applying auth.0012_alter_user_first_name_max_length... OK<br>  Applying sessions.0001_initial... OK</pre><p>Now we can now create a super user.</p><pre>python manage.py createsuperuser<br>Username (leave blank to use &#39;user&#39;): user<br>Email address: admin@gmail.com<br>Password: <br>Password (again):<br>This password is too common.<br>This password is entirely numeric.<br>Bypass password validation and create user anyway? [y/N]: y<br>Superuser created successfully.</pre><p>I made my username - “<strong>user”</strong>, email address - “<strong>admin@gmail.com”;</strong> and the password won’t show while you are typing , but my password is “1234567890” this piece of information should be private. Now we run our server.</p><pre>python manage.py runserver</pre><p>You should see this kind of message.</p><pre>Watching for file changes with StatReloader<br>Performing system checks...<br><br>System check identified no issues (0 silenced).<br>December 14, 2022 - 14:01:26<br>Django version 4.1.4, using settings &#39;core.settings&#39;<br>Starting development server at http://127.0.0.1:8000/<br>Quit the server with CTRL-BREAK.</pre><p>Now go to http://127.0.0.1:8000/admin in your browser you should see a page like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSFvp1lIznR6BEzEYktdUQ.png" /></figure><p>Now input the same username and password we created earlier my username would be user and my password is 1234567890. If you input them correctly you should see a page like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SVCejT-qgmJ7s5V-p5x0UA.png" /></figure><p>So that the basics of accessing the admin site.</p><h4>Customizing your Django admin site</h4><p>Now open the ‘core/admin.py’ file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yACqWyyEBYo90NiZH1qlRA.png" /></figure><p>We are going to make three changes in urls.py:</p><pre>admin.site.site_header = &quot;zeepy Admin&quot;<br>admin.site.site_title = &quot;zeepy Admin Portal&quot;<br>admin.site.index_title = &quot;Welcome to zeepy Researcher Portal&quot;</pre><p>when we logout from the admin site there should be a change in the header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THjWvzg-3ZMSMI8lSy3vxg.png" /></figure><p>If you log in there should be a change in the page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umNd8JdjJIMBgdtgJanZfA.png" /></figure><h4>Set up a customer admin sites</h4><p><strong>setting up a new admin area for the blog</strong></p><p>We will open the blog app and inside the blog app we will open the admin.py file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkgyXQ5ogo3G5XsrW0-9ww.png" /></figure><p>The next thing is to build a new class, which we are going to call the class <em>BlogAdminArea</em>. We are going to inherit from the admin class and We are going to add the site_header which will change the name of our admin area, we are also going to register it</p><pre>class BlogAdminArea(admin.Adminsite):<br>    site_header = &#39;Blog admin area&#39;<br><br>blog_admin_site = BlogAdminArea(name=&#39;BlogAdmin&#39;)</pre><p>Now we are going to the ‘core/urls.py’ to comment out the previous code we wrote in there and import the blog_admin_site from ‘blog/admin.py’ and change the admin.site.urls to blog_admin_site.url because we no longer want to use the default admin site but instead we want to the blog_admin_site we created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*X6bKZf4CLCrE4s92Fd-Sew.png" /></figure><p>Now we will run our server</p><pre>python manage.py runserver </pre><p>There is going to be a change in the Admin login page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yheJYTvekTtUMp6ACn1qcQ.png" /></figure><p>After logging in we should get this kind of page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1VIA1zn1tDmWESbHdoNPA.png" /></figure><p>Now navigate to ‘blog/models’ and create a model.</p><pre>class Post(models.Model):<br>    title = models.CharField(max_length=100)<br>    <br>    def __str__(self):<br>        return self.title</pre><p>Now we would make migration</p><pre>python manage.py makemigrations</pre><p>If you see receive this message as feedback, you have successfully make migration.</p><pre>Migrations for &#39;blog&#39;:<br>  blog\migrations\0001_initial.py<br>    - Create model post</pre><p>Now we can migrate</p><pre>python manage.py migrate  </pre><p>If you see receive this message as feedback, you have migrated successfully.</p><pre>Operations to perform:<br>  Apply all migrations: admin, auth, blog, contenttypes, sessions<br>Running migrations:<br>  Applying blog.0001_initial... OK</pre><p>Now let’s register the model that we created, navigate to the ‘blog/admin.py’, and import the model in the admin.py file</p><pre>from . import models</pre><p>normally we would have done it this way</p><pre>admin.site.register(models.Post)</pre><p>but since we are not using the Django default admin site but we are using the blog_site admin so we would register it this way</p><pre>blog_site.register(models.Post)</pre><p>Let’s run our server and navigate to “<a href="http://localhost:8000/admin/">http://localhost:8000/admin/</a>” in our browser. There should be on our admin page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RtKRkfnno7JcZHM5jmk8Pw.png" /></figure><p>We now have access to the post we created in the ‘blog/model’. If you are new to the admin site this page is used to add data to the database.</p><p>We can still access the original admin site, so navigate to the ‘core/admin.py’ file and make these changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*QC2HMwJaDwozBIHN72JRYg.png" /></figure><p>Now let’s navigate to ‘<a href="http://localhost:8000/admin/">http://localhost:8000/admin/</a>’ in our browser, we should have this view…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VDtsUdqfTefpqYsT3u6Iw.png" /></figure><p>So let’s navigate to “<a href="http://localhost:8000/blog_admin/">http://localhost:8000/blog_admin/</a>” in our browser to this view…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2U5dMCFSsZznHKo3EiZDg.png" /></figure><h4>Registering multiple models to the admin site</h4><p>Let’s say we have multiple models in our ‘blog/models.py’. we can register them at once</p><pre>from django.contrib import admin<br>import django.apps<br><br>models = django.apps.apps.get_models()<br><br>for model in models:<br>    try:<br>        admin.site.register(model)<br>    except admin.site.AlreadyRegistered:<br>        pass       </pre><h4>Resources</h4><ul><li><a href="https://www.youtube.com/playlist?list=PLOLrQ9Pn6cazhaxNDhcOIPYXt2zZhAXKO&#39;"><em>Django admin series</em></a></li><li><em>D</em><a href="https://drive.google.com/file/u/1/d/1tl1rNK2bs0vQbRlPW1sfVd-pnQyRzEmo/view?usp=sharing"><em>jango admin cookbook</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8eb7c8e63a3f" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/the-django-admin-site-8eb7c8e63a3f">THE DJANGO ADMIN SITE</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inserting, deleting, and updating data using Django ORM]]></title>
            <link>https://medium.com/@ezekieleniola36/inserting-deleting-and-updating-data-using-django-orm-36e124460ad6?source=rss-6933aea46b54------2</link>
            <guid isPermaLink="false">https://medium.com/p/36e124460ad6</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[django-orm]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[A Beginner's Perspective]]></dc:creator>
            <pubDate>Fri, 09 Dec 2022 16:38:47 GMT</pubDate>
            <atom:updated>2022-12-09T16:38:47.243Z</atom:updated>
            <content:encoded><![CDATA[<p>Django allows us to interact with its database models, that is, add, delete, modify and query objects using the ORM (Object Relational Mapper) database abstraction API. In this article, We are going to learn about inserting, deleting, and updating data using Django-ORM</p><p>For demonstration purposes, we’ll use the following Django model.</p><pre>class Song (models.Model):<br>  name = models.CharField(max_length = 100)<br>  def __str__ ( self ):<br>    return self.name</pre><p>We can access the Django ORM by running the following command in the directory of our project.</p><pre>python manage.py shell</pre><p>This brings us to the interactive Python console. Assuming our models exist in <strong>dangoproject/myProject/songs/models.py </strong>we can import our models using the following command:</p><pre>&gt;&gt;&gt; from songs.models import Song</pre><h4>ADDING OBJECTS</h4><p>To create a Song model object and store it in the database, we need to write the following command:</p><pre>&gt;&gt;&gt; s = Song (name = &quot;Castle on the Hill&quot;) <br>&gt;&gt;&gt; s.save ()<br>&gt;&gt;&gt;Song.objects.all().count() </pre><p>To get all the model objects we write the following command:</p><pre>&gt;&gt;&gt;Song.objects.all()<br>&lt;QuerySet [&lt;Song: Castle on the Hill&gt;]&gt;</pre><h4>How to create multiple objects in one shot?</h4><p>There are conditions when we want to save multiple objects in one go. Say we want to add multiple songs at once and we don’t want to make many queries to the database. We can use “bulk_create” for creating multiple objects in one shot. bulk_create takes a list of unsaved objects.</p><p>Here is an example.</p><pre>&gt;&gt;&gt; Song.objects.all().count()<br>1<br>&gt;&gt;&gt;Song.objects.bulk_create(<br>[Song(name=&quot;God is Good&quot;),<br>Song(name=&quot;coming home&quot;),<br>Song(name=&quot;Life is Good&quot;)]<br>)<br>[&lt;Song: God is Good&gt;, &lt;Song: coming home&gt;, &lt;Song: Life is Good&gt;]<br>&gt;&gt;&gt;Song.objects.all().count()<br>4</pre><h4>MODIFYING EXISTING OBJECTS</h4><p>We can modify an existing object as follows:</p><pre>&gt;&gt;&gt; a = Song.objects.get(pk = 3)<br>&gt;&gt;&gt; a.name= &#39;am done&#39;<br>&gt;&gt;&gt; a.save()</pre><h4>DELETING OBJECTS</h4><p>To delete one object, we need to write the following commands:</p><pre>&gt;&gt;&gt; b = song.objects.get(pk=1)<br>b.delete()<br>Song.objects.all()<br>&lt;QuerySet [&lt;Song: God is Good&gt;,&lt;Song: am done&gt;,&lt;Song: life is good&gt;]&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36e124460ad6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SETTING UP A DJANGO PROJECT]]></title>
            <link>https://awstip.com/setting-up-a-django-project-c825f90ea8a5?source=rss-6933aea46b54------2</link>
            <guid isPermaLink="false">https://medium.com/p/c825f90ea8a5</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[django-framework]]></category>
            <dc:creator><![CDATA[A Beginner's Perspective]]></dc:creator>
            <pubDate>Mon, 05 Dec 2022 09:06:36 GMT</pubDate>
            <atom:updated>2022-12-14T10:08:16.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KP-gAw3qIkwNits2d5yjFw.png" /></figure><h3>Django Web Framework (Python)</h3><p>When you are interested in developing a web application using Python, Django is one of the best choices. In recent years, it has gained a lot of popularity among developers.</p><p>Django is an extremely popular and fully featured server-side web framework, written in Python. This article shows you why Django is one of the most popular web server frameworks, what Django Framework is, how to set up a development environment, and how to start using it to create your web applications. website project.</p><h4>Prerequisites</h4><p>Before starting this article you don’t need to have any knowledge of Django. Ideally, you would need to understand what server-side web programming and web frameworks are by reading the topics in the mdn web docs module <a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps">Server-side website programming’s first steps</a>.</p><p>A general knowledge of programming concepts and <a href="https://developer.mozilla.org/en-US/docs/Glossary/Python">Python</a> is recommended but is not essential to understanding the core concepts.</p><h3>What is Django Framework</h3><p>Django is a full-stack Python web framework that helps in developing a maintainable and secure application in an easy way and in a shorter time.</p><p>It is a free and open-source framework and also has an active community to maintain regularly. It focuses on automation and follows the DRY (Don’t Repeat Yourself ) principle.</p><h3>Setting up a Django development environment</h3><h4>Step 1 — Installing Python</h4><p>Django is written in 100% pure Python code, so you’ll need to install Python on your system. To use Django you will have to install Python on your operating system. If you’re using <em>Python 3</em> then you will also need the <a href="https://pypi.org/">Python Package Index</a> tool — <em>pip3</em> — which is used to manage (install, update, and remove) Python packages/libraries used by Django and your other Python apps.</p><p>This section explains how you can check what versions of Python are present, and install new versions as needed, for Ubuntu Linux 20.04, macOS, and Windows 10.</p><p><strong>Ubuntu Linux 20.04</strong></p><p>Ubuntu Linux 20.04 probably has Python 3.8.10 by default. You can verify it by typing python3 -V command at the terminal. If you see something like this, then Python is installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*_oxofuUOucKtuGI4-MbAJg.png" /></figure><p>However, the Python Package Index tool (<em>pip3</em>) you’ll need to install packages for Python 3 (including Django) is not available by default. You can install <em>pip3</em> in the bash terminal using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*TvoUeiMdybNSLcXHA3AEkA.png" /></figure><p><strong>macOS</strong></p><p>macOS “El Capitan” and other more recent versions do not include Python3. You can confirm this by running the following commands in the zsh or bash terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*QIL7b60LXykzsEXM9UwZ7w.png" /></figure><p>You can easily install Python 3 (along with the <em>pip3</em> tool) from <a href="https://www.python.org/">python.org</a>:</p><p><strong><em>Download the required installer:</em></strong></p><ol><li>Go to <a href="https://www.python.org/downloads/macos/">https://www.python.org/downloads/macos/</a></li><li>Download the most recent <a href="https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django">supported version</a> that works with Django 4.0.2.</li></ol><p><strong><em>Locate the file using Finder, and double-click the package file. Following the installation prompts.</em></strong></p><p>You can now confirm successful installation by checking for the <em>Python 3</em> version as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*HMQKNs_13brxZ0zrftWuxQ.png" /></figure><p><strong>Windows 10 or 11</strong></p><p>Windows don’t include Python by default, but you can easily install it (along with the <em>pip3</em> tool) from <a href="https://www.python.org/">python.org</a></p><p><strong><em>Download the required installer:</em></strong></p><ol><li>Go to <a href="https://www.python.org/downloads/windows/">https://www.python.org/downloads/windows/</a></li><li>Download the most recent <a href="https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django">supported version</a> that works with Django 4.0.2.</li></ol><p><strong><em>Install Python by double-clicking on the downloaded file and following the installation prompts</em></strong></p><p><strong><em>Be sure to check the box labeled “Add Python to PATH”</em></strong></p><p>You can then verify that Python 3 was installed by entering the following text into the command prompt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*CS516WBXwJtLpnkNDDWj4Q.png" /></figure><h4>Step 2 — Using Django inside a Python virtual environment</h4><p><strong>How to set up a development environment</strong></p><p>I will show you how to set up a Django development environment on Windows, Linux (Ubuntu), and macOS — whatever common operating system you are using, this section should give you what you need to be able to start developing Django apps.</p><p><strong>Ubuntu virtual environment setup</strong></p><p>After installing Python and pip you can install <em>virtualenvwrapper</em> (which includes virtualenv) follow the instructions below.</p><p><strong>Install the tool using <em>pip3</em>:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*pu601oAf4uVRf3TNo3wYig.png" /></figure><p>Then add the following lines to the end of your shell startup file (this is a hidden file name .bashrc in your home directory). These set the location where the virtual environments should live, the location of your development project directories, and the location of the script installed with this package:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*mODkPDL-cUxgJe2AjbKbnA.png" /></figure><p>Then reload the startup file by running the following command in the terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*3ydndfNiHLu-IlnXJZk12Q.png" /></figure><p>At this point you should see a bunch of scripts being run as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*BfU9Jdt3I18FnASMQqFttw.png" /></figure><p><strong>macOS virtual environment setup</strong></p><p>Install <em>virtualenvwrapper</em> (and bundling <em>virtualenv</em>) using <em>pip</em> as shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*pu601oAf4uVRf3TNo3wYig.png" /></figure><p>Then add the following lines to the end of your shell startup file (these are the same lines as for Ubuntu). If you’re using the <em>zsh shell</em> then the startup file will be a hidden file named .zshrc in your home directory. If you’re using the <em>bash shell</em> then it will be a hidden file named .bash_profile. You may need to create the file if it does not yet exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*mODkPDL-cUxgJe2AjbKbnA.png" /></figure><p>Then reload the startup file by making the following call in the terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*j-ROl00SvjH8Ay5RrKJjpg.png" /></figure><p>At this point, you may see a bunch of scripts being run (the same scripts as for the Ubuntu installation). You should now be able to create a new virtual environment with the mkvirtualenv command.</p><p>Note: If you can’t find the startup file to edit in the finder, you can also open this in the terminal using nano.</p><p>Assuming you’re using bash, the commands look something like this:</p><pre>cd ~  # Navigate to my home directory<br>ls -la #List the content of the directory. YOu should see .bash_profile<br>nano .bash_profile # Open the file in the nano text editor, within the terminal<br># Scroll to the end of the file, and copy in the lines above<br># Use Ctrl+X to exit nano, choose Y to save the file.</pre><p><strong>Windows virtual environment setup</strong></p><p>To set up a virtual environment you need to run the following command in the command prompt:</p><pre>pip3 install virtualenvwrapper-win</pre><p>Now you can create a new virtual environment with the mkvirtualenv command</p><h4>Step 3— Creating a virtual environment</h4><p>Once you’ve installed <em>virtualenvwrapper</em> or <em>virtualenvwrapper-win</em> then working with virtual environments is very similar on all platforms.</p><p>Now you can create a new virtual environment with the mkvirtualenv command. As this command runs you&#39;ll see the environment being set up (what you see is slightly platform-specific). When the command completes the new virtual environment will be active — you can see this because the start of the prompt will be the name of the environment in brackets</p><pre> mkvirtualenv my_django_environment</pre><p>Now you’re inside the virtual environment you can install Django and start developing.</p><h4>Using a virtual environment</h4><p>There are just a few other useful commands that you should know:</p><ul><li>deactivate — Exit out of the current Python virtual environment</li><li>workon — List available virtual environments</li><li>workon name_of_environment — Activate the specified Python virtual environment</li><li>rmvirtualenv name_of_environment — Remove the specified environment.</li></ul><h4>Step 4— Installing Django</h4><p>Once you’ve created a virtual environment, and called workon to activate it, you can use <em>pip3</em> to install Django.</p><pre>pip3 install django~=4.0</pre><p>You can test that Django is installed by running the following command</p><pre># Linux/macOS<br>python3 -m django --version<br> 4.0.2<br><br># Windows<br>py -3 -m django --version<br> 4.0.2</pre><p>Note: If the above Windows command does not show a django module present, try:</p><pre>py -3 -m django --version</pre><h3>Testing your installation</h3><p>Let’s create a skeleton project. To do this, first, navigate in your command prompt/terminal to where you want to store your Django apps. Create a folder for your skeleton project site and navigate into it.</p><pre>mkdir django_projects<br>cd django_projects</pre><p>You can then create a new skeleton site called <em>“core”</em> using the django-admin tool as shown</p><pre>django-admin startproject core<br>cd core</pre><p>We can run the development web server from within this folder using manage.py and the runserver command, as shown.</p><pre>python3 manage.py runserver<br>Watching for file changes with StatReloader<br>Performing system checks…<br><br>System check identified no issues (0 silenced).<br><br>You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.<br>Run &#39;python manage.py migrate&#39; to apply them.<br>March 01, 2022 - 01:19:16<br>Django version 4.0.2, using settings &#39;mytestsite.settings&#39;<br>Starting development server at http://127.0.0.1:8000/<br>Quit the server with CONTROL-C.</pre><p>Once the server is running you can view the site by navigating to the following URL on your local web browser: http://127.0.0.1:8000/. You should see a site that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQhG13AWWLV1rSs0s3i7aA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c825f90ea8a5" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/setting-up-a-django-project-c825f90ea8a5">SETTING UP A DJANGO PROJECT</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>