DEV Community

Nicolás Andrés Cano Leal
Nicolás Andrés Cano Leal

Posted on

🚀 Strengthening My Django Portfolio: Security, Contact Integration, and Optimization

🔐 1. API Security with Token Authentication
One of the key updates was reinforcing the security of my Django REST API.

I've implemented TokenAuthentication along with IsAuthenticatedOrReadOnly permissions. This means:

Visitors can freely read and explore public endpoints.

Only authenticated users (in this case, myself) with a valid token can perform write operations (POST, PUT, DELETE).

Why it matters:
This approach ensures that my API remains accessible and transparent while protecting against unauthorized modifications. It's a great foundation for future scaling or integration with frontend frameworks.

ADMIN

SWAGGER UI

📬 2. Functional Contact Form
I added a functional and stylish contact form to the main page of my portfolio.

It uses Django’s form handling and CSRF protection, and sends messages securely via email or saves them to a database for future reference.

Why it matters:
A direct and professional communication channel is essential for networking, job opportunities, and collaborations. This adds a serious layer of usability to my site.

FORM

🧱 3. Optimized Static File Management
Previously, my static files (like CSS and images) were scattered and unorganized.

I restructured them using Django’s STATICFILES_DIRS and collectstatic system, keeping all assets organized inside the app directories and ensuring they’re properly served in production.

Why it matters:
A clean static structure avoids conflicts, speeds up deployment, and improves maintainability of the project as it grows.

FRONTEND

📝 4. Clean Git Commit History
Every change has been tracked using clear and descriptive Git commits, following best practices like:

Atomic commits

Useful commit messages (add, fix, refactor, etc.)

Grouped by functionality

You can review the repository here 👉 GitHub Repo

Why it matters:
A well-documented Git history reflects professionalism and helps collaborators (or future-me!) understand the project’s evolution.

COMMIT

✅ What’s Next?
Production deployment on a custom domain.

More automation using CI/CD.

Deployment of a full-featured blog using Django CMS or a headless approach with DRF + React.

Live site 👉 nicolasandrescl.github.io

Thanks for reading, and feel free to connect or leave suggestions! 🙌
Let’s keep learning and building 💪


django #python #webdev #portfolio #api #backend #devjournal #fullstack #restapi #programming

Top comments (0)