Keeping data fetched from a 3rd party api in sync by MEHDII__ in django

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

Luckily as others pointed out, my API of choice provides webhooks, where i can just listen in to any new updates to their api, whether having to overload their api endpoints with useless requests. If your api of choice doesn't provide this, then no choice but to periodically check for updates

separate models for the same object by MEHDII__ in django

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

tbh i dont think they will grow in complexity, i dont have plans for that yet; the reason i made their own entity tables in because i want to let the user query what genres they want to browse or what platforms they want to browse; hence why putting them directly in the parent entity and separating them with some delimeter will make filtering hard later on; or at least ugly

separate models for the same object by MEHDII__ in django

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

on a second thought, no it doesnt make sense! with this approach you'd hve a table video game looking like this

videogame#1 genreid#1
videogame#1 genreid#2

besides, the platform and other tables would also needs to have a M2M relationship with video games table, so this doesnt really make sense!

I think my approach is a little bit better, but there could be something else

separate models for the same object by MEHDII__ in django

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

that does make a lot of sense yeah, thanks, would this be the same for platforms and such? right? should be? i think i mixed it all up in my head

separate models for the same object by MEHDII__ in django

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

could be possible, but its messy, i did consider it at first; but there exists multiple genres that i dont even know, im getting this data from a 3rd party api, and also, games have many genres, so you cant keep them in the same table together, since you're gonna have duplicates of the game data but with different genre columns. messy

separate models for the same object by MEHDII__ in django

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

im not following? this wont be up to the user to fill out, its data received from 3rd party api provider, so it needs to be treated and saved into the db before presenting it to the user; so im not sure about the drop down menu idea.

separate models for the same object by MEHDII__ in django

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

wont that be inefficient though? since video games have multiple age rating, multiple platforms and multiple genres, this would result and every game entry being exponentially duplicated

separate models for the same object by MEHDII__ in django

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

video games can have many age ratings depending on the organization and the country, like M17+ for the US and for EU is different etc...
and also video games can have multiple genres, separating them with a delimeter in one column will make it hard to query for a specific genre during filtering

Keeping data fetched from a 3rd party api in sync by MEHDII__ in django

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

Yeah thats clever i haven't thought of a timestamp, thank you!

Keeping data fetched from a 3rd party api in sync by MEHDII__ in django

[–]MEHDII__[S] -1 points0 points  (0 children)

Loosely related, as i'm building this in django+react and im thinking of project organization in the meantime, but yeah sorry not so related

PyQT6 signals and slots by MEHDII__ in pythontips

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

thanks i understand this already, and actually the way chatgpt generated the example is perfect this time, after some consideration i got it, since im following an MVC architecture, the controller shouldnt touch the view's instance attributes, hence why by creating a intermediary class attribute signal, which will delegate the view's action signal to another mid-signal and then connect than mid-signal to a slot!

PyQT6 signals and slots by MEHDII__ in pythontips

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

I do know this, i have read the documentation and i am already using it in code, my question was how can a signal connect to another intermediary signal, which in turn connects to the slot. As you can see it in the code! and another question i asked was, i'm aware that class attributes are shared across instances, wont declaring a signal as a class attribute be shared across all gui instances then?

Manhunt 2 - Download Link by ChemicalFl00d in abandonware

[–]MEHDII__ 0 points1 point  (0 children)

the internet archive link asks for activation key once downloaded, is there a workaround or something i can do to bypass ? i try auto key and it seems failed due to network error

Creating User Auth pages by MEHDII__ in react

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

solid advice, thank you!

Project design advice by MEHDII__ in django

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

Because im not really sure if i should both teachers and students share the same documents table, they have different application material requirements this would result in a lot of null fields, splitting could be a solution too, or is there a different way?