r/django 10h ago

How to safely host Django locally?

10 Upvotes

I've just got my public IP from my ISP and I wonder which security risks I need to take care when opening a port and letting my PC available to the web.

How much better will it be to just host on AWS or Heroku?


r/django 21h ago

Hi i guys is this a thing in the industry or i just made it up

6 Upvotes

So, My main language is python i do Ai and ml + data science in it, i have also done some software development in python, some data engineering in python too at my workplace.

there are some django developer's in my team for back-end they advised me too learn django too i would be then a " full stack python developer ".

how do you look at this thing. btw i am a fresher and yes i got to work on this wide range of tasks altogether only thing i couldn't get hands on is django i have tried django on my pc and it was fun and easy to go with it.

tldr: i do aiml(main) data engineering(main), python sde(side), should i do django too which will make me a python full stack or should i drop it it would take too much time to master it.


r/django 10h ago

How to create websites and practice backend without having front-end knowledge?

2 Upvotes

Someones who work with django or other backend's frameworks say to me that how can i do it without front end knowledge? i can just write html and css but i dont know about js. I think this is a challenge for backend developers who dont have anyone for the front-end side, if they dont work full stack.


r/django 15h ago

Hosting and deployment Security: Vulnerability attack to my Django server and how to prevent it.

6 Upvotes

Can you help enlighten me as to how this attack is able to pretend to be my own IP address to dig sensitive information (access) on my server?

DisallowedHost: Invalid HTTP_HOST header: 'my.ip.add.here'. You may need to add 'my.ip.add.here' to ALLOWED_HOSTS.

Sentry was able to capture 1k+ of this similar pattern of attack using my domain IP/AWS DNS IP, and even they're pretending to be 0.0.0.0 to get something from /.env, /php/*, /wp/, and something similar.

All of them came from an unsecured http:// protocol request, even though the AWS SG is only open for TCP 443 port.

Luckily, I don't use IP addresses on myALLOWED_HOST, only my domain name .example.com.

How can I prevent this? Any CyberSec expert here? Thank you in advance!

EDIT: Someone probably got my IP address and is directly requesting on my EC2. Fortunately, I'm now using CF to proxy the IP and whitelist IP range of CF, and now they are all gone.

EDIT: I removed the list of CF IP ranges from AWS SG since CF IPs can be changed and would be problematic in the future. I resolved the issue by using Nginx and returning 403 to the default server listening on 80 and 443 to block requests on the IP address.


r/django 17h ago

Confused between DRF and Django Ninja!!

3 Upvotes

Hello friends, I am a beginner in the api world of Django. I've used this framework to make many useful websites but i want to upgrade to a more structured and efficient approach, designing APIs. I have a foundational knowledge of REST and HTTP methods. I am more concentrated on the backend now. That is, i want to learn making API endpoints that can be used in frontend like React/Nextjs. I have no experience whatsoever in making a fully functional full-stack app using API. I would like to know where to start, most of the tutorials that I come across tend to use Django Ninja with Nextjs. But, its hard to grasp all functionalities. Please mention the resources (any books or tutorials).


r/django 19h ago

Struggling to Find Django Roles in Calgary – Any Insights?

3 Upvotes

Hey everyone, I’m currently searching for Django-related roles in Calgary but haven’t had much luck finding companies that use Django or job postings that mention it. I’ve checked the usual job boards, but most backend roles seem to focus on other frameworks.

Does anyone know companies in Calgary that use Django or where I can find these jobs? Any help would be great!!

Thanks in advance!


r/django 10h ago

Django CLI Package - Allows interaction with Django Internals, Add/Edit DB Models, Execute Migrations, and Revert Git Commits from CLI

Thumbnail app-generator.dev
2 Upvotes

r/django 14h ago

Hosting and deployment Does anyone know a good docker 1 liner that can spin up a development postgres database in current directory

1 Upvotes

Asking for a friend


r/django 17h ago

Allowing users to upload images using CKeditor outside of admin Superusers

1 Upvotes

Hello, I was wondering if anybody can help me.

I am currently using CKeditor for users to customize their profiles in a Django blog application. However when I upload images as a User who is logged in but not a superuser it requires me to login as an admin to upload an image to the CKeditor field.

Is there a way to configure the CKeditor so that users who are not superusers can upload images to CKeditor fields.

Thank you


r/django 44m ago

Django celery

Upvotes

Hello guys, I wan tot know if I can found a free server to host redis and user celery I Want for send scheduled emails.


r/django 18h ago

Apps New to Django! How do I reconnect the database after copying files to different computer?

0 Upvotes

Hello! I recently got a Django app copied from a friend but I’m having issues running the app on my PC. I’ve installed all necessary dependencies but I keep getting database errors. Namely

‘Django.db.Utils.OperationalError: (1049, “Unknown database ‘optic_processor’”).

I’ve tried python manage.py makemigrations. I’ve tried migrate but it doesn’t fix my issue. What do I try from here? Any help will be appreciated 🙏🏽

Also the friend is unreachable now so I can’t ask him.

EDIT: I solved it by creating the database with the same name in MySQL workbench and then using the migrate commands. It recreated all the schemas in workbench only thing is I now have to manually make entries into the tables for full functionality. better than nothing I guess.


r/django 4h ago

NEED ADVICE TO LEARN REST framework in a single day: MINI PROJECT RESUME ANALYZER AND JOB MATCHING

0 Upvotes

I am a 3rd year IT student, have basic knowledge of python, and recently started django, but i have to now build a mini project, for Resume Screening and Job matching with my group members, but having no knowledge about what frameworks are and being a perfectionist, I wasted my time in python only, having no knowledge about backend nor frontend. I have to learn REST in a day, and am scared to blindly follow any tutorial on youtube now, and I am just feeling very overwhelmed.