phildini, to django
@phildini@wandering.shop avatar

What are the best practices / good project templates for starting a project in 2024? Things that I used to do are cargo-culted in my own brain from 5 years ago, has anyone written a good recent guide?

(🚀 for reach welcome)

markwalker, to django
@markwalker@fosstodon.org avatar

It's been a talking point for ages now, but this week Fabian has found some time to actually make some progress on headless @djangocms

He's even put together this demo project which uses DRF to integrate with django-cms

https://github.com/fsbraun/djangocms-rest/tree/main

ben, to django
@ben@bencarneiro.com avatar

Would any #Django nerds be willing to chat with me next week about API design?

Specifically JsonResponse, custom json serializers involving like a thousand foreign keys, pagination, DRF. Basically- how to take a very complex schema and render out 100 massive json blobs at a time for core objects. sort of like stripe.

djangodenmark, to django
@djangodenmark@fosstodon.org avatar

Hello all Django friends 👋

📢 Django Day Copenhagen 2024 will be held on Friday October 4th and the Call for Participation is now open 📢

If you have never given a talk, if your talk idea is completely new, untested or rather whack, our message is the same: START BREWING! 🎷 🛠️ 💡 (or maybe encourage someone else)

https://2024.djangoday.dk/cfp/

#django #DjangoDayCPH

CodenameTim, to django
@CodenameTim@fosstodon.org avatar

I'm looking for some help running a GitHub organization dedicated to supporting community-maintained third-party #Django packages.

I've written up an introduction here: https://www.better-simple.com/django/2024/05/22/looking-for-help-django-commons/

You can join here: https://github.com/django-commons/membership

carlton, to django
@carlton@fosstodon.org avatar

> Custom tags may now set extra data on the Parser object that will later be made available on the Template instance. Such data may be used, for example, by the template loader, or other template clients.

That looks handy, at least partially 😜

https://docs.djangoproject.com/en/dev/releases/5.1/#templates #Django

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

#Appreciation for @carlton today. I have recently opened an issue and a PR on his repos and the responses have been of kindness and thoughtfulness to my potential ramblings (especially the issue I raised then closed!)

Keep it up!
#django

carlton, to django
@carlton@fosstodon.org avatar

Little smile for a appreciation message 🥰

webology, to random
@webology@mastodon.social avatar

✨ What's new in Django 5.1

I picked my favorite three features and wanted to share them.

What are you for favorite 5.1 new features?

https://micro.webology.dev/2024/05/22/whats-new-in.html

carlton, to django
@carlton@fosstodon.org avatar
djangonews, to django
@djangonews@socialhome.network avatar

Django 5.1 alpha 1 released

Django 5.1 alpha 1 is now available. It represents the first stage in the 5.1 release cycle and is an opportunity for you to try out the changes coming in Django 5.1.

Django 5.1 brings a kaleidoscope of improvements which you can read about in the in-development 5.1 release notes.

This alpha milestone marks the feature freeze. The current release schedulecalls for a beta release in about a month and a release candidate about a month from then. We'll only be able to keep this schedule if we get early and often testing from the community. Updates on the release schedule are available on the Django forum.

As with all alpha and beta packages, this is not for production use. But if you'd like to take some of the new features for a spin, or to help find and fix bugs (which should be reported to the issue tracker), you can grab a copy of the alpha package from our downloads page or on PyPI.

The PGP key ID used for this release is Natalia Bidart: 2EE82A8D9470983E.

https://www.djangoproject.com/weblog/2024/may/22/django-51-alpha-1-released/

#django #python #webdev

webology, to django
@webology@mastodon.social avatar

This is a nice new #Django 5.1 feature. I tend to work on websites that allow all access or no access except for a few marketing/signup pages. https://mastodon.world/@davidfstr/112484705392388791

carlton, to django
@carlton@fosstodon.org avatar
carlton, to django
@carlton@fosstodon.org avatar

Just on the by. The django-formset package by @jrief needs more attention than it gets.

https://github.com/jrief/django-formset

#Django

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

