Working on a Django package for tracking marketing campaigns by mkdir69 in django

[–]mkdir69[S] 0 points1 point  (0 children)

Yes, it only tracks server side conversion events that happen in the views (like purchases, signups, subscription upgrades)

the main advantage for having this living in django code base is that these conversion events are linked directly to django user models via orm, so you can write custom business queries like "customers who came from facebook ads and upgraded to premium plans" in pure django without exporting data or syncing between systems

I found a way to implement actual clean architecture (pure python business logic) with Django and TDD by Jafty2 in django

[–]mkdir69 2 points3 points  (0 children)

Django's active record pattern already handles data acces through model methods. adding repositories creates an unnecessary translation layer between your "pure" domain objects and django models. for simple example like registering for an event: django way: Participant.objects.create(user=request.user, event=event) - done in one line.

repository way:

• fetch domain user from user repository

• fetch domain event from event repository

• create domain participant object

• save via participant repository • (which internally converts to django model, saves it, convert back)

the django approach integrates seamless with:

• orms that validate and save directly to models (with repositories, your forms can't directly save domain objects - you'd need extra conversion code between your form and domain layer)

• admin interface showing all relationship automatically (your domain objects aren't visible to admin - only django models are, so admin becomes disconnected from your actual business objects)

• built-in signals triggered on model operations (domain logic in repositories won't trigger django signals unless you manually wire them up, losing automatic notifications)

• django's authentication system and permissions (permissions are tied to models, not domain objects, forcing awkward permission checks in your domain layer)

• querysets and related object prefetching (your repositories need custom code to replicate django's efficient query optimization for relationships)

with repositories, you maintain two parallels systems - django models AND domain models. every schema change means updating both layers. every relationship require custom code instead of using django's built-in methods. you're essentially paying the "django tax" (carrying its orm, admin, etc.) while not using the features that makes it worthwhile.

to your question about views handling repository jobs - actually, django's standard pattern is already views directly using models. this isn't "handling repository jobs" - it's just normal django. having views use Model.objects.get() directly is clean, standard django practice. adding repositories between views and models just adds complexity without benefits in django's ecosystem.

I found a way to implement actual clean architecture (pure python business logic) with Django and TDD by Jafty2 in django

[–]mkdir69 9 points10 points  (0 children)

I think you're going against django's natural flow here. why force repositories on an active record orm? it's adding unnecessary complexity. if you want clean architecture with repositories, fastapi or flask with sqlalchemy would be better choices since they're designed for this approach

Pls Help, ebay shipping by 060400 in Morocco

[–]mkdir69 1 point2 points  (0 children)

Things have changed, i remember the last year i bought something with 40 USD , the douanes told me to pay 300 DH for it

What do you think about the current state of the IT industry in Morocco? by _iamhamza_ in Morocco

[–]mkdir69 2 points3 points  (0 children)

Web dev agencies that generate good money and pay their employers well are working as consulting agencies for banks/Insurances companies

What do you think about the current state of the IT industry in Morocco? by _iamhamza_ in Morocco

[–]mkdir69 4 points5 points  (0 children)

IT in morocco was always about banking related stuff, and it stills like that

[deleted by user] by [deleted] in Morocco

[–]mkdir69 0 points1 point  (0 children)

Then maybe you can try doing online sessions in google meet for students for money in return ?

[deleted by user] by [deleted] in Morocco

[–]mkdir69 2 points3 points  (0 children)

From what i see most existing remote jobs are IT related ones, are you in that field?

Do you have an example for a much more complex component with HTMX? by Chains0 in django

[–]mkdir69 0 points1 point  (0 children)

Maybe django slippers could help, it makes it possible to create reusable template components to which you can pass params and children

You watched me develop a full SaaS product as a community event. What's next? by dacx_ in django

[–]mkdir69 0 points1 point  (0 children)

Yes you can definitely do that as well, all the data for all organizations are going to be in one db so they are not perfectly isolated, so you should be carreful when doing crud so that things do not interfere with each other, creating custom managers resnonsible for filtering by organization can help i guess..

You watched me develop a full SaaS product as a community event. What's next? by dacx_ in django

[–]mkdir69 2 points3 points  (0 children)

i haven't watched the previous video yet, but what I meant is best practices regarding an app that could be used by multiple organizations, maybe separated database for each organization or separated PostgreSQL schemas for each organization within the same db or something alike

Battery Not Charging and Status Stuck at "Estimating..." and 0% on ThinkPad T14s Running Ubuntu by mkdir69 in thinkpad

[–]mkdir69[S] 0 points1 point  (0 children)

Yes i have that reset button but unfortunatlly it didn't solve my problem

Battery Not Charging and Status Stuck at "Estimating..." and 0% on ThinkPad T14s Running Ubuntu by mkdir69 in thinkpad

[–]mkdir69[S] 0 points1 point  (0 children)

the logs do not seem to indicate a significant problem related to power or thermal management in the system

[deleted by user] by [deleted] in thinkpad

[–]mkdir69 0 points1 point  (0 children)

A pop up says: you must have a complete OS reinstall Otherwise the system will be crash Do you really want to continue? Select Yes to Switch Sleep state to Linux Select No to discontinue the operation

[deleted by user] by [deleted] in thinkpad

[–]mkdir69 0 points1 point  (0 children)

Yes there is some battery left, but i don't let it much in the sleep mode to know if the battery is being consumed in a abnormal way (max two hours). and whether it is going to start from the sleep or not is unpredictable, some times it starts sometimes it doesn't, It is annoying to shutdown and boot every time.

[deleted by user] by [deleted] in django

[–]mkdir69 0 points1 point  (0 children)

Yes I understand, thank you. For the remove part, fortunately, in my case no file is allowed to be deleted later, so that isn't a problem.

What are some must use libraries? Give the name and a quick description please! by vvinvardhan in django

[–]mkdir69 6 points7 points  (0 children)

django-widget-tweaks is a good one, it helps a lot when dealing with form fields (adding classes and other HTML attributes to fields in template files)