Azizbek Xushnazarov
Лиза
Guys, do you have any problems with django 4+ or should I stay a bit in 3.2+ stable version? I heard about some issues related with postgres but seems like its not relevant anymore
cj
Guys, do you have any problems with django 4+ or should I stay a bit in 3.2+ stable version? I heard about some issues related with postgres but seems like its not relevant anymore
it depends on what kind of project you're doing, personally for big projects I'd stick with an LTS version, for small/pet projects it can be the latest stable version
Лиза
it depends on what kind of project you're doing, personally for big projects I'd stick with an LTS version, for small/pet projects it can be the latest stable version
Yep, I also follow this way :) But to be more precise I just wanted to point out maybe there are already known issues related with 4th version of django which force me to wait the release of new versions
ابو السباع
Hey everyone! I have a Django GUI application that runs a python script in the background. How can I display the console output of the python script on the Django GUI (which is in html/css)? Thanks!
ابو السباع
How does it run it
I use Node JS with Electron for the front end. I use the Node JS library pyshell to call the Python script which functions in the background. The Django frame work makes it easier for the front end GUI.
ابو السباع
The pythons script can run independent of GUI front end. I just want to display the console text so the user can see what's going on.
ابو السباع
Interactive I guess you can say.
Tao
I've been writing a bot to learn Python and (Postgre)SQL. It's using Flask right now but the Flask bit is tiny. My database right now is just JSON. Next step is to migrate that into a database. Which led me to ORMs. Should I migrate to Django just for its built-in ORM or look at something like peewee/Prisma instead?
Tao
Current knowledge of Django is 0
Д
I use Node JS with Electron for the front end. I use the Node JS library pyshell to call the Python script which functions in the background. The Django frame work makes it easier for the front end GUI.
I'm having serious trouble understanding how Django is involved. The scripts get invoked from JS and you're talking about frontends and backends in JS. Djangos and pythons role don't come up once...
Д
I'd prefer to use the Django systems since they are the best Python has to offer.
Tao
Django is more than an ORM.
Oh I know that! I just wanted to get the opinion of this group if just for the ORM I should be looking at migrating
Tao
Plus then I'd get all the benefits of the vast Django community, which seems like a big reason to switch
Д
Oh I know that! I just wanted to get the opinion of this group if just for the ORM I should be looking at migrating
I think the whole package is worth learning. The templates are blahh imho. Just do JavaScript for the frontend.
ابو السباع
ابو السباع
I'm having serious trouble understanding how Django is involved. The scripts get invoked from JS and you're talking about frontends and backends in JS. Djangos and pythons role don't come up once...
DJango makes the structure and has the default HTML I am using for making a GUI. It's really just an HTML page. I used a bootstrap material template for the HTML page that get started by the default Django setup. The HTML page that starts when I start the Django app (running npm start) then calls the js file that calls the python script I need to run.
Д
Firing python with npm start
Tao
I think the whole package is worth learning. The templates are blahh imho. Just do JavaScript for the frontend.
OK I'm going Django. And since it's a bot I'm building I don't even need to worry about frontend.
Д
OK I'm going Django. And since it's a bot I'm building I don't even need to worry about frontend.
Study commands too, and how to write your own. I mean stuff like manage.py <something>
ابو السباع
Firing python with npm start
Firing up a web app with npm start which calls a JavaScript file which uses pyshell library to call and execute a python script.... I tried my best. I am self taught guy struggling to be a python developer. Still can't find a company willing to give me a chance.... Oops ... I digress a little bit.
Д
I need to sleep
~:$
Hey everyone! I have a Django GUI application that runs a python script in the background. How can I display the console output of the python script on the Django GUI (which is in html/css)? Thanks!
your HTML is on client side and your python script is running on server. right. So if you want to continuously update client screen ( your HTML view) then you need some real time connection between client view ( your HTML ) and your server. My best thought is that you can achieve this by using websocks or django channels. Other approach can be that..... your scrip save the log ( output ) in database.... and you make an ajax call periodically to read logs from database and view them on your HTML view. in this way your logs will persist and you can use them as history. You can delete old record of logs periodically from your database on some datetime.
Artur
Hello. I have a model that has two fields: url and regular_url. I need to implement it so that when the user accesses the url, he redirects to regular_url. How can i do this?
Alen
Hi ,can someone help me. While working with Class based views,I heard that use of PUT method is not as safe as POST method. So I created a POST method for creating and inserting data to DB. I need another POST for update too,since django Class based view doesn't allow multiple post methods, I created another function within class and redirected it to the update function on the basis of a flag. I made this setup as I saw some of them did it in stack overflow. is this the right way? Is there any better way to do this?
Yury
Hello. I have a model that has two fields: url and regular_url. I need to implement it so that when the user accesses the url, he redirects to regular_url. How can i do this?
Use @property decorator for def url(self) method? Or please explain what do you mean by "user accesses" — reading? writing?
Aryan
Hii..guys.. I'm..having..trouble..hosting..django..chanels. I..tried..following..the..official..doccument..for..deploying..channels..but..something..goes..wrong..somewhere. Wsgi..part..is..working..fine. It..would..be..great..to..have.. someone's..help..in..this..
Ohunjon
Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 (from versions: none) ERROR: No matching distribution found for apturl==0.5.2 I am facing to these problems while deploying to heroku my app please help me.
Vivek
Anyone have project for pdf to image converter.. Where multiple use can upload pdf documents at the same time
Freelancer
I have a question how do you people work on frontend like is there any other way to create responsive and js enabled website from figma
Freelancer
Writing each line of html css for a backend guy is a very teadious task.
Pavel
how to add static files to descendant layout in django template?
Pavel
not to base layout where all general css and js files are in header, but to the specific one?
GG
i have this error Direct assignment to the forward side of a many-to-many set is prohibited. Use type.set() instead.
GG
i'm trying to create a new object that have a many to many relation
GG
Word.objects.create(word=line, type=fnp.type, encoded=False, count=1) the type field is the many to many relation, how I can get the type set from fnp (is an another object) and assing it to new word object?
Дмитрий Борисов
You need create new object - and then assignment relationship
Дмитрий Борисов
w = Word.objects.create(word=line, encoded=False, count=1) ; w.add(type)
Дмитрий Борисов
w.type.add(fnp.type) - correct
GG
ohh thanks, so for t in fnp.type: w.type.add(t)
GG
fnp.type has a set of types
Дмитрий Борисов
yes or w.type.add(*fnp.type)
GG
thanks :)
GG
save or update is required?
GG
w.type.add(*fnp.type).save()
Lambda
Hi! How to open db in terminal with django command?
Adams
tnx
Always
😒😒
I added a 3rd form to my webpage and the csrf verification failed for that form, even though I added the csrf_token inside the form tag and other forms still work
Neo
You'd start with peewee before porting the whole thing to Django?
Yes. The idea is for you to learn more frameworks/packages
༒ROHIT
Hello everyone I want to create a Dashboard using django framework to receive the data from 3 different Iot Device And the received data will update every 2-3 sec and form a graph. It also includes user login Plz help me with this how to start and road map for this..
Mika
Hello everyone I want to create a Dashboard using django framework to receive the data from 3 different Iot Device And the received data will update every 2-3 sec and form a graph. It also includes user login Plz help me with this how to start and road map for this..
There are many way to go rome. You should create an api to store the data of IOT Devices. About the dashboard you could refresh the windows with javascript evey 2-3 sec. Or The data could be refresh by socket.io with nodejs...once time the iot store the data, too send a notifier the socket. And the socker notify the listener(dashboard) with the new data
༆𖤍ཽ🇻 G⃖r༙e༙y༙h༙a༙t༙⚚×͡×
In views.py file eror thrown :- Function missing 1 required argument: 'request' Even I already written 'request' is correct
༆𖤍ཽ🇻 G⃖r༙e༙y༙h༙a༙t༙⚚×͡×
Show code
But here image can't sent
Д
But here image can't sent
is that how you distribute code? you take pictures of it and then you re-type it from the images?
Maxim
But here image can't sent
if you can't describe the problem without pictures, you are in the wrong group
Shreehari
Hi django allauth google is giving white page after upgrading
Shreehari
can anyone please help me with the above?
Ousmane
hello I want to visualize my data by carrying the source code in the view but I can't make it appear at my template level
.
Can I put projects for jr web developer which done by denissivy videos? Thanks for answer
Ousmane
hello I want to visualize my data by carrying the source code in the view but I can't make it appear at my template level
Zdravo
Is there any project repository or video implementing django rest framework social + email login? I've problem in implementing confirmation email link