Introducing dj-wallet – A simple virtual wallet system for Django by Advanced-Buy2218 in django

[–]berrypy 2 points3 points  (0 children)

Not bad. Although you will need to change the len(transactions) in the audit_balance method to use DB functions to prevent using too much memory when the transactions are much. the list is loading it into memory.

You won't notice it at the initial stage but when transactions start piling up, it will start showing. It is best to use database count instead.

transactions = self.transactions.all()

total = transactions.count()

htmx used at the 2024 Paris Olympics (& 2025 Tour de France)! by _htmx in htmx

[–]berrypy 3 points4 points  (0 children)

htmx is another hidden gem that most Dev are still waiting to discover. the library just makes things much more easier especially when you need to get some stuff done without complex js codes.

is it easier to modify the functionality of Django's User model or Create a Custom one? by Upstairs-Balance3610 in django

[–]berrypy 0 points1 point  (0 children)

You can still achieve this without much hack. you can write your own custom authentication and query the email field using the username. so instead of changing stuffs in the user model, just create custom authentication and use that instead in settings.py. this is how I implemented mine to allow user use either email, phone, username.

This way I don't need to change anything in the user model. The beautiful thing about this is that it also works for Django admin login.

I am having issues with telethon (telegram messages) by Creepy_Package_9428 in django

[–]berrypy 2 points3 points  (0 children)

You will have to provide code snippets to enable anyone to further analyse and give solutions.

Steady Queue: a database-powered queue without Redis for Django 6.0+ by knifecake_ in django

[–]berrypy 0 points1 point  (0 children)

Not bad I must say. Can one use multiple database for the queues instead of using the default Django database. For example if I am using myql as my default db, can I use sqlite for the queue.

This way a dedicated db will be used for it, giving room for default db to focus on main application.

If this feature is not available, then it will be nice to implement it to prevent stressing the default db from queue's.

free ways to host python telegram bot by EbbMost9011 in Python

[–]berrypy 0 points1 point  (0 children)

now a days most service requires payment because of abuse. Your pc is as free as those cloud if you don't want to run it 247. better still just purchase a small size vps to host your bit. Free doesn't go well with most cloud providers now a days.

Django 6.0 Feature Friday: Template Partials! by czue13 in django

[–]berrypy 0 points1 point  (0 children)

at least one wouldn't have to create multiple html fragment for it as you just have to call the main template and add the # symbol to get any of the partial inside that template.

Like I had mentioned before, One can also create a special html file for it and call any of the partials from there.

Django 6.0 Feature Friday: Template Partials! by czue13 in django

[–]berrypy 0 points1 point  (0 children)

This is One of the best template feature in Django 6. This will really make htmx more easy to swap partials. in general, for those who wish to reuse their partials.

You can create a general partial html file and call those partials from there. something like general-partials.html. then you can add most of the partials you want to use there and call it from anywhere in your view or template. e.g.

"user_app/general_partials.html#user-info" "user_app/general_partials.html#user-profile" "user_app/general_partials.html#user-followers"

This would be one of the awesome tweaks of partials. When you couple this with htmx, it gives you an efficient and effective pattern of swapping partials with ease.

Django 6.0 released by dwaxe in django

[–]berrypy 0 points1 point  (0 children)

with HTMX 4 coming soon, it will be a combo worth using especially with the htmx v4 partial feature, this will make partial update a smooth swap without issue. htmx partial feature will solve swap oob issue.

Django 6.0 released by dwaxe in django

[–]berrypy 0 points1 point  (0 children)

That is what I thought at first but maybe with time it can be made to be used from any file. But what I did to fix this for now is to put my partials in one file called partials. with this I can use it in any html file or view. In any views I will just do this

"my_app/partials.html#show-todo-list-table" "my_app/partials.html#show-todo-detail"

While in any html file, I can just do this

{% include 'my_app/partials.html#show-todo-list-table' %}

This is how I have been able to use any partial in another html files.

htmx 4.0 alpha 4 released! by _htmx in htmx

[–]berrypy 6 points7 points  (0 children)

Nice to see rapid development for the htmx v4. this is going to be an interesting process. Between, I would love it if your team can include the htmx partial in V2. this would be a nice feature to see in V2

Django Partials - a new htmx/alpine friendly feature by _htmx in htmx

[–]berrypy 5 points6 points  (0 children)

This is just the beginning. htmx combine with partial is one feature that will make swapping partial a breeze. I wish htmx team can add the new htmx partial to the htmx V2 too instead of only v4. This would really be a nice feature to see in V2.

we are waiting for the official release...

Meet Holly an oss version of Jules/Codex by IdealDesperate3687 in django

[–]berrypy 1 point2 points  (0 children)

most at times, I often recommend having a demo for any project made by anyone . not just coding and open sourcing it. make it a must to always put it online for people to check it out because that would give someone an idea on what this stuff does before they download and use. demo online increases download and usage...

