🦥
Sry
🦥
Ohhh sorry
cj
https://dpaste.de/11xX check this code once please and tell me if i was wrong
🤔 but you're using base.html, why are you extending base_site.html?
cj
also don't forget the ; in js code
007
sorry typo mistake it should be base_site.html
007
well... it should work
is it ok to use var data = {{data}} in index.html and index.js
cj
is it ok to use var data = {{data}} in index.html and index.js
oh I didn't see that... don't do that in index.js just in the template
cj
and use that index.js variable in index.js
yes, in index.js you just have to use the variable you already declared in index.html
007
yes, in index.js you just have to use the variable you already declared in index.html
and my base.html should look like :- {% block fetch %} ​ {% endblock %} ​ {% block javascripts %} ​ <script src="/static/vendors/custom.js"></script> {% endblock %}
007
index.js*
cj
looks OK... you should use {% static 'folder/file.js' %} but it looks OK
007
looks OK... you should use {% static 'folder/file.js' %} but it looks OK
Yes. it is in static format.... Thank you so much bro ✌️✌️😊😊
syedj
Im new to django
syedj
How can I design good ui
🦥
Hace ?
*have
syedj
Login
syedj
Good css designs
syedj
Where can I find
Mirco
*have
Oh sorry 😁
Mirco
Ok, what kinda frame works hace ever been done using django
Anyway Django is the framework You can built web apps or website with it
007
Where can I find
Use codepen
syedj
Use codepen
Ok thanks.
Mirco
K, tnx
Yw 😁
Anonymous
On django tutorial part 2, whenever I type q = Question(question_text="What's new?", pub_date=timezone.now()) command, I am getting this error: https://dpaste.de/fiT8
Anonymous
How to solve it?
cj
On django tutorial part 2, whenever I type q = Question(question_text="What's new?", pub_date=timezone.now()) command, I am getting this error: https://dpaste.de/fiT8
TypeError: 'question_text' is an invalid keyword argument for this function 🤷🏻‍♂️ how did you define Question model? what are the fields you put in it?
Anonymous
TypeError: 'question_text' is an invalid keyword argument for this function 🤷🏻‍♂️ It is referring to the file base.py, which is a big file, I myself don't understand it.
Anonymous
on line 485
Anonymous
https://dpaste.de/cEsB
Anonymous
So, the problem is in my models.py file, right? Not base.py?
Anonymous
Hmmm...
cj
The following all are from my models.py file: https://dpaste.de/PgNr
cj
according to your models.py you completelly overwrote Question model, so it doesn't have the question_text field anymore, hense you got that error 🙂
cj
what you have to do while following the tutorial, is to add things to your previous code, not to do everything from scratch
Anonymous
according to your models.py you completelly overwrote Question model, so it doesn't have the question_text field anymore, hense you got that error 🙂
Is not there in https://dpaste.de/PgNr in line 10, the attribute question_text = models.CharField(max_length=200),
Anonymous
which is there.
Anonymous
should i delete the code starting from line 28
cj
which is there.
what you had to do is add what is in lines 30,31 just after line 12
cj
should i delete the code starting from line 28
move line 22 and 25 to the top of the file
Anonymous
have i done it rightly, could you check it?
Anonymous
https://dpaste.de/kS8k
Anonymous
Oh, thank you! I am going to test it!
cj
but you can still move lines 12,13 right under line 9 🙂
cj
same wit lines 22-24, move right under lines 19 🙂
Anonymous
I have done them! https://dpaste.de/6iBL
Anonymous
😃
Anonymous
Gonna test!
Anonymous
@c0x6A thank you! It is working fine! You also helped me to get rid of fields.E300 error!!!
Anonymous
now you owe me US$500
🤣🤣🤣 But I can't afford that!!!
007
now you owe me US$500
Soon you'll be millionaire 😅😅
Anonymous
Soon you'll be millionaire 😅😅
I also hope to be a millionaire when I will be a master programmer. 😄
Anonymous
btw what are good applications to open .py files? I use notepad to open'em (at times, not a good option).
Guillermo
Vim is ❤️
Yeah, but would you really recommend it to someone thats just starting on programming? I think its too much to assimilate at once
Guillermo
it's just another tool
An excellent one, I use it exclusively for over 4 years now, but it also will draw a lot of your attention when starting to learn it. I always recommend to learn it as its own subject 🤷‍♂️
Nichita
Hi! Can I create in base Django admin read only form, like for report print?
Anonymous
I have run py manage.py runserver and I got some "Not Found:"s here https://dpaste.de/Oo0a#L11, I think it is not a big problem. The cursor is blinking (appearing and disappearing) and I can't type on command prompt, how to stop it? I tried ctrl+fn+f11 and fn+b.
Anonymous
THANKS!
Nichita
Yup why not
How to Google it?
Mirco
How to Google it?
Django read-only fields
Nichita
Django read-only fields
Stopstopstop, for example I have user model I want to have two different views, one for editing user(this is implemented by default in admin panel) but another will be read only
Anonymous
After running the command py manage.py runserver (here) no serious issue seems to arise (though recently I got and endless list of errors) but the command prompt cursor is blinking: I cannot execute any commands, but if I quit the server the http://127.0.0.1:8000/polls/ would also be inaccessible. What would you advise me?