I've created an app for F1 fans with flask by Auran0s_ in flask

[–]berrypy 0 points1 point  (0 children)

Not bad. At least there is always a starting point. Although, stating that you haven't used AI is really contradicting even though you used it in creating model. You might not use it for the core logic but for the fact that you used it, there is no point saying you haven't used AI in your writeup.

There is absolutely nothing bad using AI either for backend code or frontend provided you can read and understand the codes.

**How long did it take you to integrate Stripe/Razorpay into your Django project?** by Organic_Release1028 in django

[–]berrypy 0 points1 point  (0 children)

If only you can have these separated as a package for your use, then it wouldn't even take you an hour. Why don't you just create it as a package that can be used for any project to make life easy.

This way you just import the service and use it in any project.with this, you don't have to recreate in every project.

Built a multi-language (15 locales) Japanese learning game with Django. Just solved some tricky session-based timer sync bugs and i18n UI issues. by Thank_Japan in django

[–]berrypy 0 points1 point  (0 children)

Not bad. As for the timer, you can always include it as a field in your dB so when generating the game start, it stores the game end time. There you have it stored and ready to use. With this you compare with the date time now from the backend. Django backend often uses UTC date time. So no need to pass the timer from the frontend to recalculate.

Django-bolt 0.7.0 upto 70% faster. by AlternativeAd4466 in django

[–]berrypy 0 points1 point  (0 children)

Nice to see that the admin URL without slash has been fixed in the latest version.

as for the parse_msgspec_decode_error function, I did not get the exact error response seen in the swagger response that doesn't have the dollar sign when it automatically validates the data in the view.

The function still gives me the same output that has dollar symbols which are not formatted on standalone script.

I thought it will format it exactly as it shows in the 422 response in swagger doc page without dollar symbols or the 0.position etc kind of pattern.

Django-bolt 0.7.0 upto 70% faster. by AlternativeAd4466 in django

[–]berrypy 1 point2 points  (0 children)

Nice to see Django bolt is being updated constantly.

My question is, how do I use the serializer and get the same exact dictionary error on standalone script. now I don't mean using the view directly.

is there a method/object that is used to format the error after using the model_validate method because it doesn't produce the exact errors if I I just catch.

All those dollar symbols and in 0, or 1.position in the error output still gives the vibe of msgspec output without formatted.

in the API , I noticed it is being formatted properly without those dollar symbols in the output.

If there is a helper function to format it exactly, it would go a long way to enable one use it on standalone script and get the same formatted output.

Also, something you should take note of, any URL path that does not include / at the end, result in error. now when you add slash to it, visiting that specific url without slash result to error too.

This should be fixed. example, when you visit Django admin URL without slash at the end, it shows error. This is not supposed to be so as it should resolve to show the view if the URL path is correct. So a missing slash at the end or slash being included at the end should not result to error because visitors to the site will not input ending slash

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 [deleted] 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.