cj
How to import CSS. If I don't want to use static
you really want to use statics, that's how it works in real life
Rohan
A bad idea would be copying your css to your html and pasta it inside style tags.
Rohan
But why'd you not use static files?
Krunal
I am learning and I don't know which option is best
Rohan
https://docs.djangoproject.com/en/2.1/howto/static-files/
Rohan
Wait
Rohan
Not 1.9
Rohan
Yep, 2.1
Rohan
Help yourself :)
Krunal
I try to paste CSS on HTML but some images are still not working so now I understand static is best
Rohan
👍
Krunal
👍
Anonymous
poorae
Lapanit โ˜ƒ๏ธ
English
Anonymous
Nevermind
Maz
I try to paste CSS on HTML but some images are still not working so now I understand static is best
If you don't want to use local CSS, how about using the CDN of a css library. Like BootStrap4.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I need to make a form that takes values from a model. Lets say the model object is "age" and the input would be "30", then i want to be able to dynamically add another pair like "name" and "my name", when i submit i want to make and save a json in a second model. Is this possible with Django alone or do I need JS, and if I need JS would you use pure JS or a framework, and lastly, what framework ?
Mirco
For showing fields dynamically on frontend , u need a bit of js Vue or React imho
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
You can save your json in a JSONField
Yes, that's the easy part 👍
Mirco
Yes, that's the easy part 👍
Yep, but with React or Vue even the dynamic display isn't so hard
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I guess not, but I am a real js noob. What would you recommend starting with (except basic js). I usually go for functionality before beauty and have no plans building entire front ends in js
Mirco
I guess not, but I am a real js noob. What would you recommend starting with (except basic js). I usually go for functionality before beauty and have no plans building entire front ends in js
Mmm I still have not tried Vue React is quite easy to start, now ES7 has generators, iterators etc. so you should have some familiarity with it
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Yes Ive had some hours with js and it familier enough to get going. Then theres all the frameworks... 😁
Ghorz
https://www.codingforentrepreneurs.com/projects/reactify-django For js with Django, checkup this course, well explained. Django2+Reactjs
Ghorz
That course really helped me cool off the confusion in integrating JS framework with Django
Ghorz
Nice!
👍
Mohit
What front end framework is best to earn based on job opportunities, easyness? Angular, vue, or react?
Mirco
I'm following the one about e-commerce 😁
Maz
Vue is easiest
Mohit
Vue -> React -> Angular
In what order and based on what?
Ghorz
What front end framework is best to earn based on job opportunities, easyness? Angular, vue, or react?
Any you can comprehend. Its not about salary, its about what you can do with what you know. Learn any you think you can.
Mohit
Ok
Mohit
Depends on what you want from it. Generally I'd recommend React
From a django perspective, which adapts well?
Max
From a django perspective, which adapts well?
If you use Django as just an API backend, no difference at all
Ghorz
Forget about a company hiring you, create something amazing that will solve a problem unsolved, instead of companies hiring you, you get a blank check.
Mohit
Ok
Ghorz
From a django perspective, which adapts well?
All adapts well, it depends on what you are confortable with. Every language can be intertwined.
Ghorz
Welcome!
Ghorz
Try playing with Automated task, webbot, webscrapper, chatterbot then think of what you can make out of it.
Ghorz
I think this video is up on youtube
No clue, the YouTube maybe incomplete, Head to the website to get the full course they got nice price package. Am not advertising for them though, but they have really nice course.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
Is this based on knowing JS or from scratch ?
Ghorz
Is this based on knowing JS or from scratch ?
Not really, js is easy to comprehend, even if you don't know much, the course will teach you what you need to know on other to get started.
Anonymous
any can tell me how can i uplaod more than 1 image to the model for on user
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
any can tell me how can i uplaod more than 1 image to the model for on user
https://github.com/VelinGeorgiev/django-photo-gallery
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
https://pypi.org/project/django-content-gallery/
Anonymous
thanks bro
Ghorz
Readup the doc
Ghorz
In model declare an HtmlField()
Ghorz
Or better still use @izznogooood suggestion
Rammy
I think this video is up on youtube
https://youtu.be/AHhQRHE8IR8
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
I watched an hour of that, but its way more complicated than i want it.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
No need for django if you go that far.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
would make dependancies and maintainance overly compicated.
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
(for my usecase)
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
do you know js?
Nope, but i know i dont need that much for changing some forms
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
hehe
Anders (izzno / gooood) ๐Ÿ‡ณ๐Ÿ‡ด
(or i could write a calculator in js, so i "know" of)
Mirco
I watched an hour of that, but its way more complicated than i want it.
Make APIs with DRF and fetch them with react Keep them totally separated The webpack-loader way can make confusion imho
Mirco
yeah, that makes more sense
Watch this playlist It gives you a clearer idea
Mirco
I think it makes mooore sense