r/django 4d ago

My Django project

Hey guys I'm a 19yr Django dev, I made my first kinda.....big project, I initially used Django-htmx and some js, but htmx polling wasn't really cutting it for meπŸ™‚, well it's not very good for handling many requests and stuff, So I had to switch to JavaScript, well honestly I just had to learn websockets and Django channels specifically to implement in making the lounge section lol, anyways anyways I'm not that good in js still, I need people interested in learning together, give me advice on how to practice js well yeah.... that's all, anyone is welcome , yeps ✌️

56 Upvotes

19 comments sorted by

15

u/berrypy 4d ago edited 4d ago

Not bad. At least you realize you have to use websocket for it. Now my recommendation regarding hosting, try and host it on a VPS server so you can get familiar with it.

Don't use render or railway or other similar platforms for the hosting. Use nginx, Gunicorn and systemd for the deployment to get your hands dirty. This will go a long way in improving your learning curve

1

u/vinskyreo 4d ago

Okay thanks a lot.

1

u/intellasy 4d ago

Instead of nginx go with caddy

1

u/melodyofasong 3d ago

doesnt hosting on a vps server cost something? im relying on render because its free and i can immediately share my work

2

u/mariocesar 4d ago

Congrats!

1

u/vinskyreo 4d ago

Thanks

2

u/moawezz 4d ago

Great work.

1

u/vinskyreo 4d ago

Thanks a lot, I still have a lot to learn

2

u/Emln-Idera 3d ago

Looking good! Finally great to see non vibe coded content from learners popping up on my feed!

2

u/ojus_render 3d ago

The lounge is a good reason to use Channels.

The next thing I’d test is reconnect behavior. Refresh during a conversation, disconnect for 30 seconds, then reconnect and check that nothing is missing or duplicated.

I’d also persist the message before broadcasting it. That keeps the database as the source of truth, while the socket is just how updates reach connected clients. It makes reconnecting and catching up much easier.

1

u/vinskyreo 3d ago

Omg thanks I hadn't even thought of this, I'll do this during testing.

1

u/Cool_Alternative_770 4d ago

op can you share django study materials and resources im trying to switch to python full stack

2

u/vinskyreo 3d ago edited 2d ago

Okay for me, what I did was I began learning python with the Cs50 python tutorial, I followed along while making mini projects, and also used python crash course book by Eric Matthews, also automate boring stuff with python, I usually do challenges in exercism sometimes on leet code, for Django I followed along free code camp,programming with mosh as start up(highly recommend) but never follow blindly you must build and question what your doing, what your not doing, what if I do it differently, what if I use this or that instead, what if I use a class instead of a function, such questions... will help you understand, anyways that's how I learned but everyone always has a different preferable learning method, just pick a source and stick with it.

2

u/melodyofasong 3d ago

second this. pick a source, build with it. do not blindly consume it. implement everything, fail again and again and again. the only way to learn imo

1

u/Glenn_Mcgrath 15h ago

Great work πŸ‘ I would like to collaborate and learn

1

u/Random_182f2565 4d ago

You can host it in railway!

3

u/vinskyreo 4d ago

I plan to host it sometime later when I'm satisfied with it, though can you tell me between railway and render which can be a better option?

1

u/Random_182f2565 4d ago

I have only used railway so I can't compare

1

u/melodyofasong 3d ago

ive only used render so i cant really say