Ajit
Did you run this command in outer project folder?
Nope, I am running it in the same location as that of my entire project. It's just a kinda hello world project, But, not able to access output in the Browser.
Ajit
But no output.. I feel like there must be a problem with 127.0.0.1:8000 But, I tried everything like, tried running it using runserver 5555, runserver localhost:8000 Even I changed ALLOW-HOST =[*]; in the settings.py file.. Still it's not working in browser.
rtg
Yes this id will be a initial value (so you don't have to select the installation)
rtg
Are you creating image installation and you want to pass id while creating?
What do you think about that? https://pastebin.com/mJeM2e6s
игорь/igor
What do you think about that? https://pastebin.com/mJeM2e6s
Sorry, I am busy right now, can't understand what you are trying to do. As far as I understand, you want to pass installation ID to your image creation form, and they are related, right? And you provide the installation ID as an url parameter, don't you.
rtg
What do you propose?
JavinP
I have a question about a mobile app secured using OAUth2 that uses a REST API built using Django. Here is my flow: 1. The app tries to access a protected endpoint of the REST API and the API server responds with Unauthorized 401. 2. Upon receiving 401, the app asks the user to login using Social logic (google). 3. The app logs into google and gets Access Code from google and then goes to the REST API's "login" endpoint with that access code. 4. The API server contacts Auth Server (i.e. google) and exchanges the Access Code for Access Token. Now the Rest API server knows that this is a verified user. Question: Now what happens to the access token? Should this access token be sent back to the app so that the app can send it with the same request that it made in step 1? How does the stateless Rest API server determine that the request is from an authorized or unauthorized user after the user logs in using social login? Please help.
JavinP
If anyone seriously knows how this thing should work, please dm me. I am willing to pay you for your time for explaining it to me.
.. ...
Hey anyone tell any django project Also made easily for resume
Ajit
did you install django earlier?
Nope.. I m installing Django along with. I have installed it though cmd, using virtual Environment only
игорь/igor
What do you propose?
Get url params in your view with self.args self.kwargs and then pass them to form. Form init method needs to be overridden to accept that param
.. ...
Instagram clone
Easy or not?
rtg
Instagram clone
An example please?
игорь/igor
Easy or not?
'easy project' and 'resume' are unrelated terms. I wouldn't hire anyone able to make just easy stuff
игорь/igor
An example please?
Not right now, sorry.
игорь/igor
An example please?
There are tons of tutorials where people teach building projects with django. I can advise channels on YouTube like DennisIvy, just Django, tech with Tim, clever programmer(python), freecodecamp, Corey Shafer etc etc. They have either play lists or big videos dedicated to Django. You only need time and patience. If you don't have that quit programming, because it is damn hard and not for people seeking immediate results.
игорь/igor
And the last paragraph is to everyone not specifically you, @alderson123))
игорь/igor
Thanks!
Look up here: https://ccbv.co.uk/projects/Django/3.1/django.views.generic.edit/FormMixin/#get_form_kwargs And here https://stackoverflow.com/questions/32273135/how-to-override-form-field-in-createview I am not near my computer to really help you. I can only hint you right now
Michael the wolf 🐺
does 4000 items in select tag in django templates slows website down?
Anonymous
does 4000 items in select tag in django templates slows website down?
What kind of options do you have in the selection?
Michael the wolf 🐺
What kind of options do you have in the selection?
loading from database, like name fields
игорь/igor
does 4000 items in select tag in django templates slows website down?
The usability of that is really bad for sure. I can tell you that at least.
Sherlock
STATIC_URL = '/static/' hi, what's the use of this code ? why we write this in settings.py file?
Anonymous
loading from database, like name fields
Well I think you might have to reconsider your design.
Sherlock
STATIC_URL = '/static/' hi, what's the use of this code ? why we write this in settings.py file?
Anonymous
STATIC_URL = '/static/' hi, what's the use of this code ? why we write this in settings.py file?
It points Django to the directory for it to search for your static files in each app. You can name it anything but convention is a powerful thing
Sherlock
It points Django to the directory for it to search for your static files in each app. You can name it anything but convention is a powerful thing
STATIC_DIR = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = [ STATIC_DIR, ] hey @fishworm isn't above code serve the same purpose as u said how are these two different STATIC_DIR = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = [ STATIC_DIR, ] VS STATIC_URL = '/static/' 🙏🙏
Sherlock
Thnaks in advance as always @fishworm 🙏
Anonymous
STATIC_DIR = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = [ STATIC_DIR, ] hey @fishworm isn't above code serve the same purpose as u said how are these two different STATIC_DIR = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = [ STATIC_DIR, ] VS STATIC_URL = '/static/' 🙏🙏
STATIC_DIR will point from the root of your drive up to your project directory and whatever value you pass to it. Django will then look for your CSS, JavaScript files in that directory. The STATIC_URL will be used to serve the actual files in those directory.
Michael the wolf 🐺
The usability of that is really bad for sure. I can tell you that at least.
i am planning to make ajax call using on change event..its better
R_OU
Hi I wanted to make 2 models for the price of my products, the first model is the price of the product and the second model is the input of the first model, multiplied by 4, how can I do the same, thank you
Anonymous
😂
Maxim
it will be much better if, instead of the words "not working", the messages contain "causes an error such and such"
Alex
My condolences.Is there some error message or your just decided to inform us?
AV
Hi everyone! I have a problem with the PermissionRequiredMixin, the "permission_required" variable from this class matches with all of permissions from the request.user, but i still see "403 Frobidden", I don't understand, what there happens. Thanks in advance for your help and prompts!
Doragonsureiyā
Hi everyone! I have a problem with the PermissionRequiredMixin, the "permission_required" variable from this class matches with all of permissions from the request.user, but i still see "403 Frobidden", I don't understand, what there happens. Thanks in advance for your help and prompts!
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
James
hello anyone who can help me how to implement to dependent dropdown in django with ajax
Mirco
hello anyone who can help me how to implement to dependent dropdown in django with ajax
https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html
Mirco
!yw
Doragonsureiyā
You're welcome! 😊
James
!yw
i did it but it doesn't work
Mirco
i did it but it doesn't work
Study more how it works
James
Study more how it works
sorry can i share you my source code
Anonymous
Hello everyone I am Kamod Kumar from India I am looking for work startup https://saatirmind.com Skills: Php, laravel ,Luman,Codeigniter, yii2, vuejs,reactjs,NodeJS,MYSQL,mongodb, python django,Dot Net, CMS..etc Regards: WP: +919598132392 Skype and email: kamod7619@gmail.com
James
Use pastebin.org
how should i get your id?
Mirco
how should i get your id?
You don't have to get it
Mirco
Copy your code inside pastebin and share here the link
Фархуд
Does anyone has linux group?
Anonymous
Does anyone has linux group?
Wow that would be great .. if you may find let me know...I also need to be added
Doragonsureiyā
Rule number 6️⃣ - No contextless/referral/shortened links, no forwards, and no group links other than those shown here.
Doragonsureiyā
Does anyone has linux group?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Фархуд
!ot
I just wanted to know if any body hadany group I respect group rules
Фархуд
Guys which one is better to start django project Pycharm or vs?
Фархуд
It's the same
Are you sure i tried them both right now Pycharm is much much better specially the professional version
Mirco
Are you sure i tried them both right now Pycharm is much much better specially the professional version
Yes, it does not matter about how to start Obviously one is an IDE and the another one is an editor so it's different
Alex
Guys which one is better to start django project Pycharm or vs?
both are giant and well developed IDE for experienced developers. But for newbies it doesn't matter to use editor or ide, imho. You simply don't know how to use IDE and it's purpose.
HamidReza Fekri
hello I use mptt (treeforiegnkey) for my category but when I give url to see my product that related to that category i get this error
HamidReza Fekri
'Category' object is not subscriptable
Фархуд
i think he meant "visual studio". Not "vs code"
Thats the name vs 😅 which stands for visual studio
Anonymous
'Category' object is not subscriptable
You tried using the [] subscript operator on a model instance that does not define _getitem_.
StarLorD
https://www.instagram.com/tv/CS47k4QBay7/?utm_medium=copy_link