Zion
I would recommend Django
he wants software. I guess he think on executable program, standalone, which Django do not meet those requirements.
Igbojionu
Ohh yah
Zion
I want to develop a school management system software should I use tkinter or django ,i want it to be a software
not matter what you are doing, do not use Tkinter 😐. I would take two-three days learning basics on Electron then build a Django Rest-Api and make them work together. the ORM had much more advantages then you thinks when you get a project like that
彡ɾεʓɑ彡
hi
彡ɾεʓɑ彡
I got errors but photos are not allowed here I need guidance
Jimmies San
彡ɾεʓɑ彡
https://pastebin.pl/view/42b2a8ac
Jimmies San
https://pastebin.pl/view/42b2a8ac
Read the last line of your error. What does it say?
彡ɾεʓɑ彡
Read the last line of your error. What does it say?
But I have made the Sqlite and I was practicing yesterday and everything was fine
Jimmies San
But I have made the Sqlite and I was practicing yesterday and everything was fine
Did you install using a virtualenv yesterday? if yes: did you load your venv before running your app today?
Islomjon Sheraliyev
I wrote a code in which I can create posts, and the posts have good and bad quality, when I add a new post and select its quality, the good post ends up on the main page, and not on the page with good posts, the same situation with bad posts
Jimmies San
I have a pycharm and it doesn't run automatically?
I would read a Django tutorial again and be sure about the steps I am doing
Jimmies San
I have a pycharm and it doesn't run automatically?
Don't think so but you can check. Considering the error i'd say no but Google is your friend :)
Islomjon Sheraliyev
I did everything possible, checked the URL, I checked everything was written correctly, but nothing worked
彡ɾεʓɑ彡
https://pastebin.pl/view/7b60a4fa
Muflone
Do I learn anything else after this?
Python first of all, the standard library
DeathLikeSilence
hello everyone Can I use Mysql instead of SQLite in my Django project? Can I transfer my data to Mysql?
DeathLikeSilence
Of course you can but moving the data requires thirdy part tools
Ok thanks, but what kind of tools ? May you help me, I would be appreciated
DeathLikeSilence
Not Django related I'd use dbeaver
ok thanks a million🙏🏻
彡ɾεʓɑ彡
https://pastebin.pl/view/56717808 Help🙏
Muflone
彡ɾεʓɑ彡
sqlite3 is native in CPython
https://pastebin.pl/view/e6457361
Muflone
https://pastebin.pl/view/e6457361
Check your settings.py Probably you set the db engine wrongly
彡ɾεʓɑ彡
Muflone
What OS are you using?
彡ɾεʓɑ彡
Muflone
Linux opensuse
Is the python3 version provided by the OS or you installed/replaced it?
彡ɾεʓɑ彡
Is the python3 version provided by the OS or you installed/replaced it?
Yes, there are version of Python3, but I entered the following python manage.py makemigrations command and it worked yesterday Because in Pycharm And it is in a virtual environment
彡ɾεʓɑ彡
Due to these errors, I took a risk and deleted all the files created inside the migrations folder and kept only the main file __init__.py
Muflone
terminal?
From your terminal in pycharm
彡ɾεʓɑ彡
(venv) adminreza@localhost:~/Desktop/django_new/eshop_project> python -c 'import sys; print(sys.version); print(sys.executable)' 3.11.6 (main, Nov 15 2023, 09:22:27) [GCC] /home/adminreza/Desktop/django_new/eshop_project/venv/bin/python (venv) adminreza@localhost:~/Desktop/django_new/eshop_project>
Muflone
Ok, now import sqlite3 directly to make sure your python is not broken python import sqlite3
彡ɾεʓɑ彡
Ok, now import sqlite3 directly to make sure your python is not broken python import sqlite3
import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'sqlite3'
彡ɾεʓɑ彡
Can I send a photo through a link?
clouded
python3.11
I couldn't find a reason why it should not already be there. What's special about your Python distribution?
彡ɾεʓɑ彡
#!/home/adminreza/Desktop/django_new/eshop_project/venv/bin/python # -*- coding: utf-8 -*- import re import sys from pip._internal.cli.main import main if name == 'main': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
彡ɾεʓɑ彡
Everything was working fine until yesterday Today, I don't know why it happened like this
x-yro
Hello, can someone explain a couple of things to me. Where should JWT token authentication take place? When you visit the site and then somehow transfer and automatically log in to the user when connecting to the websocket, or is it not mediocre to constantly request a login with the connection itself?
彡ɾεʓɑ彡
I changed the Python version from 3.11 to 3.6 and the problem was solved
Rasoul
I changed the Python version from 3.11 to 3.6 and the problem was solved
You downgraded the whole opensuse python package?
Victor
Can I convert django app to exe
Rasoul
Can I convert django app to exe
Why do you want to do that?
Doragonsureiyā
Can I convert django app to exe
So, people, listen... if you're writing Python code but at the end you're coming to ask how to compile it, how to hide the code, how to make a single executable (make a .exe file 🙄), or things like those, it means you don't know what you're doing, because that's not how Python works, that's not the way you should run your Python scripts, if you wanna do those things then change your programming language. Yes, there are tools that make Python code to be one executable (compile it, convert to .exe, call it whatever you want) but, if you use them, it means you really know what you're doing and you won't be here asking how to achieve that task, otherwise just use other programming language. If you're using Python to write code, you should know how it works and how to run your scripts without bloating them with unnecessary stuff.
彡ɾεʓɑ彡
Python 3.6 was available on venv
Mahdi
Hello guys i have a problem with drf can some body help me?!
Mahdi
My api app works on local host but not works at cpanel host doese somebody know why?!
Charly
I changed the Python version from 3.11 to 3.6 and the problem was solved
you should not use that version it has no support
Mahdi
See my drf app works on local host perfectly but the POST didnt work on host
Mahdi
What do you mean?!
Rasoul
What do you mean?!
I think the most straightforward and less troublesome way would be contacting the host provider as you have no idea what the issue is and are not able to give more info on it.
Charly
What do you mean?!
That you need to be more specific information of how is it not working
Charly
how do you expect to get help with no details?
Mahdi
elif request.method == 'POST': data_serializer = DataSerializer(data=request.data) if data_serializer.is_valid(): data_serializer.save() return Response(data_serializer.data,status.HTTP_201_CREATED) else: return HttpResponse("data not valid") In post method my if.is_valid returns false how ever the data that sent is valid
Mahdi
Yes
Mahdi
And the data that i sent its true also
Promiscuous Ferris
Yes
it's possible that your service provider is messing with the payload, tho that shouldn't be happening. one thing you can do is on your cpanel equipped server, return data_serializer.errors i.e, instead of returning a static string, send the errors to the client. it will show you why it's not valid. side note: during post, you DEserialize data. so calling it data_deseralizer might be more appropriate.
Promiscuous Ferris
How can i do that can you please help me with that?!
deserialized_data = POSTSerializer(data= request.data) if deserialized_data.is_valid(): deserialized_data.save(user_obj= user_obj) response_dict['message'] = 'SUCCESS!' response_dict['result'] = 'Your task was successfully created.' response_status = status.HTTP_200_OK else: response_dict['message'] = "ERROR!" response_dict['result'] = deserialized_data.errors # type: ignore response_status = status.HTTP_400_BAD_REQUEST
Promiscuous Ferris
this is an example, notice how when it fails the validation test, rather than returning "your request failed", i return deserialized_data.errors so in your example, inside the "else" block, you could just return: HttpResponse(data_serializer.errors.__str__())