📣 Exploring HTMX, messages and template partials
📄 Getting Django messages without a reload
🔗 https://softwarecrafts.co.uk/100-words/day-95
#100_words,#django,#django_messages,#template_partials

benjaoming, to django
@benjaoming@social.data.coop avatar

Here's a generic response for object creation with django-ninja:

class GenericCreatedSchema(Schema, Generic[EmbeddedType]):  
 success: bool  
 created_object: EmbeddedType  

= use the same generic response template for ALL object creation endpoints.

But even better: I can use different response types in the same API endpoint, using HTTP status codes - depending on which fields are exposed to the user.

All of this translates to OpenAPI spec automatically 💯

#django #djangoninja

benjaoming, to django
@benjaoming@social.data.coop avatar

Oy! Today, it's the 10 year anniversary for #Django PR#2692 🥳

It's definitely worth celebrating how the good forces were victorious against all the loud mouth conservatives/trolls. Since my office is full today, I might need to get both a primary cake and a replica cake for redundancy 🍰

Congrats and thanks to @fcurella and everyone else involved in this.

https://github.com/django/django/pull/2692

rih4krc, to python
@rih4krc@mastodon.social avatar

Early AM, we begin to work on the Django framwork via Python. I've feared the framework for a while, but today I am going to handle it. Never let the programming lang handle me. lol.

carlton, to django
@carlton@fosstodon.org avatar

Just looked at the diary. Django 5.1 Feature Freeze is TODAY 🥳 #Django

carlton, to django
@carlton@fosstodon.org avatar

Job list goes:

  1. talk
  2. Templates partials PR for
  3. 5.1 compat for maintained packages
  4. Summer ⛱️

Every else is going to have to wait 😉

anuttam, to django

I heard that whole #django community left twitter and moved to mastodon. So I am here for my first love :)

SebastianM6L, to jenkins
@SebastianM6L@mastodon.social avatar

Anyone had an issue with from django.test import Client causing a high memory usage in a docker container?

I run the tests in a pipeline using a agent in .

When this test runs:

def test_login_user(self):  
 c = Client()  
 response = c.post('/user/login/', {'email': 'test1@test.de', 'password': 'test123'})  
self.assertEqual(response.status_code, 302)  

The memory usage goes thru the roof. Literally using up all memory until it crashes.

jack, to django
@jack@social.jacklinke.com avatar

I finally got around to upgrading my main project from Django 4.2 to Django 5.

I allocated several hours this evening for the arduous process of making sure I got everything right, and before I got started I figured I'd give django-upgrade (by @adamchainz) a try this time around.

No more than 15 minutes later my project was running on Django 5, tested good, and pushed to production.

Wait, what?!?! 😲

Super impressed with how easy django-upgrade made it ❤️

https://pypi.org/project/django-upgrade/

#Django

dlesieur, to python
@dlesieur@fosstodon.org avatar

Hello! I'm David, an experienced builder of web applications and information systems primarily for the scientific research sector.

I enjoy the challenge of complex problems, which I strive to solve with simple and elegant solutions, placing the end user at the core of my analyses.

I have many interests in life, but on Mastodon I will primarily focus on topics related to my work, such as , , , , , , , .

SebastianM6L, to django
@SebastianM6L@mastodon.social avatar

Why isn't

Model.objects.get_or_none()

a thing in #django ?

That would save some boilerplate code or am I wrong?

Because if there is a chance that there is no entry for the query get()will raise a DoesNotExist exception that you have to catch.

get_or_none()would be cleaner in my opinion.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • thenastyranch
  • DreamBathrooms
  • ethstaker
  • InstantRegret
  • Youngstown
  • magazineikmin
  • osvaldo12
  • slotface
  • khanakhh
  • rosin
  • kavyap
  • everett
  • tacticalgear
  • provamag3
  • ngwrru68w68
  • GTA5RPClips
  • cisconetworking
  • mdbf
  • cubers
  • Durango
  • anitta
  • modclub
  • normalnudes
  • tester
  • Leos
  • megavids
  • lostlight
  • All magazines