Charly
Yes
How did you finish it then? Do you already know python? Which part sounds especially difficult?
Denis
How did you finish it then? Do you already know python? Which part sounds especially difficult?
I know python very well. And I finished it with difficulty, but I still don't understand how to create my own website
Charly
Did you just read it without following it?
Charly
Do you know html and css already?
Charly
I did it
So you should have ended with a polls website you can create your site in the same way
Denis
Why not?
I don't know, I just can't create it, I tried and it didn't work, I don't have enough knowledge
Sankalp
I hate YouTube
So read article
Charly
I don't know, I just can't create it, I tried and it didn't work, I don't have enough knowledge
What if you follow the same steps in the tutorial but with the name of your models and your business rules?
Denis
What if you follow the same steps in the tutorial but with the name of your models and your business rules?
I did it this way. I took the user data from the forms, updated it in the DB and brought it back, but you can't build a site on this alone, and I don't know anything else. I can't do authorization, for example.
Charly
It may sounds crazy but most sites are just cruds where you update data via forms.
Denis
And have you read the authorization part?
I'm doing this now, I found the right topic in the documentation. Maybe this is how you need to learn, just look for what you need in the documentation and practice...
Denis
Okay guys, I relaxed and now I feel better to continue studying
Dennis
Good night, sorry for the late message. I need your advice. I deployed a site to production (Django + Nginx + Docker). Everything works fine for a couple of days, but then, when trying to log out, I get a 500 error with no error message. Logging format: 'format': '{levelname} {asctime} [{name}] {process:d} {thread:d} {message} {exc_info}' Error output: ERROR 2025-02-22 21:59:04 [django.request] 43 139725365599032 Internal Server Error: /authorization/logout None Logout view code: def main(request): user = request.user logout(request) logger.info(f"User {user} was logged out❌") return redirect("/authorization") After restarting, everything works fine again. I can't figure out what's causing the issue—maybe the cache is overflowing...
Dennis
Enable debugging.
there is no such error with debug = True
🐾S
How can i make admin and customers have different tables
Pablo
How can i make admin and customers have different tables
Different database tables? Create separate model classes for each of them
Pablo
I need them to be able to login and logout
Create a custom user class and you can implement a role based system. Your custom user class can have a Boolean field to help store weather a user is an admin or a customer. True for admin, false for customer or something of the sort
854281
Hi, Does anyone have installed inventree django without frontend?
Doragonsureiyā
Hi, Does anyone have installed inventree django without frontend?
Please don't ask meta questions like: - Any user of $x here? - Anyone used technology $y? - Hello, I need help on $z! Just ask about your problem directly! If you don't know what to ask, please read: http://catb.org/~esr/faqs/smart-questions.html
Хумоюн🐾
<link ref="stylesheet" href="{% static 'css/base.css' %}"> {% static %} inside href is not highlighted correctly and most likely does not work.
Хумоюн🐾
i am using vscode
Doragonsureiyā
Download the jinja extension
Why? Seriously... why?
Pablo
Why? Seriously... why?
For Syntax highlighting
Charly
For Syntax highlighting
Why jinja when django has its own syntax
Pablo
Why jinja when django has its own syntax
Jinja template language on the front end with Django. Usually it doesn’t have syntax highlighting and it just looks like white text, but with syntax highlighting, it’s coloured
Maxim
For Syntax highlighting
Django's templates are similar to Jinja's but Django's templates are not Jinja's templates
Pablo
No I mean, he shoudl install django syntax for templates not jinja, jinja is another library
I assumed his question was how to add syntax highlighting to the jinja code in the html
Charly
I assumed his question was how to add syntax highlighting to the jinja code in the html
But why jinja? Why you assumed jinja when django does not uses jinja by default?
Pablo
But why jinja? Why you assumed jinja when django does not uses jinja by default?
Downloading the extension will add syntax highlighting to any jinja code or Django template code, from my experience
Charly
Downloading the extension will add syntax highlighting to any jinja code or Django template code, from my experience
But do you understand that django doesn't uses jinja and it is better to use the proper syntax even if these are similar?
Charly
thus recommending jinja instead of django own syntax is wrong
Kanhaiya Lal
Django follows the MVT (Model-View-Template) architecture, where the template is responsible for rendering dynamic HTML using Django's own template language by default, not Jinja2. While Django doesn't require front-end frameworks like React or Angular, they can be used alongside Django to create more interactive applications, with Django handling the backend logic.
cj
Django follows the MVT (Model-View-Template) architecture, where the template is responsible for rendering dynamic HTML using Django's own template language by default, not Jinja2. While Django doesn't require front-end frameworks like React or Angular, they can be used alongside Django to create more interactive applications, with Django handling the backend logic.
no, Django doesn't follow MVT, it actually has it own "architecture", please go read its official documentation to know more about that and why you shouldn't say it "follows MVT (or any other thing)"
cj
Seems LLM text ¯\_(ツ)_/¯
looks like it is.... and I'm lazy to warn, you can do the honors
vinho
Hello everyone. Any one who can refer or help one to understand the difference of calss based views and function based views and if you can use them at the same time
Dennis
Hello What's your timing zOne?
utc, the server is running on the amazon ec2. i also noticed that logout endpoint works if i will spam with updating the page, but only for a few minutes
Dennis
Sounds good Just for a few min😁
idk absolutely, it is so random, there is literally nothing in logs changed log format to this: 'format': '{levelname} {asctime} [{name}] {process:d} {thread:d} {pathname}:{lineno} in {funcName} - {message} {exc_info}',
Charly
Hello everyone. Any one who can refer or help one to understand the difference of calss based views and function based views and if you can use them at the same time
https://www.geeksforgeeks.org/class-based-vs-function-based-views-which-one-is-better-to-use-in-django/ Yes, you can use both types of classes on your project.
Vishnuraj C
How much knowledge should I need in django to get a job
Cc
Hello everyone. Any one who can refer or help one to understand the difference of calss based views and function based views and if you can use them at the same time
You can use them at the same time, I personally use function-based views to redirect to a template or small tasks and I use class-based views to associate them to a model that requires permissions, handle get and post and other actions. You can actually use both options for the same thing but I think that with classes the code looks more organized.
Charly
How much knowledge should I need in django to get a job
Enough to fill the position requeriments
Electro
Can anyone suggest good course on YouTube for django ?
Eric
How much knowledge should I need in django to get a job
Filters, Paging, Templates, the ORM, Class based views, Multiple ways to do authentication, a LOT of experience with celery and celery beat. An intuitive understanding of the HTTP request/response cycle, Experience deploying multiple apps to production and handling things like collectstatic, Experience building at least one DRF API,
Harsh
Hey can someone help me with interfacing Arduino and rfid with my django application
Doragonsureiyā
Hey can someone help me with interfacing Arduino and rfid with my django application
Please don't ask meta questions like: - Any user of $x here? - Anyone used technology $y? - Hello, I need help on $z! Just ask about your problem directly! If you don't know what to ask, please read: http://catb.org/~esr/faqs/smart-questions.html
Doragonsureiyā
Pablo
Can anyone suggest good course on YouTube for django ?
Here are a few which are great: - Learn how to build a full auth system: https://youtu.be/_9K0MTBOKNs?si=O3UcAJBb9xkizyYH - Learn how to build a real-time chat application with django channels and sockets: https://www.youtube.com/watch?v=U_p1B3rNobo - learn how to deploy a django project to render: https://www.youtube.com/watch?v=qbDi-v2NZgo&t=1631s
Harsh
No one can help you until you explain your difficulties.
I am using py serial for Arduino interfacing and I just want to read all the data inside the rfid and store it in models that's all
ROG 💻
Does Django allow caching of queries made to the same model by multiple concurrent users?
Denis
Guys, I'm working on my website now. But I notice that 90% of my time is spent on html css, this is no longer a backend but some kind of frontend. In short, I'm not interested in this, is it possible to somehow become a backend developer without a frontend?
Denis
Sure, if you're searching for something in Python start studying FastAPI
I like Django, I've been studying it for a month now and I don't want to change
Egor
But FastAPI is better regarding performance. It's a 100% guarantee
Denis
anyway you can't make a site without frontend
I know, but 90% of the time I do frontend, I hate it and I'm not good at it
Denis
You can try Django Rest
I know, but will that be enough? I think the employer will look at me and see that I don't have my own full-fledged website and won't even look at me.
Даниил
I know, but will that be enough? I think the employer will look at me and see that I don't have my own full-fledged website and won't even look at me.
Usually vacancies having in their requirements “Django”, also require DRF They go together as a rule That’s why if you specialize on django, you also need to have some skills in drf
Egor
I know, but will that be enough? I think the employer will look at me and see that I don't have my own full-fledged website and won't even look at me.
TBH, I believe building a website from scratch, including SEO and contextual ads, is more important than simply having a website. Good reviews on your page are also important. This is especially true when seeking freelance clients.