-
Where software engineers connect, build their resumes, and grow.
From django.shortcuts import render Import requests From .models import Article Def get_articles(request): all_articles = {} API_KEY = 'Your_API_KEY' url = 'https://dev.to/api/articles/me/published' headers = {'api-key': API_KEY} response = requests.get(url, headers=headers) data = response.json() for i, item in enumerate(data): article_data = Article( title=data[i]['title'], description=data[i]['description'], cover_image=data[i]['cover_image'], article_body=data[i]['body_markdown'], published_at=data[i]['published_at'] ) article_data.save() all_articles = Article.objects.all().order_by( '-published_at').distinct('published_at') return render(request, "blog.html", {"all_articles": all_articles}) Def blogBody(request, id): article = Article.objects.get(id=id) return render(request, "blogBody.html", {"article": article}).
#CMS #Blogging #Blogging Platform 384 social mentions
-
Build and debug modern web and cloud applications, by MicrosoftPricing:
- Open Source
First things first, to be able to follow through with this tutorial, you need a text editor installed on your machine. In this case, I will be using Visual Studio Code editor but you can use the code editor of your choice. Also, make sure that Python and PostgreSQL are installed on your machine.
#Text Editors #IDE #Software Development 1008 social mentions
-
Free SQL Client for developers and teams. Available for Mac, Windows, Linux, and Web.Pricing:
- Freemium
- Free Trial
- $10.0 / Monthly
Most CMSs are paid and if you want to save a few dollars, a paid CMS is the last thing you want. In this article, I will show you how to add a blog to your website without having to spend a cent. I will be using Django, the Dev.to API, PostgreSQL, and the Arctype SQL Client.
#Developer Tool #MySQL #PostgreSQL 36 social mentions