Amit
Compiler is trying to search for short/short, that’s y your are getting such an error
Ramazan
Hello everyone; I can post request a website from "https://localhost:9999/rest/services" Correctly but I'm trying to connect my localhost:9999 port from docker-compose bash but ı hasn't connected yet , Any idea? I am using this url at docker but doesn't work "https://host.docker.internal/rest/services" what can ı should ?
Amit
Remove from ur project and keep path flow as it on app.py
Nick
can u please elaborate the 2 input that u speciefied up here
def search(request): qur = request.GET.get("search") products = [item for item in PRODUCT.objects.all() if qur in item.product_name or qur in item.product_category] context = {' mobiles' : mobile} return render(request,"search.html", context)
ali
a = input() co=0 b = int(input()) s =[ l for l in input().split() ] for i in s: if i in a: co += 1 print(co) How can this code be optimized ?
Inuk
a = input() co=0 b = int(input()) s =[ l for l in input().split() ] for i in s: if i in a: co += 1 print(co) How can this code be optimized ?
there's no reason to use a comprehension in the s=... line, as str.split already returns a list booleans can be used in arithmetic and are equal to 0 for False, and 1 for True, so you can do this: co += i in a
vijayant
Hi team .. I am getting am error of "this field is required " when I am trying to upload an image in my Django project. Can anyone help to resolve the error.
Manpreet
Create static folder
nops this wont work
Anonymous
Hello team...how to send random 6 numbers of password on mail in django?
Manpreet
try using get_random_string functiob
Manpreet
function*
Anonymous
Ok
D
Object of type Customer is not JSON serializable I am working on an ecommerce projects and new to Django REST Framework while i send POST it shows
D
can anyone help me with this ?
D
can you show me an example ? any code?
Manpreet
are u familiar with serializers or not?
Manpreet
if not then show me ur code first
Manpreet
No i am new to them
must share a picture of that then
D
must share a picture of that then
No option for pictures is available i will share link
Manpreet
vijayant
Create static folder
Already tried. It didn't worked
Manpreet
show me the code in my personal window
Arsa
Hai, I want to get an index from a row of query set. How to do that?
Arsa
cursor.execute('SELECT nilai_cdg,nilai_dbs,nilai_uix,nilai_mnj,nilai_dsi,nilai_bns,nilai_kst,nilai_dll FROM mahasiswa_ktg_mhs WHERE nim =72160044') ktg = list(cursor.fetchall()) max_value = max(ktg) max_index = ktg.index(max_value) i = print(max_index) I try this code, but always get "0"
Xaitec
Hi, is it possible to you decorators to register a model to to an AdminSite child class? class HRAdmin(admin.AdminSite): pass hr_admin = HRAdmin(name='HR Admin') @hr_admin.register(Schedule) class ScheduleAdmin(admin.ModelAdmin): pass
Karthik
I get like Template don't exist at index.html
Karthik
Error like this
Karthik
How slove this
Karthik
Any one can help
Doragonsureiyā
How slove this
Copy that error message and paste it on a Google search, read the first results.
mukul
I get like Template don't exist at index.html
Have you define templetes in setting
Tkusi
Redirect and use .last()
Any example or documentry on how to do that?
Stephen
Hello Django Devs, I am looking for this book; "Two scoops of Django 3.x: Best practices for the Django web Framework"
Mirco
move to @python
Mirco
Any one ?
get the object, and use the add() to edit the M2M and save
Deleted
how to add pop up function after choose a radio button? thanks
Mirco
Anonymous
I have hosted an application, but once I add a object through django admin which contains a file, it is not get updated in the front end untill I restart apache
Pratik
I got en error in post method while i submit a data
Pratik
AttributeError at Home
Pratik
I mainly use function base class but a have trying with class base views
.
Guys, does somebody know calculating in statistics?
Doragonsureiyā
Guys, does somebody know calculating in statistics?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Doragonsureiyā
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
MT
how to run django in blockchain
Doragonsureiyā
how to run django in blockchain
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
M
In DRF any reference how one peer can get authenticated to call post request
noob
set' object has no attribute 'objects'
noob
can anyone solve this error i get this django where i want to acces all objects using a variable names
noob
my object name is saved in a variable and i wanna get all object using that variable name in django
M
I don't think here some pointers like c
noob
object mean table my tables
noob
?
Xpyk3rs
hi im a begineer ..can anyone say how can i search by 3 fields in a list of products
Sai
Save a queryset in that variable
Sai
Not a model reference
noob
i have different button on website when i click on a button i pass it name in dictantiory and from that dict i wanna get name of objects
noob
did u got point?
LinuxBugs
for key in dict.keys(): print(dict[key])
Hamidreza
Sometimes i got "FATAL: too many client alerdy" in django My program does a lot of crunching and sends it to the database Do I get this error because of bad program writing or is it normal? Because I solve this problem manually by raising the Max Connection
noob
for key in dict.keys(): print(dict[key])
i wanna do like this (keynames.object.all)
noob
in keyname i wanna write the value
noob
can anyone help?
noob
'str' object has no attribute 'objects'
noob
what does this err means