Eduardo Zepeda's latests posts
The django admin panel and its customization
- django
One of the best features of django is that it has the django admin panel, a ready-to-use administration panel, with basic functions such as create, read, edit and delete models, users, groups and permissions. All ready to use just by setting up your application. But sometimes our...
Read more
Caching in Django REST Framework using memcached
- django
To use the cache in django, just follow three simple steps:Install a caching system, be it redis, memcached, etc. Set the CACHES variable to the settings.py file of the project. Add the middleware necessary for django to return the cache before processing the view. Use the l...
Read more
Periodic Tasks with Celery and Django
- django
In addition to creating asynchronous tasks, celery also allows you to create periodic tasks, which are executed from time to time. This can be quite useful to give maintenance to the database from time to time, to send marketing or shopping cart recovery emails, perhaps even to e...
Read more
Celery and django to run asynchronous tasks
- django
Celery, in combination with Django serve to solve a problem: the lack of asynchrony in our application. Sending an email, processing some file or responding to a third party service will keep our execution waiting for the task to finish and, as a consequence, our user waiting.&#x...
Read more
Login using Django Rest Framework DRF
- django
Almost all complex Django applications need views for Login, Logout, reboot and password change, as well as user registration. However, both Django and Django REST Framework (DRF) are completely agnostic about their implementation, and delegate the responsibility for these functi...
Read more
React memo, useMemo and useCallback to avoid React renderings
- react
We can use react memo and useCallback to prevent a component from being rendered, uselessly, multiple times by memoization. If you don't know what memoization is or don't understand what the react components, useCallback and memo are for, I have a post where I explain...
Read more
React useCallback, useMemo and memo, differences
- react
The useCallback, useMemo and memo functions are used to optimize React applications using memoization, avoiding useless renderings, each with their differences, similarities and use cases. These three functions should not be used indiscriminately, but only in those situations whe...
Read more
Mexico Postal codes API with Django
- django
Do you need to get the data associated with a postal code in Mexico for your Django application? I wrote a small library called django-postalcodes-mexico that downloads postal codes from SEPOMEX (México's Postal Codes official site) and creates an API endpoint that allows y...
Read more
Django and htmx, modern web apps without writing JS
- django
- htmx
The other day I was testing a library called htmx, which promises to make web creation much easier, yes, another library, but with the difference that this one doesn't need you to write Javascript (JS) and it also combines quite well with Django. Htmx bases all its operatio...
Read more
Django Rest Framework and JWT to authenticate users
- django
- javascript
JWTs (JSON Web Tokens) have become extremely popular, some even consider them a replacement for the classic tokens used by other frameworks, such as the Django Rest Framework. Using JWT or regular tokens (SWT) allows you to store all your session information directly on the token...
Read more