Anders (izzno / gooood) 🇳🇴
Is there a way to add javascript to a specific add model view in the admin or do I have to add it to "the whole" andmin area in the base template ?
Anders (izzno / gooood) 🇳🇴
I found a way to add it to all the model pages of one perticulare model, good enough ;)
Mirco
Sergey
Hello, all. Does anybody saw or developed "adminable custom fields" for posts? I saw "custom fields" plugin, but it's do not work for me :-/ Django 1.11
(custom fields = custom extandable properties, list may be expanded, edited, find by properties etc)
Anonymous
I'm always blown away by the old versions people are running
Sergey
hm. I tried to upgrade to 2, but I used "Jet", which is not compartible with v2 😐 It's convinient admin panel
maybe you know good friendly and free admin panel for django 2?
Mirco
Sergey
Venkatesh
Thanks Micro
Sirius
Shiva
Guys anyone has worked with leaflet map in django?
Mirco
@paulox the man for ya
Paolo
You can read slides of my talk in blog:
https://www.paulox.net/2019/04/12/djangocon-europe-2019/
Anonymous
hello guys
Anonymous
i want tu use
for x in range(10)
in django template
Anonymous
anyone can help me ?
Anonymous
Google can help you
raven
raven
like in template if you want number to be displayed you can use
raven
{{forloop.counter}}
Anonymous
no no
Anonymous
hmm
Anonymous
i wan't to use a for loop with range in template
raven
okay so you just want number to be displayed
Anonymous
raven
{% for i in i|rjust:count % }
{{forloop.counter}}
{%endfor%}
raven
count will be your number of iterations
raven
it will start from 1,2 ... count if you want it to start from zero use
{{forloop.counter0}}
iNcAeLuM
hello guys, i am noob with django, am trying to understand django building some experiments.
i have a database with qeustions inside
inside there are many questions.
i build a func in view.py to show all questions, and set a URL in
urls.py
now am trying to show only questions by id.
i buid this func to do so in view.py:
def select_question(request, question_id):
question = Question.object.get(pk=question_id)
return HttpResponse(question)
my problem now is that i dont know what url i need to place in urls.py in order to do something like: /questions/"question_id", and get returned the question by id
thanks all
raven
path('questions/<int:id>/',view,{})
raven
you have to pass it in your url
iNcAeLuM
i am trying /questions/1
iNcAeLuM
and i am getting this error
raven
make a change
raven
make it id
raven
it shouldn't make any difference but still
iNcAeLuM
same error
iNcAeLuM
may i need to restart server?
raven
iNcAeLuM
iNcAeLuM
raven
😊
raven
yes to the template
raven
i mean to the html file
iNcAeLuM
so <int:id> is passed into the {}
raven
no
iNcAeLuM
i mean this <int:id> allows user to place an int then it is passed into {}
raven
int there was just telling django that after question/( here I'm expected to receive a int variable)
iNcAeLuM
ahh ok
raven
try to pass this {"name":"Agustin"} instead of {}
raven
do you know how to display html in django?
Anonymous
Hi Guys
Anonymous
If anyone could say how to start with Django Oracle
Anonymous
Need step by step guidance on Linux
raven
https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/apaas/python/python-django-accs/python-django-accs.html
raven
okay you'll be soon get familiar to those things
iNcAeLuM
raven
from.where you are learning django
raven
?
raven
I'll suggest you to follow thenewboston or prettyprinted django videos on YouTube
raven
aye actually i even never had work with django oracle i just searched that for you 🤣
Anonymous
🙏
raven
👍
Sergey
Where better store global function? For example generator of top items (of /humans) which shown at home page (/home).
In Humans module?
Anonymous
iNcAeLuM
English ☺️
nop i am following this tutorial in spanish
Anonymous
They say it's easy so I go for this framework to web hosting .. btw if u find any in English or nepali please post here ..good luck for learning
Rajesh
Hi friends, I am new to django and I am working to find a solution for a small project on image uploading and it's type conversion. Pls let me know if someone can help.
Rajesh
HI friends.. can someone find the cause of this issue: