SNIR
got any good source to read about it ?
SNIR
and in frontend, what you recommend ?
SNIR
i need fast and easy frontend framework
SNIR
easy intergeration with django ?
SNIR
i geuss need to use rest api ?
cj
yes and yes
Mirco
i geuss need to use rest api ?
You can use also GraphQL instead of building REST APIs , it depends on your needs
Stump Lowell
Please am trying to do this I have an integer field in my model with is default = 0 I need a function method to change the defautult to a numbe when I run that code
Anonymous
i want to make a site in django when i searched some product it will show price from other site how i do that?
矢田
How do i call a class to return its whole list from its function(currently its only returning one item from the list)
矢田
show ur code
posting media isnt allowed in this group
Archie
posting media isnt allowed in this group
upload your code to pastebin
矢田
upload your code to pastebin
hope u kinda understand the snippets ill put
矢田
upload your code to pastebin
https://hastebin.com/veyepukone.py
Akintola
I need to deploy a ML model in Django for making predictions. Anyone who could be of help ?
Archie
https://hastebin.com/veyepukone.py
def searchResult(self): list_result = [] for j in search(self.query, tld="co.in" ,num=10, stop=10, pause=2): list_result.append(j) return list_result def search_view(request): val = request.GET['q'] emoji = Crawl(val) return render(request, "result.html", {'result': emoji.searchResult()})
Opeyemi
good day guys, I am working on a potential start up and need to integrate notifications and messaging on the api I am building. I am lost on how or where to start. Please can anyone share pointers and Videos that than be helpful in my journey. Thank you.
Abubakr
hi there, did anyone try tp log requests into file?
S
from django.utils.encoding import python_2_unicode_compatible ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (C:\Python38\lib\site-packages\django\utils\encoding.py)
S
how solve help me
Anonymous
Hii everyone, please suggest resources (youtube videos, books, blog)for error handling in django Thanx in advance
Doragonsureiyā
Hii everyone, please suggest resources (youtube videos, books, blog)for error handling in django Thanx in advance
Check out PythonRes, a channel for Python resources (links to help you out).
Anonymous
I want create the pos system for restaurant how can I do in Django?? Any suggestions!?
Pratik
Hello all, can I use my own Mysql queries instead of creating django models?
Anonymous
python manage.py makemigrations learning_logs No installed app with label 'learning_logs'. PS C:\Users\ulugbek\Desktop\learning_log\learning_log>
Arbaz
Can someone tell good way or place for learning React
I
Pip install mysqlclient Error: Required Microsoft visual C++ 14.0 Help me
Anonymous
I think you need to install visual c++ 14.0
Dcruz
Django ORM do magic for us
Andrej
Hello all, can I use my own Mysql queries instead of creating django models?
I was also very skeptical of all ORM's until I took time to try the Django ORM. I was even able to make a join over multiple tables on indexed keys and improve the query execution time from 10 sec to under 50 ms on tables with 10+ million rows. Now, I'm loving it. It is worth to learn it. You can even write custom SQL queries if you want to.
Jamil
What is the difference between authentication and permissions classes, I cannot find an adequate explanation from stack
Andrej
In authentication you find out if the credentials are right and which user it is. In permissions you check which rights the authenticated user has to see, change or delete a resource.
Jamil
In authentication you find out if the credentials are right and which user it is. In permissions you check which rights the authenticated user has to see, change or delete a resource.
So authentication allows you to map the request to the token(for token auth) to find the user, and then so that you can use the user within the permissions right
Jamil
without authentication we couldnt have permissions right?
Vinayak Kumar
I am creating a django blog post. I want see the content which is specifically uploded by the user who is now logged in. But i am seeing all the post uploded by all user. How to see only post uploded by the user logged in.
Vinayak Kumar
I am using django.contrib.auth for user sign in via admin panel
Vinayak Kumar
I can't think of {% if user.username == ? %}
Kratøs
nah....if the user is authenticated
Dcruz
First obtain the user from the request and then filter it
(USMON)$
Django webseti hosting?
Jai
Django webseti hosting?
Can use pythonanywhere or heroku
Дауран
Can use pythonanywhere or heroku
Yeah I totally agree with you for this stuff , I highly recommend pythonanywhere
Дауран
Django webseti hosting?
Do you need only free hosting's or any hosting
Дауран
Or it doesn't matter
Дауран
In this case you should follow on that recommend which suggests above
Roman
Hi guys, what is the solution if I need to compare big text fields ( about 2k symbols)?
Roman
I have about 8M rows of data and I have a field text which has from 50 to 2k symbols, and this fields should be unique, but the comparison take too long, what is the way to avoid it ? use hash ?
Roman
The thing is that this super big field should be inique
Intrepid
Which os is good for python project?
Intrepid
And IDE?
Muflone
the os is irrelevant good IDEs are pycharm and vscode
Mehmet
I have about 8M rows of data and I have a field text which has from 50 to 2k symbols, and this fields should be unique, but the comparison take too long, what is the way to avoid it ? use hash ?
2k symbol count is convenient for unique indexing on most of RDBMS solutions. If you can, you should check it in SQL level. Unless you can test data whether unique in SQL level, python set data structure behaves like hashmap, and it creates hash binary tree in background. If there are multiple hits to same hash(Yes this is possible) it tests out from a sub array.
Roman
2k symbol on unique =True on 8M
Roman
Takes about 15 seconds to insert
Andrej
Can u please share resources where you learnt ORM. It will really help me
Django Docs is a great place to start: https://docs.djangoproject.com/en/3.1/topics/db/queries/
Mehmet
If you have possibility to implement in Java lang you can get much more performance thanks to its sub hash testing algorithm. You may use multiprocessing in python and map data to multiple cores for testing. Secondary Hashing is probably wont give performance enhancement in pure language because it is already stored as integer hashed. You can also search on red black tree algorithm to enhance insert performance
Mehmet
In sql level it leverages multiprocessing, hashing automatically. You should try to enhance performance first by fine adjustments on unique indexing, partitioning based on a field.
Roman
Okay, thanks
Mehmet
If you have authorization to tweak on RDBMS system parameters such as caching, purging behaviors memory parameters, you should try on that. Because mostly Databases do better performance tweaking on data than your implementation.
Roman
Ha, yeah I think so
Mehmet
Ha, yeah I think so
For example, partitioning table on multiple disks based on custom hashed(md5, sha256) field would be good first try to enhance insert performance. If you have this much insertion, you can research on async database shrinking(Example: vacuum analyze on Postgresql) with cronjobs. It leverages good calculation times while accessing and manipulation of data.