Code Monkey home page Code Monkey logo

Hello There 👋

My name is Okeke Johnpaul and I'm a software developer from Lagos, Nigeria 🇳🇬. You can find me on Twitter, or on LinkedIn.

✍ Blog & Tutorials

Besides coding, I also curate and create articles and write ups. Take a look at my dev.to page Dev.to.

🔧 Technologies & Tools

HTML5 JavaScript TailwindCSS SASS GitHub React Azure CSS3

📈 GitHub Stats

Johnpaul's GitHub Stats

🤝 Contact Me

    

You are watching a master at work._

Okeke Johnpaul's Projects

authwiki_team9 icon authwiki_team9

We are creating a Library that would ensure developers do not reinvent the wheel anymore as far as Authentication is concerned. Developers can easily register and download authentication codes that suits their need at any point.

crosswater-project icon crosswater-project

A Landing Page of a Site that import and export petroleum products, mineral products, and agricultural products in Nigeria. We are the leading commodity trading company in Nigeria.

diacheck icon diacheck

Diacheck Healthcare Check your diabetes status using our highly accurate prediction system.The earlier it's dicovered the better, in order to prevent severe effects.

django_rest_api icon django_rest_api

[Working with APIs] Create a new GitHub repository with a README.md, and Python .gitignore file. Clone it to your machine/computer, that will create a new folder on your computer with your repository’s content. Create a new virtual environment in that folder named venv. Activate it and install the Django python package (Hint: `pip install django`). Also install the django rest framework (pip install djangorestframework) Create a new django project (Hint: `django-admin startproject <project_name>`). Use your Zuriboard Student ID as the name of the project. We’ll be creating the beginnings of a URL shortener service. Create a new application using the django startapp command. The app should be called links. Add the links and rest_framework app to INSTALLED_APPS. Create a new file, utils.py in your links app folder. Replace the content of links/utils.py with this starter file https://github.com/TobeTek/Zuri/blob/main/starter-files/Working%20With%20APIs/utils.py . In links/models.py , create a new model Link. It should have the following attributes: Link -------- target_url : A url path of maxlength 200, use Django’s models.URLField description : A string of maxlength 200, use Django’s models.CharField identifier: A string of maxlength 20, use Django’s models.SlugField. Set blank=True and unique=True for the field. author : A Foreign Key to the current user model. Make use of Django’s get_user_model function. created_date : A date-time column, use Django’s models.DateTimeField. active : A boolean (True or False), determining if the shortened URL is publicly accessible. Make use of Django’s BooleanField. The default should be True. We should now have a Link model in links/models.py with a custom save method. Create migrations for your new model using the makemigrations django command. Run all migrations using, migrate django command. To make our Link model accessible from the admin site, register the Link model in links/admin.py . Go ahead to create a superuser, and create some Links from the admin dashboard. Now for the serializers. Create a new file serizliers.py in the links app. It will hold all the logic for our serializers. Create a new serializer, LinkSerializer, which inherits DRF’s serializers.ModelSerializer. It should have the following attributes: class Meta: model = Link fields = “__all__” On to the views. We will only allow users to interact with active/public urls through our API. In blog/views.py, create a new view/class PostListApi, which inherits DRF’s generic ListAPIView, it’s config/attributes should be: queryset = Link.objects.filter(active=True) serializer_class = LinkSerializer Create another view, PostCreateApi, which inherits DRF’s generic CreateAPIView, with attributes: queryset = Link.objects.filter(active=True) serializer_class = LinkSerializer Create another view, PostDetailApi which inherits DRF’s generic RetrieveAPIView, with attributes: queryset = Link.objects.filter(active=True) serializer_class = LinkSerializer Create another view PostUpdateApi, which inherits DRF’s generic UpdateAPIView, with attributes: queryset = Link.object.filter(active=True) serializer_class = LinkSerializer Create another view PostDeleteApi, which inherits django’s generic DestroyAPIView, with attributes: queryset= Link.objects.filter(active=True) serializer_class = LinkSerializer Create a file, links/urls.py, if it doesn’t already exist. Replace the content of links/urls.py with the content of https://github.com/TobeTek/Zuri/blob/main/starter-files/Working%20With%20APIs/urls.py Go to your project_app/urls.py and add a new url pattern with the following content: path("api/links/", include("links.urls")) Stage and Commit your Django project and push your changes to your GitHub repository. Ensure your final code/submission is on the default branch of your GitHub repository. Submit the link to your Github repository e.g https://github.com/github_username/repo_name

django_url_shortner icon django_url_shortner

We’ll be building more features for our URL shortener service. Create a new GitHub repository with a README.md, and Python .gitignore file. Clone it to your machine/computer, which will create a new folder on your computer with your repository’s content. Copy your Django project files from the previous task “Working with APIs”, to the newly created folder. Create a new virtual environment in that folder named venv. Activate it and install the Django python package (Hint: `pip install Django). Also, install the Django rest framework (pip install djangorestframework) We want users of our API to view all active links. We also want to provide users with an endpoint to view Links created during the week. Create a new file, managers.py in your links app folder. Replace the content of links/managers.py with this starter file https://github.com/TobeTek/Zuri/blob/main/starter-files/Querysets-and-Managers/managers.py Add the following attributes to your Link model in links/models.py objects = models.Manager() public = ActiveLinkManager() On to the views. Copy the ActiveLinkView and RecentLinkView from https://github.com/TobeTek/Zuri/blob/main/starter-files/Querysets-and-Managers/views.py to links/views.py. Add the following new URL paths in links/urls.py. path("active/", ActiveLinkView.as_view(), name=’active_link’) path("recent/", RecentLinkView.as_view(), name=’recent_link’) Stage and Commit your Django project and push your changes to your GitHub repository. Ensure your final code/submission is on the default branch of your GitHub repository. Submit the link to your Github repository e.g https://github.com/github_username/repo_name

hackernewsapi_vue icon hackernewsapi_vue

Create a dummy web page and consume the hacker's news API to display the contents, also use sweet alert to show error

hacktoberfest-2020 icon hacktoberfest-2020

Make this Hacktoberfest a learning period and contribute to Great Open Source Projects.

hacktoberfest2020-moviedo icon hacktoberfest2020-moviedo

🤪 🤨 🧐 🤓 😎 HACKTOBERFEST 2020 ALERT: Submit Just 4 PRs to earn SWAGS 🤪 🤨 🧐 🤓 😎

powerxacademymockexam icon powerxacademymockexam

PowerXacademyMockExam is an award winning unified learning platform that includes a learning management system (LMS), it helps you to manage your school mock exams in a better way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.