Jimmies San
.....
Jimmies San
read better .
Milan
But...there is no where mention of why we need to do this...it only show "manage django static files*"
In short, we have to do manage.py collectstatic to show our application on production or live state exactly same as in development state for visual and any kind of assets.
Jimmies San
but just read here https://docs.djangoproject.com/en/2.1/howto/static-files
Jimmies San
differences between serving static files on development or production
Jimmies San
I read...but cant able to understand
lightining talk - linked to right moment for a talk about static files on django in 3 minutes by funkybob - i really suggest it to you [and ther re-read docs :D ] https://youtu.be/eEZYDDaDeCs?t=1795
Anonymous
Thanks for sharing
Jimmies San
Thanksss dude..
you're welcome. sorry if i look inflexible but the documentation is the super power for a developer :) learn how to study docs and source code it's important :)
Chetan
Yes...i will read properly the dpcs next time...
In beginning, especially when someone is starting to learn how to code. Docs can get very tough to read and boring. It will come with time, docs are very important.
Vaibhav
In beginning, especially when someone is starting to learn how to code. Docs can get very tough to read and boring. It will come with time, docs are very important.
Yes Docs are tough enough if you are beginner...and i m one of them...therefore cant able to understand completely...
Vaibhav
I can totaly relate!
And i dont want to just do same like they teach in video...i want to understand things completely and their working and then only i want to go further.. and thanks for sharing your thoughts👍👍
Mahdi
Do u know any relicable for Pycharm pro to be as smart tab key automator as pycharm pro?
George
Hi, i am trying to make a dependent dropdown in django: This is a dropdown that reloads when first one is selected in a form. eg: Select a country, select the list of cities, I am following this tutorial: https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html The problem i have is that my dropdown doesn't generate properly instead of two dropdowns i got one and an input field.
ʚɞÇherry Łoveʚɞ
talk is cheap, show me the code :D.
George
talk is cheap, show me the code :D.
first the form.py https://pastebin.com/a3vw94ji
George
ʚɞÇherry Łoveʚɞ
Thank you in advance
better in your case, i just orveride get_context_data function in your form then get plant parameter by self.request.GET.get method. then generate date by the plant which given.
ʚɞÇherry Łoveʚɞ
i means get_context_data in your API . :D
George
eh
ʚɞÇherry Łoveʚɞ
not too complicated.
ʚɞÇherry Łoveʚɞ
wait a minute.
ʚɞÇherry Łoveʚɞ
show me your API views.
ʚɞÇherry Łoveʚɞ
is that function base view or class base view ?
George
https://pastebin.com/uuFeVmCp
ʚɞÇherry Łoveʚɞ
class
no. i see that function base.
George
ʚɞÇherry Łoveʚɞ
i want to know which views in this picture is.
ʚɞÇherry Łoveʚɞ
ok let me make an simple example.
George
the thing is i don't have a clue of why does it loads like a selector and input field
George
i load the form from context
George
i load the form from context
<form method="post" id="datacolForm" load-datacols-url="{% url 'load_datacols' %}" novalidate> {% csrf_token %} <table> {{ form }} </table> </form>
George
and im stuck also
George
i found an answer https://stackoverflow.com/questions/13094320/how-can-i-override-the-type-attribute-of-a-modelform-in-django
George
this is the right way, the thing is django has a default for each type on foms and date type has an input for dates, if i wan't a dropdown out of this i may have to override it with python-html5
Meera
i am stuck at installin pgadmin 4 in mac book
Meera
it dosent installing
Milan
i am stuck at installin pgadmin 4 in mac book
Try this... https://github.com/milankathiriya/MyNotes/blob/master/PostgreSQL.md
Combot
Roberto (0) has increased reputation of Milan Kathiriya (2)
Milan
Yes, but you can do same with brew instead.
Milan
i am stuck at installin pgadmin 4 in mac book
To direct download visit https://www.pgadmin.org/download/pgadmin-4-macos/ Or you can watch YouTube solution for that
Meera
i downloaded it but its not getting installed
Adonis
Hi mates !!!
Anonymous
Hi Adonis
Mirco
Hi @adonis97 😀
Adonis
Hope you are doing good !!!
Adonis
Am using Django from Cameroon 😀😀😀
Adonis
Does anyone know how to perform a http redirection from a middleware ?
Jimmies San
i mean, for example, if from http to https: you can do it in a clean way without big effort
Adonis
Nope
Adonis
Like check the requested contain and redirect to another url depending on a condition we could define
Jimmies San
Like check the requested contain and redirect to another url depending on a condition we could define
you can write a class that inherit from object and then creare a process_request to change the behaviour of response or you can override httpresponse directly
Jimmies San
look here https://www.agiliq.com/blog/2015/07/understanding-django-middlewares/
Leonardo
guys i'm trying ping on my ec2 with django app running, but i'm getting timed out, what can be?
Leonardo
i'm following that tutorial: https://medium.com/@srijan.pydev_21998/complete-guide-to-deploy-django-applications-on-aws-ubuntu-16-04-instance-with-uwsgi-and-nginx-b9929da7b716
Leonardo
I'm stuck at 5 part of Setup your Django App on AWS instance
R
I'm stuck at 5 part of Setup your Django App on AWS instance
You need to create security groups to allow traffic on your desired port https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
Kraden marley
Algun tutorial para hacer un crud en django?
R
already have one
Yes, but example runs server on 8000, not sure if you are using the exact command, anyways, he's just doing that point to test it works and I'd personally just test on localhost and keep going with configuration
Leonardo
"Visit your domain and verify your running project"
Leonardo
is running as well through console, but the request is not working
R
"Visit your domain and verify your running project"
Yes, but this does not have much sense as you are just running django bultin test server so at leasr I would not test/expose it publicly yet as you still need to configure uswgi and nginx and then test it, thats why I say you can test in on localhost to see no errors are raised and keep going with prod environment configuration
Mahdi
Hi friends I want to build a registration form in order to a user upload its profile picture and other typical information. Can u help me?
Adonis
yeah sure