Nilou
Hi guys, i have a Modalform for registration in index.html page
but i don't know how should i set urls.py and views.py for it
how should i put template name in views.py,a modalform as a part of index.html?
and how should i route it in urls?
path(' ', index, name='index'),
path(' ', register, name='register'),
Dami_codr
Nilou
thx a lot, if i couldn't do it i would give you MSG 🙈🙏
Dami_codr
Bekzod
Hello everyone, I need your help. Now I have a sqlite database. With the information in it, I can't link this database to my django project without using ORM.
Ivan
Why?
Doragonsureiyā
Why?
What are you talking about?
Ivan
I’m asking why Bezkort can’t link his database, what’s wrong with it
Bekzod
Why?
I have a fully prepared database. I need to create a project using this information.
AFK
Can anyone explain me in a better way about META class inside models.
Also about why we use and when and when not to.
I have used it many projects but still confused
Sachin
Anmol
I want to learn django from the scratch, purchasing course from codewithmosh.com would be great choice or not?
Sachin
Anmol
can you suggest one?
Sachin
And Google for a 'portfolio django app' ... It will take you to a blog which really explains how to start with django with examples
Sachin
https://www.udemy.com/share/101Wis3@n08nK_IVEZnPiv3KerUr9BI-zyL2UOh1cgXvfIs9oA41UXJNXHfASOW2MhAx8t11/
Bassi
Anmol
Okay.
Ivan
I suspect that just reading Django documentation could be too hard for newcomers. Despite the fact that Django documentation is much better that many other technologies docs
Jerome
there are tons of docs made by enthusiasts all over the place... thx to Python & Django communities
AFK
Doragonsureiyā
Anyone on this?
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work.
Have a nice day 😊
Anmol
Aziz
Hello, I am uploading a portfolio site. What happens if a customer sends me little information in an email and a comment and it is automatically sent to my email? Please help
bikrant
Hi guys is there any way to access dictionary object in django templates. Not using a for loop
Ex-
In views.py
map[object.id] = value
In templates
{{Map.object.id}} this doesn't work
bikrant
Any ideas how to get the map values?
マクスイム • グセブ
Create a folder templatetags in the root, add __init__.py there
from django import template
register = template.Library()
@register.filter(name='lookup')
def lookup(value, arg):
    return value[arg]
マクスイム • グセブ
Then you can include this filter and use it with
{{ map|lookup:id }}
Anonymous
Please help me when should i use def__str(self) . Do i need to use it on only strings or even other fields have to declare them
Anonymous
Ts confusing me why is it declared on only one parameter among others
Stephen
The idea of multi tenants or saas application in Django is never clear to me. I Wish I can find a book I can buy or a course on this subject... Anyone?
♈
Fan / Ac
can i join number of tables using a single query using django ORM
5 tables A B C D E
A related to B B related to C C related to D D related to E i need to get connection btw table A and E
Wasim Ansari
I have started learning Django REST Framework, from documentation. Please suggest some Projects for begining
Anonymous
Did you buy the course in site or YouTube videos
Is it worth to buy a course from him?
Anonymous
Some of you here bought the course can answer here.
マクスイム • グセブ
マクスイム • グセブ
Oh, now I think that select_related actually is the best option, as well as your tables are connected by FK-relationships
Fan / Ac
マクスイム • グセブ
Yes, you can select several relationships with double-underscore syntax as well
マクスイム • グセブ
And select_related itself supports several fields to select, so it perfectly matches your request
Ranken
My Django authenticate method returns None.......
After user registration in template
Ranken
Can anyone help
Ranken
Please??? 🥺
Doragonsureiyā
Please??? 🥺
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
#me {display: none;}
guys, hello, could you help me, how can i get element by index from ArrayAgg by lookup in django ORM?
Ali
Maxim
Doragonsureiyā
Dude, mine returns nothing.. Be hopeful.
All functions return something. If they don't explicitly return something, they return a None object.
Examples of functions that return None: print, list.append, dict.update
Ranken
What I'm doing:
I'm trying to login a user and redirect the user to his dashboard ......
But when I do a python print it returns "None"
I'm expecting a redirect after login or registration to the dashboard area.....
I'm using Django
I'm running the app on cpanel
Using python 3.8.6
Ali
None is the same as nothing
I meant for the templates. Whenever I hop into the endpoints, templates are empty and nothing is there. :(
Ali
Ranken
Ranken
It worked on my local machine before I did an ftp to cpanel
cj
Ali
Yes exactly
So, set the redirect endpoint in your settings.py. What do you print? Where do you print?
Ali
Ali
In most cases, users use fake information in order to authenticate and do the stuff. This step will prevent from that.
Ali
Ranken
But the major problem is that when I try to login it keeps redirecting back to the login template
Ranken
Ali
Ranken
Ali
This is mandatory?
It is. That shows where should Django redirect the user after signin/signup.
Ranken
Ranken
cj
Ranken