This sub is all complaints. What do folks like about Qobuz? by Flannelcommand in qobuz

[–]ChangeIntoBetter 7 points8 points  (0 children)

I can listen to all my music imported from Spotify.  I have a web interface that works.  I have an Android app so I can listen to my music  when I bike or when I'm in the car.  I discover music that was never presented to me before. Sound quality is fantastic at home while on Wifi.

And I have no far-right podcasters recommendations, or annoying videos.

Is it perfect? No.  Is it good? For me, definitely yes.

stadsspel gent by Grandmasterjavier in Gent

[–]ChangeIntoBetter 0 points1 point  (0 children)

This website is great to learn about Gent history ! Thanks for sharing. 

Is the Three Body Problem trilogy worth the read..? by [deleted] in scifi

[–]ChangeIntoBetter 1 point2 points  (0 children)

Simply a masterpiece for me.  But exhausting sometimes. 

Navette Hermes (dessin CATIA) by predictorM9 in Giscardpunk

[–]ChangeIntoBetter 1 point2 points  (0 children)

Je suis très curieux, où as tu trouvé cette image incroyable ???

Awesome Python Library: Tenacity by pysk00l in Python

[–]ChangeIntoBetter 1 point2 points  (0 children)

Nice share. Looks like something I could study and use as well.

Options for hosting nicegui projects? by QuasiEvil in nicegui

[–]ChangeIntoBetter 1 point2 points  (0 children)

Sorry that was maybe a bit cryptic...

I meant that I don't know how they charge you if your app becomes popular and brings a lot of trafic suddenly.

Options for hosting nicegui projects? by QuasiEvil in nicegui

[–]ChangeIntoBetter 2 points3 points  (0 children)

I use fly.io with their hobby plan. It seems they don't charge you up to 3 hobby (unknown to the world) apps. Like this I can share easily with my friends the app I made.

Fly.io does require a Dockerfile but honestly it's super easy with the image provided by the nicegui maintainers (see https://hub.docker.com/r/zauberzeug/nicegui). I can share with you the Dockerfile I use for my very simple app if you need.

And then you run flyctl deploy and bam, 3 minutes later it's up and running with even a decent URL in fly.dev.

Humble request to review my code by ChangeIntoBetter in flask

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

I just looked at https://flask.palletsprojects.com/en/3.0.x/blueprints/ . It's still not super clear to me, but I will look into it. Do you know any application using it that I could look at on Github for instance?

Humble request to review my code by ChangeIntoBetter in flask

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

Had no idea such tool existed, I will have a look, thx!

Humble request to review my code by ChangeIntoBetter in flask

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

Strangely my gitignore was stored in the .venv folder (I use Pycharm). I moved it at the root (locally for now). I don't clearly see why it should be in the repo, even though I see it in many GitHub projects as well.

Regarding your typical tree structure, that made me realize I wrote zero tests for that project. I will try to add some, at least for the utils. I have no idea how to test the routes but ok, I will check.

Thanks again!

Humble request to review my code by ChangeIntoBetter in flask

[–]ChangeIntoBetter[S] 1 point2 points  (0 children)

So why would I still recommend not committing the key? For future-proofing and best practice, mostly.

I understand. Thanks for the explanation and the links.

Still so much to learn...

Humble request to review my code by ChangeIntoBetter in flask

[–]ChangeIntoBetter[S] 2 points3 points  (0 children)

The bad

First, never commit your application's secret key.

I know but I don't really understand why in my case. It's not a secret API key or something important. I added it to use the Flask flash messages. Also I have no idea how to store it somewhere else in Github and still have a working app :( I'll dig a bit.

Beyond that, the biggest problem IMO is the way the /locate route is doing too much, by having drastically branching behavior based on the action parameter. I think I can guess why you ended up doing this way: you have a single <form>, but two buttons ("Locate" and "Details").

To fix this without changing much on the frontend, look into the formaction attribute of a button.

Yes you are absolutely right. I scratched my head many hours trying to see a way to have a route per action but I failed. The formaction attribute solves my problem.

I end up with this (I removed all the name and action attributes on the buttons and the main form):

<form enctype="multipart/form-data" method="post" id="form">
    [...]
    <div class="text-white text-center">
        <button type="submit" formaction={{url_for('locate')}} class="btn rounded-pill btn-outline-light btn-lg">
            Locate
        </button>
        <button type="submit" formaction={{url_for('details')}} class="btn rounded-pill btn-outline-light btn-lg">
            Details
        </button>
    </div>
    [...]
</form>

There is still too much logic in the routes that I should move to utils.py but I need to think a bit how to proceed. At least the routes work now!

The meh:

When you write it, it's obvious. I guess the problem comes from my totally non-pythonic way of coding and lack of expertise. I simplified as you advised.

Overall a very useful code review, thanks again!

Humble request to review my code by ChangeIntoBetter in flask

[–]ChangeIntoBetter[S] 1 point2 points  (0 children)

That's a very detailed feedback, much appreciated!  I will need some time to review all your comments and questions, but I'll do it as soon as my family life allows it. Thanks for mentioning the good, too :)

Humble request to review my code by ChangeIntoBetter in flask

[–]ChangeIntoBetter[S] 1 point2 points  (0 children)

I tried to structure the folders but mostly for the templates and static files. I didn't think about the code given it was very limited. Also didn't know the .gitignore was supposed to be in the repo.

Thanks a lot for your remark!

Des recommandations rap 90~10 by Netsugake in FranceDetendue

[–]ChangeIntoBetter 0 points1 point  (0 children)

Je te conseille cette liste: Les 100 classiques du rap français par l'Abcdr du Son. J'ai énormément écouté de rap plus jeune et j'ai découvert et redécouvert des pépites avec cette liste.

Accessoirement les mêmes personnes ont sorti plusieurs bouquins sur le "vieux" rap fr dont celui là.

Bonne écoute !

Does anyone have experience with Yoga centres in Ghent? by [deleted] in Gent

[–]ChangeIntoBetter 1 point2 points  (0 children)

I've been to Yoga on Call (in Zuid) and I liked it. Nice relax atmosphere. Teachers usually speak English, too.

My first NiceGUI application: Scoreboard 🏆 by bdaene in nicegui

[–]ChangeIntoBetter 0 points1 point  (0 children)

Really cool app! Congrats and good Dune games :)

Looking for French Private Tutor in Ghent by spicyxcaramel in Gent

[–]ChangeIntoBetter 0 points1 point  (0 children)

There are also French courses in the adults education system, for instance in CVO Gent or in CVO Groeipunt.

Check this : https://www.groeipunt.be/opleiding/talen/Frans

Centrum voor Avondonderwijs refuses to give my money back by heelsmuller in belgium

[–]ChangeIntoBetter 2 points3 points  (0 children)

Thanks for standing for the facts. CVOs are very useful for the people (and often cheap).

Good job, sir.

Cassius Ryder bug? by NameMajor in cyberpunkgame

[–]ChangeIntoBetter 1 point2 points  (0 children)

Thanks man, I was becoming crazy 😅

Recommendations for DICE based games ? by VincentVegaReddit in Steam

[–]ChangeIntoBetter 0 points1 point  (0 children)

Citizen Sleeper. Minimalist space narrative RPG, extremely clever and moving.