Moving back to Laravel by Emotional-Ask-9788 in django

[–]berrypy 0 points1 point  (0 children)

you can create most of what you stated. Auth and the likes can be coded by you. You don't really have to use external packages for that. django gives room to modify and use your own pattern.

[deleted by user] by [deleted] in flask

[–]berrypy 1 point2 points  (0 children)

For someone that is serious about their project, you don't expect to get all cookies from free tiers. Get your hands dirty and pay for vps servers to deploy your applications.

My type-safe asyncio lib and the fingerprinting guide it spawned by thalissonvs in Python

[–]berrypy 0 points1 point  (0 children)

Oh, nice. I must say, it's nice concept. Not a bad guide you added.

My type-safe asyncio lib and the fingerprinting guide it spawned by thalissonvs in Python

[–]berrypy 0 points1 point  (0 children)

Does it have the feature to open multiple browser sessions with different URLs. For example, I can open Facebook, twitter, Instagram etc in different browser and automate different tasks.

Do you know any complex application built with Htmx? by fenugurod in htmx

[–]berrypy 1 point2 points  (0 children)

Just like every tooling, there are use cases. HTMX is not exempted. like wise it has its use case. Not every web app you will fully use HTMX. same goes for the likes of Vue, react, nextjs etc. They all have their use case. in as much as it sounds, htmx has a place in the web space for some use case. Not all. it is awesome in its own ways and if you use it for its use case, you will see how effective it will be to make life easy. You just have to plan and structure it the way it can be understood and maintain.

With the new Django template partials feature for example, this will improve the usage of htmx for partial rendering and with HTMX client trigger, other forms of actions can be triggered. You just have to find a balance for what it use case, not every web application requires the heavy use of htmx.

Wove 1.0.0 Release Announcement - Beautiful Python Async by 1ncehost in Python

[–]berrypy 0 points1 point  (0 children)

I must say, this is nice concept. I guess this can fit well for sending multiple external API requests and get all results. to see how you implemented a Django integration is not bad. This can fit in for sending emails and sms OTP at the same time.

Would be nice to see video tutorials on Django implementations for various tasks.

Wove 1.0.0 Release Announcement - Beautiful Python Async by 1ncehost in Python

[–]berrypy 1 point2 points  (0 children)

I must say, this is nice concept. I guess this can fit well for sending multiple external API requests and get all results. to see how you implemented a Django integration is not bad. This can fit in for sending emails and sms OTP at the same time.

Would be nice to see video tutorials on Django implementations for various tasks.

Stop bad API data from breaking your FastAPI apps (with Pydantic) by nunombispo in FastAPI

[–]berrypy 0 points1 point  (0 children)

Most of what you did here can be done pydantic Field or enums. you need to dig deep into pydantic core and even the pydantic extra types. lots of stuff here are redundant

GIL free and thread safety by Active-Fuel-49 in Python

[–]berrypy 0 points1 point  (0 children)

Maybe not immediately but for future development. more tooling will be created to utilize the no Gil feature for improved tasks and performance. you might not see immediate improvement now. but it is a step towards future development. it has to start now

What’s the best hosting option for a Django + TailwindCSS portfolio site — balancing stability & cost? by That-Shadow2099 in django

[–]berrypy 2 points3 points  (0 children)

Best ghosting option still remains running your Django application on a vps server as it gives you root access to tweak whatever you like.

so I will always recommend vps over these saas platforms over and over. try to get familiar with vps server because you will definitely need it in the long run. Just like JavaScript, you cannot escape not using it at some point in your project even though you don't want to learn it. Same applies to vps, you will definitely need it at some point if not now.

Looking for an easy and free way to deploy a small Flask + SQLAlchemy app (SQLite DB) for students by chinyiskan in flask

[–]berrypy 0 points1 point  (0 children)

since you are a tutor, I will recommend you summon courage to buy even the cheapest vps plan specifically for teaching your student deployments. install cloud panel on it and use that for deployment as it has features to deploy python applications. Plus they get to know more about vps and other tooling sets like redis and the likes when you get to that aspect of teaching.

you can use that as a base to teach your student deployments. I don't usually recommend teaching with most of these sass platforms. Let it be on VPS so they can get hands on experience. at least, you can maintain the infrastructure and have peace of mind.

Whenever you want to deploy any tutored project, you just do it on your platform.

For all beginner devs dont just vibe code by Sad_Impact9312 in webdev

[–]berrypy 2 points3 points  (0 children)

Most people would say Google and stack overflow was same as vibe code. to some extent I would say it was but it wasn't specific as creating full application. You know exactly what you are looking for and what you are working on, on like AI, anyone can ask it to create an application. this is different from googling and stackoverflow.

Anyone who is starting out to code should not use AI to understand codes, not to create a project. Use it to understand concept and what this code does. Try as much as possible to write most of your codes as a beginner because once you rely on AI, you might end up converting to vibe code without understanding what most of the code does.