Eduardo Zepeda's latests posts
What does the ContentType application do in Django?
- django
- databases
<p>Did you know that Django keeps track of each of the models you create for your project in a model called <em>ContentType</em>? Read on to learn about it.</p><p>Sorry for taking so long to write! I've been busy moving the frontend of my blog to Frontity, a React fram...
Read more
How to create a command in django?
- django
<p>You have used Django before, haven't you? So, you already used some Django command, it could have been makemigrations, migrate, startproject, startapp or some other. But have you ever created any? Maybe you haven't. Read on to learn how.</p><h2 id="how-to-crea...
Read more
My Digital Ocean review, analysis and my experience as a user
- software architecture
- opinion
<p>I've been using Digital Ocean for my personal projects for several years, so Let me tell how it has been so far and what can of services you can find there.</p><h2 id="droplets-or-vps-on-digital-ocean">Droplets or VPS on Digital Ocean</h2><p>Droplets are my fav...
Read more
How to scale a Django app to serve one million users?
- software architecture
- django
<p>Wish your Django app could handle a million hits? This post is a compilation of articles, books, and videos I've read on how to take a Django application to its maximum capabilities, I've even implemented some of these recommendations myself.</p><p>It's ...
Read more
Javascript vs Python which one is better for you?
- javascript
- python
<p>If you've used only Python or only Javascript, you're probably a little curious to know what the other one looks like. I've used both and I can tell you a bit about the differences and some things in common that both languages have, so you can find the best o...
Read more
How to create a history of products with django and redis?
- django
<p>You are browsing an ecommerce site, a product catches your attention and you click to see it, but you are not convinced. You decide to see other options, click on a new product and, when you scroll to the bottom of the page, the page shows you the first product you saw under t...
Read more
Django Annotate and aggregate explained
- django
- databases
<p>The computer screen illuminated my face full of despair, I rubbed my head in despair, while I googled: “Django annotate”; one of the ORM functions that I could not understand. Did it happen to you too, I bet it did. I had already read the documentation but it didn&...
Read more
Nginx keepalive, gzip, http2: better performance on your website
- linux
<p>Some months ago I was reviewing the Lighthouse settings for a website when I realized that it did not comply with certain recommendations, it was using http/1.1, no gzip compression, no cache. Later I fixed the problems, I'll tell you how below. In this post I talk about...
Read more
FastAPI tutorial, the best Python framework?
- docker
- fastapi
<p>These last few days I have been testing a Python library that is becoming famous, FastAPI, a framework for creating APIs, such as <a class="markdown-link" href="https://coffeebytes.dev/en/software-architecture/basic-characteristics-of-an-api-rest-api/">REST APIs</a>&...
Read more
django and redis
Adding a section of visited products increases sales in an ecommerce and keeps the user longer on the page. It is normal to add this history to a user who is already in the database. The website managers have a history of the products we view, the ones we buy, how much time we spend viewing them and many other data but… what about the anonymous users who do not have a history? What about anonymous users who do not have an account?
","datePublished":"Sat, 28 Nov 2020 00:00:00 +0000","dateModified":"Sat, 28 Nov 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/django/how-to-create-a-history-of-visited-products-with-django-and-redis/"}},{"@type":"BlogPosting","headline":"Django Annotate and aggregate explained","description":"The computer screen illuminated my face full of despair, I rubbed my head in despair, while I googled: “Django annotate”; one of the ORM functions that I could not understand. Did it happen to you too, I bet it did. I had already read the documentation but it didn’t seem clear enough and, to top it off, I often confused it with its evil twin: aggregate. After visiting several stackoverflow questions and multiple English blogs I was able to understand them both. These notes are the result of that search, it is the explanation about django annotate and aggregate in Django that I would have liked to read years ago.
","datePublished":"Tue, 17 Nov 2020 00:00:00 +0000","dateModified":"Tue, 17 Nov 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/django/django-annotate-and-aggregate-explained/"}},{"@type":"BlogPosting","headline":"Nginx keepalive, gzip, http2: better performance on your website","description":"Some months ago I was reviewing the Lighthouse settings for a website when I realized that it did not comply with certain recommendations, it was using http/1.1, no gzip compression, no cache. Later I fixed the problems, I’ll tell you how below. In this post I talk about the following nginx features: keepalive, gzip, cache and http2 and how you can modify them to improve your Lighthouse values.
Activate http2 in nginx
As surprising as it may sound, many servers do not enable HTTP/2 by default, so if this is your case, you can enable it for better performance. The HTTP/2 protocol is more efficient than HTTP/1, so you get better indicators using it.
","datePublished":"Sat, 07 Nov 2020 00:00:00 +0000","dateModified":"Sat, 07 Nov 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/linux/nginx-keepalive-gzip-http2-better-performance-on-your-website/"}},{"@type":"BlogPosting","headline":"Books I read","description":"Currently reading
I’m currently reading:
- The Rust Programming Language by Steve Klabnik
Books I read
The list below contains almost all the books I’ve read about programming and web development. Most of them are written in English, some others in Spanish (It’s arduous to find good technical books written in spanish). .
I’ve reviewed some of them, I hope to review most of them in the near future, before they become obsolete.
","datePublished":"Thu, 05 Nov 2020 00:00:00 +0000","dateModified":"Thu, 05 Nov 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/pages/books-i-read-and-reviews/"}},{"@type":"BlogPosting","headline":"FastAPI tutorial, the best Python framework?","description":"These last few days I have been testing a Python library that is becoming famous, FastAPI, a framework for creating APIs, such as REST APIs or RPC APIs. FastAPI promises to help us create fast APIs in a simple way, with very little code and with extraordinary performance, to support high concurrency websites.
FastAPI vs Django vs Flask vs Pyramid
Is FastAPI really that fast? Yes, at least that’s the evidence. FastAPI is in first place in responses per second compared to more popular Frameworks such as Django, Pyramid or Flask. And it is also in the first places if we compare it with Frameworks of other programming languages, such as PHP or Javascript.
","datePublished":"Tue, 27 Oct 2020 00:00:00 +0000","dateModified":"Tue, 27 Oct 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/fastapi/fastapi-tutorial-the-best-python-framework/"}}]}