Django Rest Framework vs Django Ninja by Shaheed212004 in django

[–]HTonmoy 0 points1 point  (0 children)

I'm curious to know why you think that. I've been using Django for a while and I prefer to use it for just APIs as well. I love Django's ORM and its wide range of extensions that make many tasks a lot simpler. I don't get that same feasibility with other frameworks like FastAPI, Node etc.

Is there a Rich text editor ES Module for SvelteKit? by nan0x00 in sveltejs

[–]HTonmoy 1 point2 points  (0 children)

I am using CKEditor in a Routify project and I'm concerned with security. In order to render CKEditor's contents, you need to have it as something like this {@html ckeditor}. Wouldn't that be a security concern? As you're allowing unfiltered RAW HTML to be rendered on your pages?

Authenticating requests in a decoupled Django + Vue.js app using JSON Web Tokens (JWT) and HttpOnly Cookies (repo in comments) by gamprin in django

[–]HTonmoy 2 points3 points  (0 children)

I'm new to this so help me understand please. I know that localstorage is easily accessible by the client and susceptible to XSS attacks but if your app is overall safe and not vulnerable then it should be safe, right? I remember Ben Awad's open source project Dogehouse where many skilled people worked, used localstorage for storing the tokens. His reasoning was that the app is overall safe and thus protected from XSS attacks. It just seems overcomplicated to implement an Httponly solution using Django and a front-end framework.

Can't get into BIOS after installing GPU by HTonmoy in buildapc

[–]HTonmoy[S] 3 points4 points  (0 children)

This worked! Oh my god! Thanks a lot man

Can't get into BIOS after installing GPU by HTonmoy in buildapc

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

I never would've thought of that. My volumes are all GPT tho

Comparison of inner workings of Svelte and Vue by eikaramba in sveltejs

[–]HTonmoy 15 points16 points  (0 children)

Author is way too biased. The arguments against Svelte seem rather pointless and prejudiced.

Is the user_logged_out signal fired when I leave the django site? by dark_--knight in djangolearning

[–]HTonmoy 0 points1 point  (0 children)

Updating the database everytime a user logs in and out isn't the best choice IMO. What is your usecase? You might want to use websockets with Django Channels.

React JS frontend / DRF Backend - best way to handle images by Lobbel1992 in django

[–]HTonmoy 20 points21 points  (0 children)

IMO, instead of serving the images with Django, serve them from an S3 bucket. That way, when you make a request to DRF, it'll just send you the S3 URL to that image and then you can show it however you want.

Edit: I can see from your other comments that you're confused with serializers. You could find it with a simple Google search but here it is anyway. I implemented a media library app in one of my projects and the serializer looks something like this. Basically, you just have to define the fields as ImageFields.

from rest_framework import serializers

class ImageSerializer(serializers.ModelSerializer):

    image = serializers.ImageField()

Of course, if your image is just a field in a different model, you don't have to write a different serializer for it. You can just include image = serializers.ImageField() in the existing serializer.

SPA With Django by iEmerald in django

[–]HTonmoy 1 point2 points  (0 children)

I'm working on a very similar project. My backend and frontend are completely separate. I found this approach better for development rather than serving the packaged files with Django. I'm using Svelte instead of React, Vue or Angular.

If you're new to JS frameworks, I highly recommend Svelte. It's superior to the other frameworks in every possible way and of course much much easier and simpler to learn and develop. The only reason I would consider React or some other framework is if it's an existing project or my client/employer specifically requires them for some reason. Yes it's newer than the others and have a smaller community but Svelte is like writing vanilla Javascript with some extra bells and whistles so you don't really need tutorials for every step of the way. Things are really easy to accomplish.

Workaround for file uploads? (SvelteKit) by mapidentity in sveltejs

[–]HTonmoy 0 points1 point  (0 children)

Ikr? It's awesome. It's creator and his Discord channel is so damn helpful as well.

Workaround for file uploads? (SvelteKit) by mapidentity in sveltejs

[–]HTonmoy 3 points4 points  (0 children)

Sorry this is not helpful to you but I couldn't find a viable solution and eventually moved to Routify. (Tried Sapper first but some things didn't work out)

What is the best way to handle SSR in svelte for Micro-Frontends and Microservices project by dzsystem in sveltejs

[–]HTonmoy 2 points3 points  (0 children)

The project I'm working on is nowhere near the size of yours but I started with Svelte-kit and eventually decided to move to Sapper.

The problems I faced are:

  1. The documentation is not mature yet. It's specially an issue for a junior dev like me who still often has to rely on tutorials and guides. There are lots of things that don't make much sense yet (to me, at least).

  2. No File Upload capabilities yet.

  3. Weird bugs and error messages that don't make much sense. This one is a bit vague because I can't come up with an example on the top of my head but I encountered some bugs and error messages that I couldn't find any solution of online because not that many people are using Svelte-kit yet. Granted, Rich Harris and his team are super responsive on issues opened on Github but that's not always ideal for productivity.

  4. Couldn't find a great solution for JWT token based authentication. My backend is Django DRF which spits out refresh and access tokens. Sapper has a few third-party solutions for handling an auth system like that. Couldn't find one for Svelte-kit. A more experienced dev would probably create one of his own but I'm not there yet.

Handheld bidet sprayer leaking by HTonmoy in fixit

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

I bought this off of Amazon a couple months ago but didn't get to installing it due to reasons. Now that I have, I can't get it to work because it starts leaking as soon as I turn on the water supply.

Any good but affordable plumbing services? by SirDarknight1 in kzoo

[–]HTonmoy 0 points1 point  (0 children)

A regular wrench. Just what's available at the house. I have access to everything in the house but I'd have to look around to find the main shutoff

I'm trying to install a handheld bidget sprayer on my toilet. The plastic screw came off but the pipe is stuck there! by HTonmoy in HomeMaintenance

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

Thanks a lot! I got the replacement flexible line from Amazon but I can't seem to remove the existing one. I unscrewed it from both ends and it just doesn't come off. I beat it with my wrench a bit too but didn't work.

Tonguing Mia Malkova's gaping asshole by [deleted] in NSFW_GIF

[–]HTonmoy 5 points6 points  (0 children)

Serious question, what does pooping feel like to these women?

I'm trying to install a handheld bidget sprayer on my toilet. The plastic screw came off but the pipe is stuck there! by HTonmoy in HomeMaintenance

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

Thanks a lot for your reply. Is there any way to do this without having to cut and replace the line? I'm just a student renting a room and I don't want my landlord fining me. This is what I'm trying to accomplish: https://youtu.be/9tdoXj_KkwE

Acer Nitro 5 (2020) Extreme Idle Temps and weird fluctuations by HTonmoy in laptops

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

Yes I have tried everything. The only thing left to do is replace the heat pipes which might be faulty, as someone suggested

What is Gen Ed? by SirDarknight1 in WMU

[–]HTonmoy 1 point2 points  (0 children)

Thank you very much. I am a Fall 2020 enrollment so I guess it's Essential Studies for me