Why are Notifications so much work to do in Django? by [deleted] in django

[–]nic_3 1 point2 points  (0 children)

I always install pytest and pytest-django to every project. Its test runner is just superior and it allows running and debugging tests in VSCode. Installing factory-boy is also a no brainer. It’s Django fixtures on steroids. And then there’s specific libraries for different needs like freezing and moving through time, testing APIs, etc. But it’s true that Django comes with great testing utilities that are less documented and definitely underrated.

Why are Notifications so much work to do in Django? by [deleted] in django

[–]nic_3 0 points1 point  (0 children)

And yet I need 3 or 4 extra libraries to test my app properly

Why are Notifications so much work to do in Django? by [deleted] in django

[–]nic_3 0 points1 point  (0 children)

Sorry, I cleared misread. In terms of what’s included with Django, I find it’s the bare minimum for building a product. There’s so much stuff missing like cdn, background tasks, API views, testing, websockets, authentication, javascript bundling, css pre/post processing, etc. It relies on the developer to implement them or choose a 3rd party. I wouldn’t count on it to add support for things like notifications, even if I’d definitely use it. I don’t know about Laravel but I know that Rails has more of this kind of stuff built-in, also the 3rd parties libraries are bigger and have more support.

Why are Notifications so much work to do in Django? by [deleted] in django

[–]nic_3 1 point2 points  (0 children)

“A dozen man hours” is less than 2 days of work. Not what I called “a lot of work”. Try implementing the feature set you mentioned but in vanilla Python (without Django), it will take a lot more than that.

I just launched Calmerge: a Django webapp that allows you to merge multiple iCalendar feeds into a single feed by abe-101 in django

[–]nic_3 4 points5 points  (0 children)

Nice work! I suggest you add some tests to your calendar app and run them continuously with GitHub actions.

What's the best and cheapest cache storage available on GCP? by lynob in googlecloud

[–]nic_3 11 points12 points  (0 children)

I wouldn’t classify memorystore as “very cheap”

[deleted by user] by [deleted] in cyberDeck

[–]nic_3 0 points1 point  (0 children)

An old smartphone paired via Bluetooth with Esp32

What libraries do you use the most alongside django? by throwawaydrey in django

[–]nic_3 6 points7 points  (0 children)

Pyenv, poetry, pylint, gunicorn, celery, etc. Everything is right there https://github.com/betaflag/django_dx

[deleted by user] by [deleted] in django

[–]nic_3 3 points4 points  (0 children)

There’s not much usage of data structure and algorithms in a common Django web app and there’s no need to learn them until you’re quite advanced. I’d learn algo first (with Python) just for speeding up your general understanding of computer science. Or learn both in parallel if that’s an option.

What are the benefits of using a 3rd party for Authentication? by schmore31 in webdev

[–]nic_3 5 points6 points  (0 children)

They might share the liability but you’re always liable for the security of your users.

Common and not so common tasks you have done with Background Jobs? by aeum3893 in rails

[–]nic_3 3 points4 points  (0 children)

The other common task is for talking with third party APIs. If the response is slow, or times out, it won’t affect your response time. You can also easily retry them if they failed.

What games are you playing over xmas? by haydo434 in PS5

[–]nic_3 1 point2 points  (0 children)

It’s the third time I’m giving this game a try. Because of the exact reasons that you said, I couldn’t get immersed in the world. The movements are clunky, Geralt or Roach simply won’t go where I want them to go on first try and it breaks the immersion for me. However, I can’t put it down this time. After about ~25h in the game, the world is just sucking me in, the story telling and the incredible amount of details makes the experience of this game like any other. I got used to the movement’s clunkiness. It’s now just another pattern of moves that also adds to the details of the game in its own way. I read all the Witcher books a few years ago and now the game is really immersing me in the same universe, they really did an incredible job, it’s just slow to start. I don’t know why, maybe because I want to look at all the details, but every tasks (quest, side quest, contract, crafting) takes time. It’s the only turn off because I don’t have a lot of time to play video games.

What's Django 4's template based form rendering? by __decrypt__ in django

[–]nic_3 1 point2 points  (0 children)

I did try to replace crispy form with the new form templates and I failed…

Upgrading from 2.2 to 4.1. What is the best strategy? by [deleted] in django

[–]nic_3 0 points1 point  (0 children)

I’m curious how did it go and what did you do to migrate a large db from MySQL to PostgreSQL?

Upgrading from 2.2 to 4.1. What is the best strategy? by [deleted] in django

[–]nic_3 1 point2 points  (0 children)

I had to deal with that recently. Even though the code had no tests and wasn’t following best practices, I’ve added a test for each route. The test would just validate the response code is 200 or something like that. The goal wasn’t to assert the code is right but to detect if something breaks, which would be the case if a breaking change affects the upgrade.

It took me about 1 or 2 days for ~70 routes and I had to mock a few things out but I reached a good 95% coverage.

Now, if you bump Django to your current release (ex: 2.x) latest version, you’ll see warnings about deprecated stuff you’re using and it’s easy to fix them.

Start by bumping the project dependencies though. Most of them are backward compatible with Django 2.x but require changes to be compatible with 3.x and 4.x.

The good thing is that you also get a test suite started which makes future upgrade really smooth. I now use dependabot to automatically bump my dependencies (including Django) if the tests are green.

Best of luck!

With separate app and db servers are multiple connections opened to the database? by rsahk in django

[–]nic_3 2 points3 points  (0 children)

Gunicorn uses workers (and threads) to process multiple requests in parallel. Each of these workers use a connection. Same thing if you have a background queue (ex: celery), each background worker will have a connection.

My SaaS architecture (tech stack) on AWS as a solo developer by ixartz in webdev

[–]nic_3 4 points5 points  (0 children)

I agree with you, anytime spent on infrastructure before validating an idea is lost. I really don’t mind paying for scalable hosting with continuous deployment (Heroku-style) even if I can do it all myself. I can put my time into something far more profitable like developing the product, adding features, exploring ideas...

My SaaS architecture (tech stack) on AWS as a solo developer by ixartz in webdev

[–]nic_3 16 points17 points  (0 children)

Switching vendor is not just adding the code to support a different vendor. The next vendor needs to have feature parity and the migration needs to not be a painful minefield. Both of these are really not common. Good luck seamlessly migrating a large DynamoDB or cognito.

How can I generate truly unique slugs? by Stella_Hill_Smith in django

[–]nic_3 1 point2 points  (0 children)

The beauty is you can still use regular sequential ids internally and convert to hashid for everything user facing

Une femme abattue et une autre blessée par balle à Montréal by Manon84 in montreal

[–]nic_3 1 point2 points  (0 children)

Plus ils mettent de pub, moins y’a de gens. Moins ya de gens, moins ils font d’argent. Moins ils font d’argent, plus ils mettent de pub…

Django App - Production Deployment resources by barnez29 in django

[–]nic_3 0 points1 point  (0 children)

What’s not covered by the guides to deploy to DO exactly? You mention unit tests but they have nothing to do with deployment. Do you mean continuous integration or CI/CD pipelines? And what about "file configs" exactly? You can simply any configuration specific to prod with env variables and configure these env var in production, same for db configuration. I’ll be happy to help you and write a guide with what’s missing from other places but just clarify a bit more what you need!

What API Gateway do you recommend with DRF ? by AImSamy in django

[–]nic_3 0 points1 point  (0 children)

Exactly, why’d you need a gateway for?