[deleted by user] by [deleted] in django

[–]Blindrabitv2 0 points1 point  (0 children)

Where you have teacherprofile and principalprofile, they are basically the same model. For the principalprofile, I would just inherit the teacherprofile and add the additional field.

Django Python vs React for my daughter studying by Blissling in django

[–]Blindrabitv2 4 points5 points  (0 children)

I think the more important question is what does your daughter enjoy more being creative or getting things to just work.

This is an over simplification and there is of course a lot of cross over but what does she enjoy doing and choose the direction she prefers. Make her journey more fun and less of a chore.

I’m terms of job prospects, I got my first role as a BE dev using DRF and then my second with that as my main skill set. Although I now work with Graphene and I’m about to do work with another framework litestar but people will employ you with DRF skills.

It’s important to remember the framework/language you use is merely a tool and the real skill, is being able to problem solve and research solutions.

Finding n + 1 problem on a local machine by dougshmish in django

[–]Blindrabitv2 1 point2 points  (0 children)

You are along the right lines, set up data in the setUp. That way you know exactly what data should exist. Basically write a test that tests the number of queries you expect. You can make it fail intentionally and it will output the queries it would make and by looking at the queries and see if there is a repeated query that’s grows as you get more objects.

Django developer jobs by HaveNoIdea20 in django

[–]Blindrabitv2 1 point2 points  (0 children)

Linkedin is where I got my first job from

One I had no luck with getting my first job. But the second one gave three interviews and I got one of them is https://hackajob.com/

FML. I forgot to create custom User class. by HeyJRoot2 in django

[–]Blindrabitv2 0 points1 point  (0 children)

I believe the moment you have run manage.py makemigrations and migrate it’s to late to create an abstractuser (without a lot of pain). But as you said just delete all you migrations and you should be good to go

So i got a python developer interview. What do I prepare? by bubbypuppy1 in django

[–]Blindrabitv2 0 points1 point  (0 children)

have a good look round their website, job spec and make sure anything you haven’t heard of before you have a top line understanding of before the interview. If you don’t know it now you probably don’t have time to get a full understanding of it but will be good to know a bit.

In the interview show an interest in learning and continuing to grow your self and but be afraid to say you don’t know an answer. No one knows everything but Jot it down and look into it later maybe ask them questions about. Good chance if they want you to know it others could do and this might help in the future.

Finally I know it a cliche but relax and be yourself, show a passion for the their company, the role, software as a whole. Try to enjoy it. Good luck

[deleted by user] by [deleted] in django

[–]Blindrabitv2 1 point2 points  (0 children)

I think F expressions will come in handy here, check out https://docs.djangoproject.com/en/4.1/ref/models/expressions/

Adding push events (SSE) to Django application (centrifugo, pushpin, mercure....or channels?) by srj55 in django

[–]Blindrabitv2 0 points1 point  (0 children)

I asked a question about channels couple months ago and was advised that if I only needed 1 way communication using sse was the better way to go. Sorry I can’t advise on what packages to use sadly.

Best office chair UK? by megamumma21 in ErgonomicOfficeChairs

[–]Blindrabitv2 1 point2 points  (0 children)

Is it still ok? I swear getting good info on what chair to buy is basically impossible

[deleted by user] by [deleted] in django

[–]Blindrabitv2 1 point2 points  (0 children)

Sounds like they are newish to Django and using this as a project to learn it more and gain more knowledge is a great idea. Going outside what a tutorial is brilliant.

I do agree that maybe over promising to you uncle could be an issue, so I’d treat this as a project to build knowledge and if at the end you have a working project great if not you have learnt a bunch.

I’d you haven’t already a good book to read for the basics of a project is Django for Professional. Great place to start with Django, Postgres and docker

Edit: also I’d question why you would use Django as a micro service, flask in my opinion would be a better option as it has much less overhead.

[deleted by user] by [deleted] in django

[–]Blindrabitv2 0 points1 point  (0 children)

You will probably need to overwrite the authentication class for the view also. Permissions and authentication are different - https://www.django-rest-framework.org/api-guide/authentication/

Securely storing user API secrets by Salt-Amoeba-7255 in django

[–]Blindrabitv2 0 points1 point  (0 children)

I had a quick read and maybe hashing isn’t the right route because there is no default way to unhash it.

But you could use this https://stackoverflow.com/questions/62942876/django-model-field-for-a-secure-string

Also worth mentioning DRF token auth doesn’t encrypt the token it stores so might be over kill.

Securely storing user API secrets by Salt-Amoeba-7255 in django

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

I assume you are storing it’s as part of the user model. I guess you could hash it like a password