Doragonsureiyā
anyone used Telegram API before?
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
Python
Hi guys,
How can I solve this error?
Wallet matching query does not exist.
Mirco
Nariman
hello!
Allauth does not set user.email after register (google,facebook). What can be the problem?
Macurrent
# class DetailView(DetailView):
# model = Product
# template_name = "shop/product/detail.html"
def product_detail(request, id, slug):
product = get_object_or_404(Product, id=id,
slug=slug,
available=True)
cart_product_form = CartAddProductForm()
return render(request,
'shop/product/detail.html',
{'product': product,
'cart_product_form': cart_product_form})
Macurrent
Python
Then you are passing to the query something that it's not that ID
def get(self, request):
def _get_wallet():
wallet_obj = NWalletSerializer.get_wallet_by_user_id(user_id=requested_data.get('user_id'))
if not wallet_obj:
return response_formatter(HTTP_400_BAD_REQUEST, "Wallet Does Not Accept. First Enable it.")
return wallet_obj
requested_data = request.data
wallet = _get_wallet()
return self._prepare_response(requested_data['user_id'], wallet)
Error is in line 4 and walllet =_get_wallrt()
Python
@classmethod
def get_wallet_by_user_id(cls, user_id):
return UserCoinWallet.objects.get(user=user_id)
And in this srializer
Mirco
Dev
is there a way to get rid of scientific notations from queried model with a decimalfield
coder
Guy; have to use in pdf invoice get item data using for loop filter by unique id; i did get sum but it get all of; but have to calculate amount total unique id of person; can give the support for rectify this; advance thanks
Macurrent
whatsinaname
What unique feature can be added to a blog website to make it stand out
William
Python
async def get_address_from_napi(self, request, f):
url = 'https://api.org/'
with open('t.py', 'rb') as f:
async with aiohttp.ClientSession() as session:
async with session.post(url, data={'key': f}) as response:
address = await response.text()
return address
I want to save this address into the database what should I do?
William
Rohan
But it’s outside scope of django
Python
Rohan
Ishwar
Can't finish GitHub sharing process
Successfully created project 'pythonProject' on GitHub, but initial push failed: git@github.com: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Ishwar
error message while sharing the project to repo..
Dev
How to Cryptocurrency trading Bot
Using Django
Dev
Ane one help me
Macurrent
Macurrent
class ModuleContentListView(TemplateResponseMixin, View):
template_name = 'courses/manage/module/content_list.html'
def get(self, request, module_id):
module = get_object_or_404(Module,
id=module_id,
course__owner=request.user)
return self.render_to_response({'module': module})
for example have a look at this one. 👆
Macurrent
Anonymous
How remove help_text in PasswordChangeView?
Dev
binance = BinanceFuturesClient(config.api_key_testnet_binance, config.api_secret_testnet_binance, True)
AttributeError: module 'config' has no attribute 'api_key_testnet_binance'
GV
Can anyone help me on how to start the video where we left at the last login . The video should resume from where we left
Thara
Im defining function under view.py and mentioning html page inside render function... And also I'm giving command inside urls.py as
urlpatterns=[
path('aview',views.aview,name='aview')
But while I'm trying to go to another page... It's showing page not found
Avneesh
I deployed my django app on qa server. Also I use there crontab for some periodic functionality.but when cron runs its picking local.py file instead of qa.py setting file. Please suggest how can I run cron with qa.py file
Rohan
Rohan
Or if it’s in settings package, it should be settings.qa
Anshu
Rohan
Rohan
Also if you’re using django-crontab
Rohan
How does it matter what setting is getting picked?
Rohan
Also what mechanism are you using to pick settings file automatically?
Rohan
https://github.com/kraiz/django-crontab#config it clearly states how to use CRONTAB_DJANGO_SETTINGS_MODULE
Deleted
Guys, pls help, Get the value in queryset in Django template: https://stackoverflow.com/questions/68324913/get-the-value-in-queryset-in-django-template
Maxim
Maxim
Deleted
Maxim
fixed already
But did you know that values() in your case returns not a dictionary, but a list of dictionaries?
Deleted
Maxim
no😂
you need to either iterate over query_results_book_is_discard in the template or use get() or similar in render_2() to get one object
Rajib
While creating a new project I am getting value error: source code string cannot contain null types
Can anyone pls help me
Doragonsureiyā
While creating a new project I am getting value error: source code string cannot contain null types
Can anyone pls help me
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
ADI
I am doing crud operation
Ingit the error when I delete row
I am using crud operation
OperationalError at /delete/2/
database is locked
Request Method: POST
Request URL: http://127.0.0.1:8000/delete/2/
Django Version: 3.0
Exception Type: OperationalError
Exception Value:
database is locked
Exception Location: C:\Users\akuma\AppData\Local\Programs\Python\Python38\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 396
Python Executable: C:\Users\akuma\AppData\Local\Programs\Python\Python38\python.exe
Python Version: 3.8.1
Python Path:
['C:\\Users\\akuma\\Desktop\\6am\\DeveloperADI1',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\DLLs',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38',
'C:\\Users\\akuma\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\Pythonwin']
Server time: Sat, 10 Jul 2021 09:08:55 +0300
R
Anyone have project in django please msg me
ADI
Any body tell me
Doragonsureiyā
I am doing crud operation
Ingit the error when I delete row
I am using crud operation
OperationalError at /delete/2/
database is locked
Request Method: POST
Request URL: http://127.0.0.1:8000/delete/2/
Django Version: 3.0
Exception Type: OperationalError
Exception Value:
database is locked
Exception Location: C:\Users\akuma\AppData\Local\Programs\Python\Python38\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 396
Python Executable: C:\Users\akuma\AppData\Local\Programs\Python\Python38\python.exe
Python Version: 3.8.1
Python Path:
['C:\\Users\\akuma\\Desktop\\6am\\DeveloperADI1',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\DLLs',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38',
'C:\\Users\\akuma\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\Pythonwin']
Server time: Sat, 10 Jul 2021 09:08:55 +0300
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- 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.
ADI
When I delete perticular row it showing error what did do mistake
R
Doragonsureiyā
..
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work.
Have a nice day 😊
Doragonsureiyā
..
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- 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.
Champak Lal
Hello
Champak Lal
Everybody
Champak Lal
I m working on a pollapp where user can only create max 5polls
Champak Lal
How can i implement count column?
Doragonsureiyā
How can i implement count column?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
Champak Lal
I django built in User
I see on stack overflow
But don't know how to access the user count variable in view.py
Maxim
As Fuck
I am doing crud operation
Ingit the error when I delete row
I am using crud operation
OperationalError at /delete/2/
database is locked
Request Method: POST
Request URL: http://127.0.0.1:8000/delete/2/
Django Version: 3.0
Exception Type: OperationalError
Exception Value:
database is locked
Exception Location: C:\Users\akuma\AppData\Local\Programs\Python\Python38\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 396
Python Executable: C:\Users\akuma\AppData\Local\Programs\Python\Python38\python.exe
Python Version: 3.8.1
Python Path:
['C:\\Users\\akuma\\Desktop\\6am\\DeveloperADI1',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\DLLs',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38',
'C:\\Users\\akuma\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\win32\\lib',
'C:\\Users\\akuma\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\Pythonwin']
Server time: Sat, 10 Jul 2021 09:08:55 +0300
Use Mysql, sqlite3 can't process concurrent operations.
Pravin
Ishwar
I am getting error while pushing code to github
Ishwar
Can't finish GitHub sharing process
Successfully created project 'pythonProject' on GitHub, but initial push failed: git@github.com: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Ishwar
can anyone fix it?
Maxim
can anyone fix it?
read this https://t.me/django/168928 and do what they ask at the end