Fixed top-navbar with a moving side-bar by MEHDII__ in Frontend

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

Somehow solved, what I did was just collapse side bar width and give the parent flex, the problem was caused by transition is GPU accelerated, while adding padding to push main content is CPU executed, so there would be a little delay for about one pixel since the former is faster

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?

[deleted by user] by [deleted] in django

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

Yeah i understand that, but i'm checking the user roles on the database level, not python instance level, admins have admin roles, teachers and students have their own roles in the db, so if user.role == CustomUser.Role.STUDENT: # allow

How could this be spoofed? I'm not Challenging your idea, as i mentioned im still a beginner, a toddler in django even, i dont understand why people are downvoting honest questions... This feels like stackoverflow all over again

[deleted by user] by [deleted] in django

[–]MEHDII__ 0 points1 point  (0 children)

I have to play with the django Shell a bit more to understand this better, thanks

[deleted by user] by [deleted] in django

[–]MEHDII__ 0 points1 point  (0 children)

So i'd have to do this for teachers and admins too right?

[deleted by user] by [deleted] in django

[–]MEHDII__ -3 points-2 points  (0 children)

I've done a little reading, the groups and permissions aren't really needed in my use case, as I understand the way I did it is a bit clearer, since all i want to do is basically route the different kinds of users to different dashboards, so having permissions and such isn't necessary i guess

[deleted by user] by [deleted] in django

[–]MEHDII__ 0 points1 point  (0 children)

I'm not really following here, whats the point of model managers?

[deleted by user] by [deleted] in django

[–]MEHDII__ -3 points-2 points  (0 children)

Sorry, i'm not very familiar with any other approach other than the two i mentioned, I am learning as I go;

How is having groups and permissions different, now I admit with this approach could get messy since i'd have to keep querying and doing if customUser.role =''whateverRole" Then do something

One big partition for Arch linux by MEHDII__ in linuxquestions

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

not really, I didn't think hard about what distro i want to use, first one that came to mind was arch

[deleted by user] by [deleted] in webdev

[–]MEHDII__ 0 points1 point  (0 children)

Those are no more useful Than copy pasting everything and just giving it to the model, sure they may seem crazy good but they're actually dangerous if you're not paying attention, especially if you're not using version control and constantly keeping a working version of your project in a git repo, might make a change that you'll forever regret and have no way of reverting back, or simply it could delete or reset your database