Bilal
please any one have soluations to this problem ?
Bilal
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in anyjson setup command: use_2to3 is invalid.
[end of output]
Charly
Second google result: https://bobbyhadz.com/blog/python-error-in-package-setup-command-use-2to3-is-invalid
TonFutures 💎
I have a question
If user login too many does it cause a problem?
TonFutures 💎
It means user click the button Login too many
TonFutures 💎
And make more than one session
Hridya
I have a doubt please anyone help me, how to connect django rest apo with front end? How to write the views and urls for the API?
Anubhav
vijay
Paul
How to implement store procedure in django?
S
What is best way to use admin panel of django i want learn use of that
S
How to create date picker where according date range i get that monthly dataa from sqlite
_//cleph💵🍕🇺🇸🔥
Hello how can i use simple jwt token generation and validation without using user class abstraction i want to make something like rapidapi to generate api and have limitation for time and token requests im gonna be happy if you help me
_//cleph💵🍕🇺🇸🔥
Dori
is there someone here who knows django? can you please help with homework🥹🥹
Paul
So can anyone help me to use store procedure in django?
Paul
Ok. I want to use the store procedure in django.
In the scenario we need raw sql and access the external store procedure by django.
Wolfred
Hi guys, good afternoon.
Im trying to group the result of a query by an annotated field like this:
servers1 = Server.objects.annotate(domain=Substr('hostname',StrIndex('hostname', Value('.')))).value('domain')
I am calculating the "domain" of a list of servers, and i whant to group all the servers by their "domain", but it is not grouping them
This is the output:
[
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.tuc.stglabs.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
{'domain': '.gdl.mex.ibm.com'}
]
Do u know how can i group by an annotated field?
What i expect is something like this:
[
{'.gdl.mex.ibm.com',
{'hostname': '.sdfasdfsa'},
{'hostname': '.yyttrrr'},
{'hostname': '.oppoik'},
},
{'.tuc.stglabs.ibm.com',
{'hostname': '.sdfasdfsa'},
{'hostname': '.yyttrrr'},
{'hostname': '.oppoik'},
},
]
Wolfred
I am executing the following test to see why the group by function is not working, and the group by clause is missing:
print(Server.objects.values('created_by_id').annotate(domain=Substr('hostname',StrIndex('hostname', Value('.')))))
Query:
SELECT "server_server"."created_by_id", SUBSTR("server_server"."hostname", INSTR("server_server"."hostname", .)) AS "domain" FROM "server_server" ORDER BY "server_server"."name" ASC
Dori
Charly
Can i send you a task?
No, explain what you need to do, what have you tried and where are you stuck. No one will do your homework here
Hirbod;
I have a Django project and I want to upload the admin panel of this project on another domain and the main project on another domain
Like this:
Admin-django.com
Django-project.com
What is the best solution here? I don't know how to have the same project admin panel on another domain
Thanks for any help!
Eternity
vaseem cholakkan
Maxim
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
vijay
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\vijay\Desktop\code\demo\morningpro\morningpro\urls.py", line 19, in <module>
from testingapp.views import frist
ImportError: cannot import name 'frist' from 'testingapp.views' (C:\Users\vijay\Desktop\code\demo\morningpro\testingapp\views.py)
vijay
that problem solution
Ali
Maybe you want to write first
vijay
How to write please
vijay
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\vijay\Desktop\code\demo\morningpro\morningpro\urls.py", line 19, in <module>
from testingapp.views import frist
ImportError: cannot import name 'frist' from 'testingapp.views' (C:\Users\vijay\Desktop\code\demo\morningpro\testingapp\views.py)
That error
Maxim
That error
we cannot help you until you respond adequately to our messages
ERMIA
TonFutures 💎
Hi
When user login too many make more than one session
It means user click the button Login too many
TonFutures 💎
How can i prevent it?
Charly
Charly
TonFutures 💎
no
I test it
When i click 50 times
In database 50 row created
Charly
⟨ Simon |
⟨ Simon |
yes premature optimization isn't always a good idea, but for security it's not premature optimization
Bandar
Have been doing it for a while 🤣too
Bandar
Some ppl I work with they one hour work takes 5 days
Bandar
Because I’m afraid someone will find a gap my main focus is to push project to the market
Bandar
Junior
Guys anyone use htmx, i need use this in all website or part specific?
Doragonsureiyā
Have you ever work with it?
If i have a question, can i ask you?
Don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello, I need help on $z!"
Just ask directly! The better you are at explaining the problem, the more likely you are to get help.
Asking smart questions
Junior
Junior
Understand
Junior
Before i was using in POST and GET, i was doing authentication, but have some problem because cache
Владимир
Tell me how to combine the select2 filter and crispy forms
https://hastebin.com/share/eludutavuk.kotlin
Judging by the inspector, the widget has disappeared and there is nothing in filter.form.media
Toni
Hi everyone
I'm struggling with something in my project.
I want to add a Choicefield in a modelForm on my template. Can anyone give me an idea please?
Jitxs
how to use two database in django, and is it recommended to use generally i want to use mongodb and mysql ?
cj
Jitxs
then the media url.. right ?
⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻
Can anybody assist me in implementing reCAPTCHA in my login form? I'm encountering an 'ERROR for site owner: Invalid key type' message in the captcha box, despite verifying that all keys have been correctly configured in my settings.py with the associated domain 127.0.0.1.
Mihir
Can anyone help me with django
I have used relationships in django model file , like foreginkey and onetoonefield etc
But i am unable to save form by using relationships in model
Ali
Hi
I passed Django courses. Now I want to test what I have learned in a project, but I have no idea.
What project should I do, I don't want it to be just a test, I want it to be practical.
Can anybody help me?
Muflone
Никита
Hi everyone!
I have simpe model customer (name, phone, addres).
When client in the process of filling the form. I want use find on field "phone" and run "for example" js script with window:
'Customer with such a phone already exists. Select a Customer'
How i can do that? Please help)
<form action="{% url 'new_customer' %}" method='post'>
{% csrf_token %}
{{ customer.as_p}}
<button type="submit">Add</button>
</form>