Cheap
in my .html page code ?
yes, wherever you include js, or css add , type=“text/css” for css and type=“text/javascript” for js
Boris
yes, wherever you include js, or css add , type=“text/css” for css and type=“text/javascript” for js
i add type but doesn't work with error The resource from “http://127.0.0.1:8080/static/css/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Cheap
i add type but doesn't work with error The resource from “http://127.0.0.1:8080/static/css/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
the error says blocked due to MIME type(“text/html”) so did you also included type tag with {% static css/style.css %} ? can you paste your html template so i can try to find error
Cheap
Bro Let me know what is the error
i don’t have error, check few messages above
Boris
Thank's a lot guys i decided my question with reinstall and reconfigure all files and packages
Anonymous
I am trying to make student register form where student selects the Department from dropdown list then In next dropdown of year only those year have to be shown those are registered in that department. But It is showing all the years in the table weather it is of any other department.
ändrew
you will probably need js for that
Anonymous
Hi... I'm trying to save data to mysql db which is of this sort : name, number, study, [{id:,activityname: , day: },{...},... How many ever checked ].. The dictionary here is a row with checkbox in front end, if the row is checked, all the values in the front end has to be stored in db along with other text values like name, number etc., can you suggest me the best way to implement this kind of model
Xavier
Hi... I'm trying to save data to mysql db which is of this sort : name, number, study, [{id:,activityname: , day: },{...},... How many ever checked ].. The dictionary here is a row with checkbox in front end, if the row is checked, all the values in the front end has to be stored in db along with other text values like name, number etc., can you suggest me the best way to implement this kind of model
depends on how the dictionary is generated, if it's generated at the site call then u can just pass it and use the db.save() while processing the values (either using form model or manually) effectively but if it's generated before the site call then it's better to use 2 dictionary and check for the check box in the backend and store it (either use a form model or do it manually)
Anonymous
Okay... I got stuck while creating this specific item in my project... So by using dictionary, I can later display all these values in another page?
Anonymous
I have never used dictionary field in a model... So not sure if this works
Xavier
Okay... I got stuck while creating this specific item in my project... So by using dictionary, I can later display all these values in another page?
yea check the poll app part 3 example in the official Django site sorry, u have to process the dictionary to display it on frontend using jinja2
Anonymous
Hi! Someone asked where to order ChatBots for Telegram. The guys did it to me. The result is awesome. Who needs contacts I will answer in messages. So that there is no spam
Anonymous
Okay.. Can you also suggest what would be the best approach to implement this other than dictionary then?
Xavier
if u dont mind what data u trying to store in the dictionary ?
Anonymous
Table data... Each table row will have a checkbox, there were 7 rows in total.. If checkbox is checked - it has to be stored in db... Along with this table data, it will also have user name field (chartype) , phone number field(chartype)
Anonymous
So a row in db should finally contain - name, number, all checked rows ( each checked row has activityname, day, rowid)
Xavier
So a row in db should finally contain - name, number, all checked rows ( each checked row has activityname, day, rowid)
aahh use different table for checkbox with feild boolean, day, id and link them using foreign key
Anonymous
But I couldn't find a way to store or update data to a model which contains foreignkey 😔😔
Anonymous
So I tried to avoid using foreign key until now...
Xavier
But I couldn't find a way to store or update data to a model which contains foreignkey 😔😔
oooh for this look into poll app example 2 from official Django site it explains the foreign key concept very clearly
Anonymous
Okayy
Xavier
Anonymous
Sure sure... Googling it now...
Anonymous
Thanks so much for the help...
Xavier
yep
Sarthak
How to check if there is an entry in the foreign key field of a row of database where the model defines that foreign key may be null I have tried exists(), without exists, is None, == null ....
Shubham
Urgent Requirements Any AngularJS or Django Developers interested people DM
iamaseem
is there any way to generate certificate automatically using django???
Anonymous
Hi everyone
Anonymous
what does git do
iamaseem
what does git do
version management
Anonymous
can you give me a card please
Anonymous
what does djangoda do
krishna
Hii. Is there any way to call a function only once when you start the project?? Need help...
Anonymous
Ash: Why in django form I have created a button and it type is not submit Then why it will submit the form content automatically
Shreehari
hey guys how can i test the performance of an django rest api in postman ? If this topic doesnt relate to this group, let me know. will delete it.
Mirco
The FK field is None if there's no reference
Sarthak
but is None doesn't work because..
Sarthak
😊
Mirco
I don't know your code so the answer is not straightforward
Sarthak
And I don't want to show you my code😳
Sarthak
I expose my wrongdoings
Mirco
Without the code is not easy to help u
Sarthak
if up_.my_college_match_id.exists():
Mirco
Or at least the snippet
Mirco
I told u the check is with None or not
Mirco
Exists works on an entire instance
Sarthak
tried
Mirco
Not on a fk field
Sarthak
can you gve example what should I write
Sarthak
ill try it
Mirco
As I told you yesterday change the variable name to be pythonic
Mirco
And then you can do if user_profile.my_college_match:
Sarthak
id is what django attaches in DB
Sarthak
should I add it or not
Sarthak
my variable is named my_college_match in model
Sarthak
Can I DM you once!
Sarthak
Can I add a not before it
Mirco
It depends of what you wanna do
Sarthak
so it is syntactically right?
Mirco
Obviously
Sarthak
yeah cool
Anonymous
Obviously
Ash: Why in django form I have created a button and it type is not submit Then why it will submit the form content automatically
Sarthak
Leave Micro to me ... this has happened before