🚀 𝗗𝗷𝘂𝗹𝗲 𝘃𝟮.𝟬.𝟬 𝗶𝘀 𝗵𝗲𝗿𝗲. Last weekend I released Djule v1. Today, v2 is already here. Djule started as an experiment to make server-rendered UI in Python feel more modern without needing a heavy frontend framework. In just a week, it has gone from an early parser/runtime foundation to something that feels much more like a real language and developer workflow. For anyone who has not seen it before: 𝗗𝗷𝘂𝗹𝗲 is a new templating language built on top of Django. It lets you build more expressive, component-based UI while still keeping Django’s server-rendered architecture. 𝗪𝗵𝗮𝘁’𝘀 𝗻𝗲𝘄 𝗶𝗻 𝘃𝟮: • 𝗛𝗧𝗠𝗟 𝗳𝗲𝗲𝗹𝘀 𝗺𝗼𝗿𝗲 𝗻𝗮𝘁𝘂𝗿𝗮𝗹 Native support Self-closing HTML and component tags Interpolated strings inside attributes Better multiline syntax for expressions and grouped values • 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 𝗮𝗿𝗲 𝗲𝗮𝘀𝗶𝗲𝗿 𝘁𝗼 𝘄𝗿𝗶𝘁𝗲 𝗮𝗻𝗱 𝗿𝗲𝘂𝘀𝗲 Multiline component parameter lists Default component parameters Simpler props like error=True instead of error={True} • 𝗘𝗿𝗿𝗼𝗿 𝗺𝗲𝘀𝘀𝗮𝗴𝗲𝘀 𝗮𝗿𝗲 𝗺𝘂𝗰𝗵 𝗯𝗲𝘁𝘁𝗲𝗿 Clear parser diagnostics Real file and line context when something breaks Better import and component error reporting • 𝗗𝗷𝗮𝗻𝗴𝗼 𝗶𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗼𝗻 𝗶𝘀 𝗺𝘂𝗰𝗵 𝘀𝗺𝗼𝗼𝘁𝗵𝗲𝗿 Dedicated Django template backend Settings-aware import roots Support for Django-style global context processors and built-in tags That means Djule now works much more naturally inside a real Django project without needing a bunch of manual setup. 𝗧𝗵𝗲 𝗩𝗦 𝗖𝗼𝗱𝗲 𝗲𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗮𝗹𝘀𝗼 𝗴𝗼𝘁 𝗮 𝗺𝗮𝗷𝗼𝗿 𝘂𝗽𝗴𝗿𝗮𝗱𝗲: • Live diagnostics while you type • Autocomplete for components, props, imports, globals, and snippets • Better import UX • Django-aware editor globals • Go-to-definition for components • Improved highlighting for newer Djule syntax v2 feels like the point where Djule starts becoming more than just “a parser I built” and starts feeling like a real language workflow. 👇 𝗬𝗼𝘂 𝗰𝗮𝗻 𝘁𝗿𝘆 𝗶𝘁 𝗵𝗲𝗿𝗲: PyPI: pip install djule VS Code Marketplace: rhxrr.djule Would love to hear what people think, especially from people building with Python or Django. #Python #Django #WebDevelopment #OpenSource #ProgrammingLanguages #VSCode #DeveloperTools
Djule v2 Released: New Templating Language for Django
More Relevant Posts
-
🎭 #The_"#Translator_Who_Tries_Too_Hard": #Understanding #SerializerMethodField: Ever built a Django API and realized your database model is a bit… boring? You have a first_name and a last_name, but your frontend developer is begging for a full_name or a is_vibe_check_passed field that doesn't actually exist in your SQL table. Enter the SerializerMethodField. In the world of Django Rest Framework (DRF), this field is like that one friend who refuses to just repeat what they heard and instead adds their own "flavour" to the story. 🛠️ How it Works When you define a field as a SerializerMethodField(), you are telling Django: "Hey, don't look for this in the database. I’m going to write a custom function to calculate this on the fly." 👨🍳 The Recipe Define the field: Add it to your serializer class. The "Get" Magic: Create a method named get_<field_name>. The Logic: Do your math, string concatenation, or soul-searching inside that method. Python class UserSerializer(serializers.ModelSerializer): days_since_joined = serializers.SerializerMethodField() class Meta: model = User fields = ['username', 'days_since_joined'] def get_days_since_joined(self, obj): # 'obj' is the actual model instance return (timezone.now() - obj.date_joined).days ⚠️ The Catch (Read: Why your Senior Dev is frowning) While powerful, SerializerMethodField is read-only. You can't POST data back to it. Also, if you use it to run heavy database queries for every single item in a list of 1,000 objects, your API performance will disappear faster than free pizza in a tech office. 🍕💨 TL;DR: Use it when you need to transform raw data into something useful for the frontend, but use it sparingly to keep those response times snappy! 🚀 #Django #Python #WebDevelopment #DRF #BackendTips #CodingHumor
To view or add a comment, sign in
-
🚀 𝐃𝐚𝐲 𝟓 𝐨𝐟 𝟓𝟎: 𝐔𝐬𝐞𝐫 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 & 𝐅𝐨𝐫𝐦𝐬 — 𝐃𝐣𝐚𝐧𝐠𝐨 𝐃𝐨𝐞𝐬 𝐈𝐭 𝐀𝐠𝐚𝐢𝐧 Yesterday I had a blog admin panel and a public frontend. Today I layered on a complete authentication system and dynamic forms. And honestly? This is where Django really starts to feel like a superpower. No third-party auth libraries. No custom session logic. No security headaches. Just Django doing what it does best. 𝐖𝐡𝐚𝐭 𝐈 𝐁𝐮𝐢𝐥𝐭: 🛠️ A full-featured user authentication system from the ground up: 👤 𝑼𝒔𝒆𝒓 𝑹𝒆𝒈𝒊𝒔𝒕𝒓𝒂𝒕𝒊𝒐𝒏 & 𝑳𝒐𝒈𝒊𝒏/𝑳𝒐𝒈𝒐𝒖𝒕 — Fully functional, secure, and clean 📋 𝑼𝒔𝒆𝒓 𝑷𝒓𝒐𝒇𝒊𝒍𝒆𝒔 𝒘𝒊𝒕𝒉 𝑷𝒐𝒔𝒕 𝑴𝒂𝒏𝒂𝒈𝒆𝒎𝒆𝒏𝒕 — Each user owns and manages their content ✏️ 𝑪𝒓𝒆𝒂𝒕𝒆, 𝑬𝒅𝒊𝒕, 𝑫𝒆𝒍𝒆𝒕𝒆 𝑷𝒐𝒔𝒕𝒔 — Complete CRUD tied to authenticated users 🔐 𝑹𝒐𝒍𝒆𝑩𝒂𝒔𝒆𝒅 𝑨𝒄𝒄𝒆𝒔𝒔 𝑪𝒐𝒏𝒕𝒓𝒐𝒍 — 𝑼𝒔𝒆rs only touch what's theirs 𝐓𝐡𝐞 𝐃𝐣𝐚𝐧𝐠𝐨 𝐅𝐨𝐫𝐦𝐬 𝐄𝐱𝐩𝐞𝐫𝐢𝐞𝐧𝐜𝐞: 📝 𝐅𝐨𝐫𝐦𝐬 in Django are something else. Validation, error handling, and rendering — all handled automatically. What would take hours in a custom setup takes minutes here. 𝑪𝑺𝑹𝑭 𝒑𝒓𝒐𝒕𝒆𝒄𝒕𝒊𝒐𝒏? 𝑩𝒖𝒊𝒍𝒕-𝒊𝒏. 𝑭𝒐𝒓𝒎 𝒗𝒂𝒍𝒊𝒅𝒂𝒕𝒊𝒐𝒏? 𝑩𝒖𝒊𝒍𝒕-𝒊𝒏. 𝑬𝒓𝒓𝒐𝒓 𝒓𝒆𝒏𝒅𝒆𝒓𝒊𝒏𝒈? 𝑩𝒖𝒊𝒍𝒕-𝒊𝒏. The architecture isn't just convenient — it's the reason enterprise applications trust Django at scale. 𝐓𝐡𝐞 𝐑𝐞𝐚𝐥 𝐈𝐧𝐬𝐢𝐠𝐡𝐭: 💡 Don't just copy-paste Django code. Understand why it's structured this way. The patterns Django enforces — separation of concerns, DRY principles, security-first design — these aren't Django-specific habits. 𝑻𝒉𝒆𝒔𝒆 𝒂𝒓𝒆 𝒕𝒉𝒆 𝒉𝒂𝒃𝒊𝒕𝒔 𝒐𝒇 𝒆𝒙𝒑𝒆𝒓𝒊𝒆𝒏𝒄𝒆𝒅 𝒆𝒏𝒈𝒊𝒏𝒆𝒆𝒓𝒔. Every day with Django isn't just learning a framework. It's learning to think like a professional developer. 𝐓𝐨𝐦𝐨𝐫𝐫𝐨𝐰'𝐬 𝐏𝐥𝐨𝐭 𝐓𝐰𝐢𝐬𝐭: 🎲 We're pivoting! Day 6 marks the beginning of the Data Science phase—trading Django for Pandas, NumPy, and Machine Learning. The portfolio is about to get spicy. #Django #WebDevelopment #Python #Authentication #UserManagement #50DayChallenge #LearningInPublic #Backend #FullStack #DeveloperJourney
To view or add a comment, sign in
-
A while back I was working on a document management feature. Users could create documents, but naturally they should only be able to edit or delete their own. Managers, on the other hand, needed broader access so they could edit any document within their department. And then there were reports that had to be publicly readable by anyone, even without logging in. Django’s built-in permissions work well when things are global, like saying “managers can edit all documents”. But the moment you step into real-world rules like “this user can only edit their own documents” or “this specific person can access this one record”, you end up writing custom checks everywhere. It quickly becomes repetitive and a bit fragile. I kept running into the same problems, so I wanted something cleaner and reusable for: - Per-object permissions for individual records - Automatic ownership rules (users managing their own content) - Public access for specific endpoints without authentication - DRF action mapping so permissions are consistent across endpoints - Permission caching to avoid unnecessary database hits on every request Yes, django-guardian exists – but it's heavy and requires extra wiring for DRF. I wanted something lighter, DRF‑native, and drop‑dead simple. That is what led me to build django-user-permissions, a lightweight package that plugs into Django REST Framework. It gives you a simple mixin for viewsets, a way to attach permissions directly to objects, and a few controls for ownership and public access. The idea was not to build another heavy role system, but to fill in the gaps Django leaves at the object level. If you have ever had to implement “edit only your own posts” or “share a single private document with someone”, you probably know how quickly this logic spreads across a codebase. This is just my attempt to keep that part of Django a bit more manageable. 📦 PyPI: [https://lnkd.in/gR63kZdB) 💻 GitHub: https://lnkd.in/geSY5Mfj pip install django-user-permissions #Django #DRF #Python #OpenSource #Permissions
To view or add a comment, sign in
-
-
One subtle thing I’ve noticed while working across backend frameworks: URL trailing slashes. In many Django / Django REST Framework projects, endpoints often look like: "/api/users/" While in FastAPI, Flask, Express.js, or Spring Boot, it’s more common to see: "/api/users" This usually comes down to framework defaults and conventions — not a major technical rule. Django historically favors trailing slashes. With settings like "APPEND_SLASH=True", if someone requests: "/api/users" Django may redirect it to: "/api/users/" So even if teams want clean URLs, redirects can still appear depending on project settings. Many modern teams prefer no trailing slash because: • Cleaner URLs • Fewer redirects • Simpler client behavior But in production systems, the bigger question isn’t style. It’s consistency. Good API design is usually about: • Predictable routing • Stable client integrations • Minimal surprises • Clear versioning • Team-wide standards Small details like this often reveal how framework philosophy shapes developer experience. What does your team prefer: Trailing slash or no trailing slash? #Django #Python #FastAPI #BackendDevelopment #RESTAPI #WebDevelopment #SoftwareEngineering #APIDesign
To view or add a comment, sign in
-
-
Flask vs FastAPI: A Comprehensive Performance Comparison - As experienced web developers and software engineers, we constantly seek the most efficient tools for our projects. When it comes to Python web frameworks for API development, Flask and FastAPI are two prominent contenders, each offering distinct advantages. This comprehensive comparison article dives deep into their core differences, exploring their respective features, syntax, and real-world performance benchmarks. We will analyze how each framework handles API requests, contrasting Flask's lightweight, unopinionated design with FastAPI's modern, high-performance approach built on asynchronous capabilities and Pydantic for data validation. Our discussion will extend beyond theoretical benchmarks, offering practical tips for implementation and delving into specific real-world examples where Flask's simplicity and vast ecosystem might be preferable, versus scenarios where FastAPI's speed, automatic documentation, and robust type checking provide an undeniable edge. We aim to provide a detailed Flask and FastAPI comparison that helps you understand their performance differences and make an informed decision when choosing between Flask and FastAPI for API development, ensuring your projects are built on the most suitable foundation for scalability and maintainability. Read the full article > https://lnkd.in/gQCc3m5R #iPixelInsights #WebDesignTips #DigitalMarketingStrategy #FrontendDevTalks #UIUXDesign #GoogleAdsHelp #TechForCreatives #SEOForBusiness #DesignVsDev #MarketingTechExplained
To view or add a comment, sign in
-
Day 95 – Django Model Relationships, Admin Integration & Media Handling Today I worked on building dynamic Course and Teacher management in Django by connecting frontend and backend with database-driven content. 🔹 Created a new Course Details page with navigation integration using templates, views, and URL routing. 🔹 Built a Details model with: • Course_name (CharField) • Course_dtls (TextField) Learned the importance of: ✔ null=True ✔ blank=True ✔ max_length ✔ Difference between CharField and TextField 🔹 Performed database migration using: makemigrations migrate 🔹 Registered models in Django Admin for easy backend management. 🔹 Fetched database content dynamically to the frontend using: Details.objects.all() and displayed it with Django template for-loops. 🔹 Created a second model: Teacher Fields included: • Teach_name • Course_name (ForeignKey with Details) • Teach_img (ImageField) This helped me understand: ✔ ForeignKey relationships ✔ on_delete=models.CASCADE ✔ Connecting two models in Django 🔹 Installed Pillow for image handling and configured: MEDIA_ROOT MEDIA_URL Also updated project urls.py for serving media files properly. 🔹 Successfully fetched teacher images from backend to frontend using: {{ i.Teach_img.url }} Today’s learning gave me a strong understanding of Django model relationships, admin panel usage, migrations, and media file management. Step by step, backend development is becoming more practical and exciting! 💻 #Django #Python #WebDevelopment #BackendDevelopment #FullStackDevelopment #DjangoDeveloper #SoftwareDevelopment #PythonDeveloper #DatabaseManagement
To view or add a comment, sign in
-
🚀 Excited to share something I’ve started building… I’m currently working on a new developer tool called Django Forge ⚒️ The idea is simple: Make Django development faster, smarter, and less repetitive—especially for developers who are building real-world projects. 🔧 Initial Features I’m working on: Debug assistant for common Django errors Code generator for models, views, and boilerplate Smart suggestions based on project structure Developer-friendly CLI / assistant workflow This is just the beginning, and I want to build this with real developer input. 💡 I’d love to hear from you: What problems do you face while working with Django? What kind of automation or tools would actually help you? Any features you wish existed but don’t yet? Your feedback can directly shape Django Forge 🙌 Let’s build something useful together. #Django #Python #WebDevelopment #DeveloperTools #BuildInPublic #Coding
To view or add a comment, sign in
-
I used to get really confused about RPC vs ORM in OWL 🤯 In Python backend, it’s easy, just use ORM. But in the frontend, things get messy. Odoo gives you multiple ways to talk to the server, and at first, I kept mixing them up. After building a few modules, debugging weird bugs, and reviewing other people’s code, it finally clicked ✅ Here’s what I learned: 👉 JS ORM – use when: ➡ Working directly with a model (search, create, read, write, unlink) ➡ Want built-in permission rules to work automatically ➡ Want simple, clean calls without writing raw RPC 👉 RPC – use when: ➡ Calling a controller route ➡ Need custom backend logic ➡ Not interacting with a model directly ➡ Want full control over request/payload ✨ In SImple way ORM → model stuff | RPC → everything else After this, frontend calls feel so much cleaner and debugging is way less painful 💡
To view or add a comment, sign in
-
-
I kept writing Django APIs… but something felt off. The code was working. Responses were coming. But if someone asked me: 👉 “What actually happens when a request hits your API?” …I didn’t have a clear answer. That bothered me. So I went back to basics. Not tutorials. Not copying code. Just understanding one simple flow: User → request → view → model → database → response And suddenly, things started clicking: Patient.objects.all() is not just a line of code… it’s a query hitting the database and returning structured data. request is not just a parameter… it’s literally everything the user is sending to your backend. GET, POST, PUT, DELETE are not just methods… they define how your system behaves. The biggest realization? 👉 I was focusing on “how to write code” 👉 instead of “how things actually work” Now I approach backend differently: I don’t start with code. I start with flow. And that small shift is making a huge difference. Still learning. But now it feels real. #Django #BackendDevelopment #Python #LearningInPublic #SoftwareEngineering #BuildInPublic
To view or add a comment, sign in
-
-
FastAPI vs Django: Which Wins in 2026? The best framework isn’t the one with the most features—it’s the one that solves your specific bottleneck. If you’re choosing for your next project, here’s a breakdown: Why the industry is shifting to FastAPI - Performance: Built on Starlette and Pydantic, it’s one of the fastest Python - - frameworks. Ideal for high-concurrency or I/O-bound tasks. - Developer velocity: Automatic OpenAPI (Swagger) docs and Python type hints reduce time spent on documentation. - Modern stack: Designed for microservices, AI/ML deployments, and modern frontends like React or Next.js. Why Django isn’t going anywhere - Batteries included: Comes with admin panel, authentication, and ORM out of the box. - Security: Built-in protection against common web vulnerabilities. - Stability: Strong structure for large-scale monoliths and enterprise applications. The verdict Use FastAPI if you want a high-performance engine for modern APIs or microservices. Use Django if you need a fully equipped framework for complex, data-heavy applications. Which side are you on? Are we moving toward a “FastAPI-first” world, or does Django’s ecosystem still reign supreme? #Python #WebDevelopment #FastAPI #Django #SoftwareEngineering #Backend #CodingTips
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development