<?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 Jeremiah Effoing David on Medium]]></title>
        <description><![CDATA[Stories by Jeremiah Effoing David on Medium]]></description>
        <link>https://medium.com/@jeremiahedavid?source=rss-5b9e3b151f62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZHEkRCMsJowReBpRS58y4Q.png</url>
            <title>Stories by Jeremiah Effoing David on Medium</title>
            <link>https://medium.com/@jeremiahedavid?source=rss-5b9e3b151f62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:55:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeremiahedavid/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[Small Language Models Are the AI Revolution West Africa Has Been Waiting For]]></title>
            <link>https://jeremiahedavid.medium.com/small-language-models-are-the-ai-revolution-west-africa-has-been-waiting-for-f7d0c8f934ed?source=rss-5b9e3b151f62------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7d0c8f934ed</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jeremiah Effoing David]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 03:37:47 GMT</pubDate>
            <atom:updated>2026-03-29T03:37:47.254Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*hZ_yrwpQ0wlyOTe7pkxMrA@2x.jpeg" /></figure><p><em>You don’t need GPT-4 to save a life, teach a child, or grow better crops. You need a small, fast, focused model — and the courage to build one.</em></p><p>You don’t need GPT-4 to save a life, teach a child, or grow better crops. You need a small, fast, focused model — and the courage to build one.</p><p>The future of AI in emerging markets isn’t about building the biggest model — it’s about building the most precise one. A 15-million-parameter Small Language Model (SLM) that knows everything about cassava diseases is infinitely more valuable to a Nigerian farmer than a trillion-parameter model that knows a little about everything.</p><p>This document outlines what SLMs are, how they are built, why they are perfectly suited for West Africa, and how innovators can immediately begin creating high-impact solutions in healthcare, education, and agriculture — powered by localized datasets, multi-SLM agent systems, IoT, and robotics.</p><h3>What Are Small Language Models?</h3><p>When most people hear “AI,” they picture massive cloud-connected systems like GPT-4 trained on virtually the entire internet. Small Language Models (SLMs) represent a more powerful, practical shift.</p><p>An SLM is an AI language model intentionally constrained in size and scope. It is trained on a curated, domain-specific dataset rather than the entire web. The result is a compact model (as small as 15 million parameters) that is dramatically faster, more efficient, and often more accurate within its specialized domain than any generalist giant.</p><p>Think of it as a seasoned specialist doctor versus a brilliant generalist: the specialist wins every time when the case matches their expertise. SLMs are your domain specialists.</p><h3>How SLMs Are Built: The Method</h3><p>Training an SLM is surprisingly accessible. According to a <a href="https://youtu.be/pOFcwcwtv3k">production-level tutorial by machine learning engineer Dr. Raj Dandekar</a>, you can pre-train a 15-million-parameter model on a single NVIDIA A100 GPU in just 25 — 30 minutes.</p><p>Step-by-step process:</p><ol><li>Curate your dataset — The most critical step. Collect high-quality, domain-specific text (medical guidelines, agricultural extension bulletins, WAEC-aligned curricula, local language corpora).</li><li>2. Tokenize &amp; preprocess — Convert text into numerical tokens using a tight, domain-relevant vocabulary.</li><li>3. Define the architecture — Use a lightweight transformer-based model.</li><li>4. Pre-train the model — Train it to predict the next token (25 — 30 minutes on A100).</li><li>5. Fine-tune for your task — Add labelled data for question-answering, diagnosis, or advisory use cases.</li><li>6. Deploy locally — Compress and run on mobile phones, edge devices, or laptops — no internet required.</li><li>Why this matters for West Africa: Training is cheap and fast. Deployment is offline. The model speaks directly to local problems in local languages.</li></ol><h3>Core Advantages of SLMs</h3><ol><li>⚡ <strong>Speed &amp; Efficiency</strong> — Fewer parameters = millisecond inference on consumer hardware.</li><li>📱 <strong>Local Deployment </strong>— Runs entirely offline on basic Android phones or low-cost tablets. Zero cloud costs, zero bandwidth dependency, full data privacy.</li><li>🔗 <strong>Agentic Integration </strong>— SLMs excel as specialized agents. Multiple SLMs can run together (one for health, one for education, one for agriculture) coordinated by intelligent routing agents that fetch the right data, synthesize results, and deliver comprehensive answers. This architecture powers complete solutions: mobile apps, Progressive Web Apps (PWAs), and desktop software tailored to any use case.</li></ol><h3>The West African Opportunity: Healthcare, Education &amp; Agriculture</h3><h4>Healthcare</h4><ol><li>Malaria triage assistant for community health workers</li><li>Maternal health companion in local languages (Pidgin, Yoruba, Hausa, etc.)</li><li>Medical record summarizer for understaffed clinics</li><li>IoT integration with low-cost vital-sign monitors for autonomous screening stations</li></ol><h4>Education</h4><ol><li>Curriculum-aligned tutor for WAEC/NECO syllabi</li><li>Literacy coach in indigenous languages</li><li>Teacher assistant for multi-grade classrooms</li><li>Offline e-learning agent on government-issued tablets</li></ol><h4>Agriculture</h4><ol><li>Crop disease identifier with camera + IoT soil sensors</li><li>Intelligent irrigation controller using local climate and crop data</li><li>Market price advisor for optimal selling decisions</li><li>Decision-making brain for low-cost robotic harvesting systems</li></ol><h3>Ushering in a New Age: IoT + Robotics + Multi-SLM Agents</h3><p>The true revolution happens when SLMs meet the physical world. A Raspberry Pi sensor node, camera, multi-SLM agent system, and servo-controlled sprayer can create a fully autonomous farm intervention system — all offline, all under $200 in hardware.</p><p>The same stack powers mobile health apps, PWA tutoring platforms, and desktop farm-management dashboards. Every component is open-source and buildable today in Lagos, Accra, or Dakar.</p><h3>The Critical Role of Localized Datasets</h3><p>The quality of any SLM depends entirely on the quality and relevance of its training data. West Africa needs far more contextual, high-quality datasets in local languages covering real-world scenarios in health, education, and agriculture.</p><p><strong>Call to action for every professional:</strong></p><p><em>Doctors, nurses, teachers, agronomists, and extension workers — your anonymized knowledge can become foundational training data.</em></p><p>Shoutout to Electric Sheep Africa (<a href="https://huggingface.co/electricsheepafrica">@electricsheepafrica</a> on Hugging Face) — a non-profit building deeply contextualized African datasets in malaria detection, maternal-child health, Nigerian agriculture, livestock productivity, and more.</p><p>Visit: <a href="https://huggingface.co/electricsheepafrica">https://huggingface.co/electricsheepafrica</a></p><blockquote>Contribute datasets today and accelerate the next generation of AI built for West Africa.</blockquote><h3>To Every Builder in West Africa — The Time Is Now</h3><p>You don’t need a PhD. You don’t need venture capital. You need a clear problem, a curated dataset, and the willingness to train a model that speaks precisely to that problem.</p><p>Getting Started: Your First SLM in 5 Steps</p><ol><li>Watch the full tutorial: <a href="https://youtu.be/pOFcwcwtv3k">https://youtu.be/pOFcwcwtv3k</a></li><li>Identify one specific community problem (e.g., “malaria triage in Kano”)</li><li>Curate 10,000 — 100,000 words of domain-specific data</li><li>Fine-tune the base model using the tutorial methods</li><li>Package it into a mobile app, PWA, or desktop tool and test with 10 real users</li><li>The convergence moment is here: SLMs are small enough for edge devices, IoT hardware is affordable, and the knowledge is freely available.</li><li>Let’s build the AI that actually improves health outcomes, education access, and agricultural yields across West Africa.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7d0c8f934ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Redis to store riders and drivers coordinates and broadcast the location in real-time…]]></title>
            <link>https://jeremiahedavid.medium.com/how-to-use-redis-to-store-riders-and-drivers-coordinates-and-broadcast-the-location-in-real-time-5eeb217f65ed?source=rss-5b9e3b151f62------2</link>
            <guid isPermaLink="false">https://medium.com/p/5eeb217f65ed</guid>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[django-channels]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <dc:creator><![CDATA[Jeremiah Effoing David]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 16:13:18 GMT</pubDate>
            <atom:updated>2023-03-25T04:48:30.574Z</atom:updated>
            <content:encoded><![CDATA[<h2>How to use Redis to store riders and drivers coordinates and broadcast the location in real-time to a WebSocket consumer with Django</h2><p>To use Redis in storing users’ point field coordinates and broadcasting the location real-time to a WebSocket consumer where the drivers can see the user marker move as it updates real-time, we need to do the following:</p><p>1. Install necessary packages:</p><pre>pip install channels channels_redis geopy</pre><p>2. Configure your Django settings to use Channels and Redis:</p><blockquote>Before you proceed it is required that the machine you are using to implement this has <strong>redis-cli. </strong>If<strong> </strong>you dont have it installed you can set up a docker file to spin up a redis build.</blockquote><pre>#settings.py<br><br>INSTALLED_APPS = [<br>    #...<br>    &#39;channels&#39;,<br>]<br><br>ASGI_APPLICATION = &#39;&lt;your_project_name&gt;.asgi.application&#39;<br><br>CHANNEL_LAYERS = {<br>    &quot;default&quot;: {<br>        &quot;BACKEND&quot;: &quot;channels_redis.core.RedisChannelLayer&quot;,<br>        &quot;CONFIG&quot;: {<br>            &quot;hosts&quot;: [(&quot;127.0.0.1&quot;, 6379)],<br>        },<br>    },<br>}<br></pre><p>3. Create a Django model to store the user’s location:</p><pre>#models.py<br><br>from django.contrib.auth.base_user import AbstractBaseUser<br>from django.utils.translation import ugettext_lazy as _<br><br><br>from django.contrib.gis.db import models<br><br>class User(AbstractBaseUser):<br>    name = models.CharField(max_length=100)<br>    location = models.PointField()<br></pre><p>We defined a user model that inherits Django default user model class and adds a name character name field with a max length of 100 and a Point based location field to store the latitude and longitude in postgreSQL</p><p>4. Once we have these setup, next is to define a view which takes in the coordinates from the device using the devices GPS or IP address.</p><pre># views.py<br><br>from django.contrib.gis.geos import Point<br>from django.views.decorators.csrf import csrf_exempt<br>from django.http import HttpResponse<br><br>@csrf_exempt<br>def update_location(request):<br>    # Parse the request data<br>    user_id = request.POST.get(&#39;user_id&#39;)<br>    latitude = request.POST.get(&#39;latitude&#39;)<br>    longitude = request.POST.get(&#39;longitude&#39;)<br><br>    # Update the user&#39;s location<br>    user = User.objects.get(id=user_id)<br>    user.location = Point(float(longitude), float(latitude))<br>    user.save()<br><br>    return HttpResponse(&#39;Location updated.&#39;)<br></pre><p>5. To be able to broadcast the users coordinates in real-time we need to create a channels consumer that updates the user’s location and broadcasts it to any subscriber to the same channel.</p><pre>from channels.generic.websocket import AsyncWebsocketConsumer<br>from django.contrib.gis.serializers.geojson import Serializer as GeoJSONSerializer<br>from django.core.serializers import serialize<br>from django.db.models import F<br>from channels.layers import get_channel_layer<br>import json<br><br>class UserLocationConsumer(AsyncWebsocketConsumer):<br>    async def connect(self):<br>        self.user_id = self.scope[&#39;url_route&#39;][&#39;kwargs&#39;][&#39;user_id&#39;]<br>        self.user_group_name = &#39;user_%s&#39; % self.user_id<br><br>        # Join user group<br>        await self.channel_layer.group_add(<br>            self.user_group_name,<br>            self.channel_name<br>        )<br><br>        await self.accept()<br><br>    async def disconnect(self, close_code):<br>        # Leave user group<br>        await self.channel_layer.group_discard(<br>            self.user_group_name,<br>            self.channel_name<br>        )<br><br>    async def receive(self, text_data):<br>        pass<br><br>    async def user_location_updated(self, event):<br>        # Send user location to drivers<br>        data = GeoJSONSerializer().serialize(<br>            User.objects.filter(id=self.user_id).annotate(<br>                latitude=F(&#39;location&#39;)[1],<br>                longitude=F(&#39;location&#39;)[0]<br>            ),<br>            geometry_field=&#39;location&#39;,<br>            fields=(&#39;latitude&#39;, &#39;longitude&#39;)<br>        )<br><br>        await self.send(text_data=json.dumps({<br>            &#39;type&#39;: &#39;user_location&#39;,<br>            &#39;data&#39;: data<br>        }))</pre><p>6. Update the Django view to notify the consumer when the user’s location is updated:</p><pre>#views.py !!updated<br><br>from channels.layers import get_channel_layer #NEW<br>from asgiref.sync import async_to_sync<br><br>@csrf_exempt<br>def update_location(request):<br>    # Parse the request data<br>    user_id = request.POST.get(‘user_id’)<br>    latitude = request.POST.get(‘latitude’)<br>    longitude = request.POST.get(‘longitude’)<br><br>    # Update the user’s location<br>    user = User.objects.get(id=user_id)<br>    user.location = Point(float(longitude), float(latitude))<br>    user.save()<br><br>    # Notify user location consumer<br>    channel_layer = get_channel_layer()#NEW<br>    # Send user location update to drivers<br>    async_to_sync(channel_layer.group_send)(<br>        ‘drivers’,<br>        {<br>            ‘type’: ‘user_location_updated’,<br>            ‘user_id’: user_id<br>        }<br>    ) #NEW<br><br>...</pre><p>If you notice the <strong><em>async_to_sync</em></strong> function we imported in the view, it’s function is to convert asynchronous codes into synchronous codes.</p><p>Then setup the URL for the update view</p><pre>#urls.py<br><br>from django.urls import path<br>from . import views<br><br>urlpatterns = [<br>    #...<br>    path(&#39;update_location/&#39;, views.update_location, name=&#39;update_location&#39;),<br>]<br></pre><p>7. Setup our websocket router in Django asgi.py application</p><pre>from django.urls import path<br>from channels.routing import ProtocolTypeRouter, URLRouter<br>from channels.auth import AuthMiddlewareStack<br>from .consumers import UserLocationConsumer<br><br>from django.core.asgi import get_asgi_application<br><br>application = ProtocolTypeRouter({<br>    &quot;http&quot;: get_asgi_application(),<br>    &quot;websocket&quot;: AuthMiddlewareStack(<br>        URLRouter([<br>            path(&#39;ws/user/&lt;int:user_id&gt;/&#39;, UserLocationConsumer.as_asgi()),<br>        ])<br>    ),<br>})<br></pre><p>8. With the socket URL setup for broadcasting the user location, we now create a JavaScript file to retrieve these json data and update the user marker on the map.</p><pre>#consumers.py<br>const user_id = 1; // Example user ID<br>const socket_url = `ws://${window.location.host}/ws/user_location/${user_id}/`;<br><br>const socket = new WebSocket(socket_url);<br><br>socket.onmessage = function(event) {<br>    const data = JSON.parse(event.data);<br><br>    if (data.type === &#39;user_location&#39;) {<br>        const features = JSON.parse(data.data).features;<br>        const feature = features[0];<br>        const coords = feature.geometry.coordinates;<br>        const latitude = coords[1];<br>        const longitude = coords[0];<br><br>        // Update user marker on map<br>        update_user_marker(latitude, longitude);<br>    }<br>};<br></pre><p>In conclusion this is how you also broadcast a list of drivers closest to a user but with a little tweak with redis to calculate the distance between a driver and a user.</p><p>Thus u can query that and limit the query to reduce the time taken to request for the drivers on first load while redis takes up the work storing these data temporarily without saving to the database.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5eeb217f65ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple Django Referral App using Allauth — Pt 1]]></title>
            <link>https://jeremiahedavid.medium.com/a-simple-django-referral-app-using-allauth-pt-1-c430e1948783?source=rss-5b9e3b151f62------2</link>
            <guid isPermaLink="false">https://medium.com/p/c430e1948783</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django-allauth]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[allauth-tutorial]]></category>
            <category><![CDATA[cookiecutter-django]]></category>
            <dc:creator><![CDATA[Jeremiah Effoing David]]></dc:creator>
            <pubDate>Tue, 08 Jun 2021 15:29:47 GMT</pubDate>
            <atom:updated>2021-06-08T15:29:47.148Z</atom:updated>
            <content:encoded><![CDATA[<h3>A simple Django Referral App using Allauth — Pt 1</h3><figure><img alt="scaffolding a django project with django-cookiecutter + allauth" src="https://cdn-images-1.medium.com/max/1024/1*37v2EiF3Kewse3glzLp0Jw.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@igor-starkov-233202?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Igor Starkov</a> from <a href="https://www.pexels.com/photo/photo-of-people-on-building-under-construction-1117452/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>Have you ever…?</h3><p>Have you ever felt overwhelemed, confused and doubtful if you are starting and configuring your django project properly for deployment? <strong>if yes. </strong>How can you make do with cookiecutter approach for django to ensure you are set and ready for deployment always, and in less time?</p><h3><strong>What is a cookiecutter approach?</strong></h3><blockquote>If you describe something as having a <a href="https://www.collinsdictionary.com/dictionary/english/cookie-cutter"><strong>cookie-cutter</strong> <strong>approach</strong></a> or style, you mean that the same approach or style is always used and not enough attention is paid to individual differences. — <strong>collinsdictionary definition</strong></blockquote><p>In other words, we mean to say that you follow a predefined setting or configuration to get your new project, deployment ready and just a little professionally set with little effort.</p><h3><strong>How do you cookiecut for Django?</strong></h3><figure><img alt="django cookiecutter" src="https://cdn-images-1.medium.com/max/1024/1*MobTThlX6fsrcQSrNyD6CA.png" /><figcaption>django-cookiecutter</figcaption></figure><p>With a django package called <a href="https://cookiecutter-django.readthedocs.io/en/latest/">django-cookiecutter</a>, we shall be scaffolding and building a simple referral application and I shall be taking you through the entire process from installations through to deployment.</p><p><strong>Requirements:</strong></p><blockquote><a href="https://www.python.org/downloads/">1. <strong>Python 3.9</strong></a> — — Python is a programming language that lets you work quicklyand integrate systems more effectively</blockquote><p><a href="https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-20-04-server"><strong>Dabian/Ubuntu Installation</strong></a></p><pre>sudo apt install -y python3-pip</pre><p><strong><em>ps: You may choose to forgo the enviroment setup in the permalink attached to the installation as we shall be utilizing the new and more adviced option (PipEnv)</em></strong></p><blockquote><a href="https://pipenv.pypa.io/en/latest/">2. <strong>Pipenv</strong></a> — — Pipenv is primarily meant to provide users and developers of applications with an easy method to setup a working environment.</blockquote><pre>pip3 install pipenv </pre><p>on <strong>Linux</strong></p><pre>pip install pipenv</pre><p>on <strong>Windows &amp; Mac</strong></p><blockquote>3. <a href="https://cookiecutter.readthedocs.io/en/latest/README.html"><strong>Cookiecutter</strong></a><strong> </strong>— — A command-line utility that creates projects from <strong>cookiecutters</strong> (project templates), e.g. creating a Python package project from a Python package project template.</blockquote><pre>brew install cookiecutter</pre><p>on <strong>Mac/OS X</strong></p><pre>pip install cookiecutter</pre><p>on <strong>Windows</strong></p><pre>sudo apt-get install cookiecutter</pre><p>on <strong>Dabian/Ubuntu</strong></p><blockquote>4. <a href="https://www.postgresql.org/"><strong>Postgres</strong></a><strong> </strong>— — <strong>PostgreSQL,</strong> or Postgres, is a relational database management system that provides an implementation of the <a href="https://en.wikipedia.org/wiki/SQL"><strong>SQL</strong></a><strong> </strong>querying language. It is standards-compliant and has many advanced features like reliable transactions and concurrency without read locks.</blockquote><p><a href="https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart"><strong>Dabian/Ubuntu Installation tutorial</strong></a></p><pre>sudo apt-get update</pre><p><em>install postgresql for ubuntu using </em><strong><em>apt-get</em></strong></p><pre>sudo apt-get postgresql postgresql-contrib</pre><p><a href="https://www.postgresql.org/download/"><strong>Windows &amp; Mac Installation</strong></a></p><p><em>For mac and windows </em><a href="https://www.postgresql.org/download/"><em>installation</em></a><em> you can use the executable installer bundled by the postgres creators</em></p><blockquote>5. <a href="https://cookiecutter-django.readthedocs.io/en/latest/"><strong>Django-cookiecutter </strong></a>— — The website offers a simple install and setup guide for getting.</blockquote><blockquote>6.<strong> </strong><a href="https://www.djangoproject.com/"><strong>Django 3.2</strong> </a>— — Django is a high-level <strong>Python Web framework</strong> that encourages rapid development and clean, pragmatic design. <strong>Built by experienced developers</strong>, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. <strong>It’s free and open source.</strong></blockquote><h3><strong>Getting Started</strong></h3><p>Since we now know the requirements for this project. We shall be beginning right away by checking if we have the required softwares installed and updated so you can follow along with mine.</p><pre>python --version</pre><figure><img alt="python version from terminal" src="https://cdn-images-1.medium.com/max/676/1*GGXKK-9FB12xLsuIY-_JGA.png" /><figcaption>getting python version from terminal in ubuntu</figcaption></figure><p><strong><em>ps: if the result, outputs python 2.x.x then follow my next course as I introduce a neat solution to ensure your version is always set to python 3.x.x.</em></strong></p><pre>pipenv --version</pre><figure><img alt="pipenv version from terminal" src="https://cdn-images-1.medium.com/max/671/1*xHSdhDAVIl5LUUFHCCj14A.png" /><figcaption>getting pipenv version from terminal in ubuntu</figcaption></figure><pre>psql --version</pre><figure><img alt="postgres version from terminal" src="https://cdn-images-1.medium.com/max/665/1*CmatPKJx6fFW-lBBnAQFuA.png" /><figcaption>getting postgresql version from terminal in ubuntu</figcaption></figure><pre>cookiecutter --version</pre><figure><img alt="getting cookiecutter version from terminal in ubuntu" src="https://cdn-images-1.medium.com/max/672/1*ngqw0WQ7GNgtSDewvqYRaw.png" /><figcaption>getting cookiecutter version from terminal in ubuntu</figcaption></figure><p><strong><em>ps: check complete.</em></strong></p><p>Since we have confirmed all necessary dependent packages has been installed we now have to start our project by creating a directory which our application will live in.</p><pre>mkdir referrals</pre><pre>cd referrals</pre><p>I shall be calling my directory <strong>“referrals” </strong>and changing into that directory</p><p>within this directory I shall use the cookiecutter script to scaffold my project. Follow along:</p><pre>cookiecutter gh:pydanny/cookiecutter-django</pre><p><strong><em>ps: this will only work if you had already installed the cookiecutter package. If you had not, please scroll back above to find the procedures to accomplish this and then return back here to follow along from this point.</em></strong></p><p>when we lunch the cookiecutter script, we are bootstrapping a new project from an existing up to date django directory stored in a <a href="https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-repositories"><strong>github repo</strong></a><strong>.</strong></p><p><strong>With that explained, let us continue.</strong></p><p>once the script has been lunched, it will ask us to accept if it should update the existing directory stored in our system for django-cookiecutter or use that existing directory itself to scaffold our project.</p><p>The full list of project generated options to choose and input into the terminal is listed <a href="https://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html"><strong><em>here</em></strong></a><strong><em>. </em></strong>Do take the time to go through that documentation properly.</p><p>the fields we shall be concentrating on right now so as to ensure your project setup is exact as mine are</p><ol><li>the <strong>project name </strong>— django-refer.</li><li>the <strong>slug name</strong> will be the default name in the open and close bracket.</li><li><strong>author name</strong> which you can put yours if you desire.</li><li><strong>timezone </strong>ensure to use the timezone for your country for mine it is <strong><em>Africa/Lagos</em></strong>. You can find the timezone list following this <a href="https://stackoverflow.com/questions/13866926/is-there-a-list-of-pytz-timezones/13867319#13867319"><strong>answer on stackoverflow</strong></a><strong>.</strong></li><li><strong>select postgres version</strong> which you can choose the current version of postgres installed in your machine.</li><li><strong>select mail service </strong>choose <strong>other smtp.</strong></li><li>use <strong>whitenoise </strong>type y (yest) so you dont encounter an error.</li><li>use <strong>heroku </strong>i chose to type y (yes) to deploy the demo for everyones use and this shall still be existing till date. for you, you can choose whatever you decide to.</li><li>finally when asked about <strong>select ci tool </strong>you can choose 4 for <strong>github</strong></li></ol><figure><img alt="django-cookiecutter project generation result" src="https://cdn-images-1.medium.com/max/672/1*xo3luzHiR_X2Uo7TOokcsg.png" /><figcaption>django-cookiecutter final output on complete</figcaption></figure><p>regardless the warning, you can disregard it as we shall not be needing any media creation file created and as such wont be needing the cloud storage providers.</p><p>Next, we shall create an enviroment using <strong>pipenv</strong> like this.</p><pre>cd django-refer</pre><pre>pipenv shell</pre><p>this will create an enviroment for this <strong>django-refer project</strong> and install all necessary dependent libraries listed in the <strong>requirements/production.txt</strong> file as its default within your project directory.</p><p>you can however consider editing the <strong>requirements/local.txt</strong> file within your project directory using any <strong>code editor</strong> of your choice, my personal choice is <a href="https://code.visualstudio.com/"><strong>VS Code</strong></a><strong>.</strong></p><figure><img alt="django-refer project directory" src="https://cdn-images-1.medium.com/max/188/1*RB3s8ZN93T-0OsgTvf8JXg.png" /><figcaption>django-refer project directory structure</figcaption></figure><p>Since django-cookiecutter has not yet switched from <strong>pip</strong> requirement process of getting dependecies installed, what we want to achieve is converting our current <strong>requirements/ </strong>folder so we can utilize the <strong>pipenv</strong> way of storing dependencies for production properly in a locked version.</p><figure><img alt="requirements/local.txt file edit for pipenv purpose" src="https://cdn-images-1.medium.com/max/958/1*eNnQE-0Eo7xGU-ZowcpYNA.png" /><figcaption>edit requirements/local.txt file to not import the base.txt file so we can install dependencies the pipenv way for local testing and developement</figcaption></figure><p>When we have done this, our next priority will be to install the requirements file for local.txt as development so they do not get installed in prodcution when we upload to heroku for those of you following along exactly.</p><pre>pipenv install -r requirements/local.txt --dev</pre><p>the <strong>dev </strong>extra attached at the end of the command ensures our <strong>development dependencies/packages </strong>are added to our pipfile to differentiate our production packages and development packages.</p><p>once that command successfully run we shall be moving into the most interesting part of our project. configuration and coding. But this will be done in our next lesson <a href="https://jeremiahedavid.medium.com/a-simple-django-referral-app-using-allauth-pt-2-555cbc36e43"><strong>here</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c430e1948783" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple Django Referral App using Allauth — Pt 2]]></title>
            <link>https://jeremiahedavid.medium.com/a-simple-django-referral-app-using-allauth-pt-2-555cbc36e43?source=rss-5b9e3b151f62------2</link>
            <guid isPermaLink="false">https://medium.com/p/555cbc36e43</guid>
            <category><![CDATA[django-referrals]]></category>
            <category><![CDATA[referrals]]></category>
            <category><![CDATA[django-allauth]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Jeremiah Effoing David]]></dc:creator>
            <pubDate>Tue, 08 Jun 2021 15:27:50 GMT</pubDate>
            <atom:updated>2021-06-09T11:59:02.198Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://medium.com/p/c430e1948783/edit?source=your_stories_page-------------------------------------">A simple Django Referral App using Allauth — Pt </a>2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*37v2EiF3Kewse3glzLp0Jw.jpeg" /></figure><p>if you have been following the previous lesson on creating a simple referral app with django and allauth, then this is the final video to complete our project. for those of you just finding this, feel free to check the previous lesson <a href="https://jeremiahedavid.medium.com/a-simple-django-referral-app-using-allauth-pt-1-c430e1948783"><strong>here</strong></a></p><h3><strong>Let Us Continue</strong></h3><p>During the installation of required packages, I encountered an error for <strong>hiredis </strong>installation.</p><pre><strong>pipenv install -r requirements/local.txt — skip-lock — dev</strong><br><strong>Requirements file provided! Importing into Pipfile…<br></strong>/usr/local/lib/python3.8/dist-packages/pipenv/vendor/urllib3/util/retry.py:531: ResourceWarning: unclosed &lt;ssl.SSLSocket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘192.168.1.10’, 51152), raddr=(‘151.101.192.223’, 443)&gt;<br> raise six.reraise(type(error), error, _stacktrace)<br><strong>ResourceWarning</strong>: Enable tracemalloc to get the object allocation traceback<br>/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requests/cookies.py:521: ResourceWarning: unclosed &lt;ssl.SSLSocket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘192.168.1.10’, 46876), raddr=(‘151.101.64.223’, 443)&gt;<br> names_from_jar = [cookie.name for cookie in cookiejar]<br><strong>ResourceWarning</strong>: Enable tracemalloc to get the object allocation traceback<br>/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requests/cookies.py:521: ResourceWarning: unclosed &lt;ssl.SSLSocket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘192.168.1.10’, 46068), raddr=(‘151.101.0.223’, 443)&gt;<br> names_from_jar = [cookie.name for cookie in cookiejar]<br><strong>ResourceWarning</strong>: Enable tracemalloc to get the object allocation traceback<br>Installing dependencies from Pipfile…<br> 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2–00:00:00<br>An error occurred while installing hiredis==2.2.0! Will try again.<br>Installing initially failed dependencies…<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/cli/command.py”, line 233, in install<br>[InstallError]: retcode = do_install(<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/core.py”, line 2052, in do_install<br>[InstallError]: do_init(<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/core.py”, line 1304, in do_init<br>[InstallError]: do_install_dependencies(<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/core.py”, line 899, in do_install_dependencies<br>[InstallError]: batch_install(<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/core.py”, line 796, in batch_install<br>[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)<br>[InstallError]: File “/usr/local/lib/python3.8/dist-packages/pipenv/core.py”, line 703, in _cleanup_procs<br>[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)<br>[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement hiredis==2.2.0 (from -r /tmp/pipenv-jbzaxmpk-requirements/pipenv-9raprkdh-requirement.txt (line 1)) (from versions: 0.0.1, 0.0.3, 0.0.4, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.3.0, 0.3.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0.dev0, 2.0.0)<br>[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for hiredis==2.2.0 (from -r /tmp/pipenv-jbzaxmpk-requirements/pipenv-9raprkdh-requirement.txt (line 1))<br><strong>ERROR</strong>: Couldn’t install package: hiredis<br> Package installation failed…<br> ☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 —</pre><p>For a temporary fix before the cookiecutter team updates their requirements file to fix this issue, you can try these three options.</p><pre>hiredis == 1.1.0 --install-option=&quot;--without-c-extensions&quot;</pre><ol><li>add --install-option=&quot;--without-c-extensions&quot; to your <strong><em>requirements/base.txt</em></strong> file.</li><li>comment out the <strong># hiredis </strong>package from installation.</li><li>update the version number from <strong>1.1.0</strong> to <strong>2.0.0</strong></li></ol><p>Either of these will fix your error and thus we can now proceed with the settings configuration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555cbc36e43" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>