@bugbytes3923 That's great, we already learned a lot from you. Perhaps you could make a kind of complete course about django with begginer, intermediate and advanced level. I am sure knowing the quality of your job that many people (me included) will be ready to pay for it.
@@bugbytes3923 Hello, can you please do a video on hxhtml2pdf, PLEASE, because there is a function provided in the documenention about how to Convert HTML URIs to absolute system paths so xhtml2pdf can access those resources, it returns an error, i have tried to find the problem but i havent got the solution, I HOPE YOU WILL CONSIDER THIS!!!!
Would love to see some processing of data before saving to database/disk. I have a model with filefield for uploading gpx files. I want to save the original file, but also extract metadata into different fields of the model. For example number of points for the track, elevation of each point, calculate the length of the track... I appreciate your django/python content very much. And I hope you will be doing more with django gis, and hopefully "djangorestframework-gis".
Thanks a lot! There will be lots of GIS stuff on this channel in the future, with GeoDjango too - a big part of my working background is in GIS. I'll need to set some time aside to prepare it though, probably over the summer. Are there any GPX file examples that you could point me to for a video like this? I'd be happy to try a small video on this in the near future. Thanks again for the kind words, much appreciated!
@@bugbytes3923 Nice! Much appreciated, let the countdown begin :) I'm a noob in GeoDjango/GIS, even building up models and deciding where to store the data was a struggle. My goal is to setup GeoDjango+rest as a backend for serving hiking tracks and hiking related pois (parking, viewpoints, shelter, fresh water). Maybe using Nextjs as frontend. I know this is a hairy goal for me, but man I'm learning a lot! Let me prepare a gh repo to share. Is it OK for you I make a private GH repo where I can invite you to join?
Thank you so much for all this useful content!!! Could you please tell me where you're from? I've been following your videos for over a year now, and this accent is starting to drive me crazy!
Can you create video about docker + django? And maybe then deploying a project to Ubuntu. Not on heroku or netlify but to classical clean Ubuntu server. That would be very interesting.
Great suggestion! I've got plans for deployment videos, and deploying to an Ubuntu instance would definitely be interesting. I'll see what I can do soon!
thanks for your videos but I want to ask you there's video you have done about notification with channels and websocket is it possible to do notofication with django by using htmx, alpine, hyperscript with wsgi or it is not possible? please tell me
I would recommend ASGI + django-channels for this, if possible. Or some other WebSocket package. With WSGI, it is definitely possible, I would think - but I've no experience with that, to be honest.
am trying to figure it out, i have a rural and a urban properties, how do i build my models? should i create a models for each of than and them apply a foreing key to a listing models ?
I have a question regarding database management, what is the best way to create database tables for multiple clients (small businesses), is creating a business model enough to separate the databases between them or is there a better practical way ?
I'd recommend a package like django-tenants for separation of tables for each client. This basically works by using a single database, but creating multiple schemas within the database - one per client. Each client can therefore have the same tables, but separated into their own schema. pypi.org/project/django-tenants/ Would a video on this be useful?
I never knew about the @property decorator in models - if I were using FastAPI as a microservice and SQLAlchemy, could I do the same? Is it inadvisable to have more complicated methods as @property? Also, for some reason, your accent makes me pay attention better.
Thanks! Yes - properties are something provided by Python classes, so they can also be used with SQLAlchemy in exactly the same manner. I would advise against doing anything too complicated in a property, particularly if it involves reaching beyond the model class for external dependencies or performing additional SQL queries, etc. For simple stuff, it's perfect though.
Hello @bugbytes3923, can you please do a video on hxhtml2pdf, PLEASE, because there is a function provided in the documenention about how to Convert HTML URIs to absolute system paths so xhtml2pdf can access those resources, it returns an error, i have tried to find the problem but i havent got the solution, I HOPE YOU WILL CONSIDER THIS!!!!
Problem CharField need blank=True, null=False Because db have two value ‘’, None Confuse read db Restaurant.objects.filter(nickname=‘’) or Restaurant.objects.filter(nickname_isnull=True)
Even though it is a CharField, I prefer to set NULL values on the database side. CharField(null=True) Storing a blank string still constitutes a value, whereas NULL itself signifies the absence of a value. If you store blanks in the database for a CharField where there should be no value, you will end up with various types of empty strings: (i) "" (ii) " " (iii) " " (iv) " " (v) " " It's better to use null=True even with CharField type of field. When you use Django's save method or objects.create() , it checks for values in this sequence for any absent field : First priority: Use the default value if provided in the model field. Second priority: Use NULL if null=True is provided in the model field. Third priority: Use an empty blank string (irrespective of whether blank=True is provided or not), because you can't prevent Django from storing nothing on the database side. Django is frustrated now.
ORM Playlist link: ua-cam.com/video/EsBqIZmR2Uc/v-deo.html
I like before I Watch. Please more django content. Thank you for all the great content.
Thanks a lot, much appreciated! It'll be a lot of Django in the next month ;)
@bugbytes3923 That's great, we already learned a lot from you.
Perhaps you could make a kind of complete course about django with begginer, intermediate and advanced level.
I am sure knowing the quality of your job that many people (me included) will be ready to pay for it.
Thanks a lot and YES please make a video about model managers.
Will do, thanks a lot Peter!
great content, well explained... more django practical hints please :)
Thanks! Coming up soon ;)
A great content, thank you so much!
Thanks a lot, much appreciated!
@@bugbytes3923 Hello, can you please do a video on hxhtml2pdf, PLEASE, because there is a function provided in the documenention about how to Convert HTML URIs to absolute system paths so xhtml2pdf can access those
resources, it returns an error, i have tried to find the problem but i havent got the solution, I HOPE YOU WILL CONSIDER THIS!!!!
Great as usual.
Thanks a lot!
I came here after 4h coding Django ❤
i love your content, please make videos on custom user model, groups and permission and django signals.
Great suggestions, thanks! Will try and prepare soon.
Would love to see some processing of data before saving to database/disk.
I have a model with filefield for uploading gpx files. I want to save the original file, but also extract metadata into different fields of the model.
For example number of points for the track, elevation of each point, calculate the length of the track...
I appreciate your django/python content very much. And I hope you will be doing more with django gis, and hopefully "djangorestframework-gis".
Thanks a lot! There will be lots of GIS stuff on this channel in the future, with GeoDjango too - a big part of my working background is in GIS. I'll need to set some time aside to prepare it though, probably over the summer.
Are there any GPX file examples that you could point me to for a video like this? I'd be happy to try a small video on this in the near future.
Thanks again for the kind words, much appreciated!
@@bugbytes3923 Nice! Much appreciated, let the countdown begin :)
I'm a noob in GeoDjango/GIS, even building up models and deciding where to store the data was a struggle.
My goal is to setup GeoDjango+rest as a backend for serving hiking tracks and hiking related pois (parking, viewpoints, shelter, fresh water).
Maybe using Nextjs as frontend. I know this is a hairy goal for me, but man I'm learning a lot!
Let me prepare a gh repo to share. Is it OK for you I make a private GH repo where I can invite you to join?
some django content again, thank you !
Thanks! The next month will be full of Django ;)
Very great content !
Thanks as always!
Thank you so much for all this useful content!!! Could you please tell me where you're from? I've been following your videos for over a year now, and this accent is starting to drive me crazy!
Thank you for the support! The accent is from Glasgow, Scotland!
@@bugbytes3923 thanks for the reply :)
NO idea what your doing but I love your Scottish accent
Haha glad you like the accent!
nice content🤯
Thanks a lot!
good thank you
Thanks!
Thank you
Thanks for watching!
Thank you for django videos.
Can you create a video how to perform each type of sql joins in django...I would be great help
Thanks! Great suggestion, will add it to the list.
Can you create video about docker + django? And maybe then deploying a project to Ubuntu. Not on heroku or netlify but to classical clean Ubuntu server. That would be very interesting.
Great suggestion! I've got plans for deployment videos, and deploying to an Ubuntu instance would definitely be interesting. I'll see what I can do soon!
thank you
Thanks a lot for watching!
Hi
thanks for this, I have been following this series for quite some time.
I would like to know if you plan to also push the code to github.
Thanks! I could put the final models.py file on there, if that would be helpful?
@@bugbytes3923 Thanks for replying back. Yes that would suffice the need. Thank you.
thanks for your videos but I want to ask you there's video you have done about notification with channels and websocket is it possible to do notofication with django by using htmx, alpine, hyperscript with wsgi or it is not possible?
please tell me
I would recommend ASGI + django-channels for this, if possible. Or some other WebSocket package.
With WSGI, it is definitely possible, I would think - but I've no experience with that, to be honest.
am trying to figure it out, i have a rural and a urban properties, how do i build my models? should i create a models for each of than and them apply a foreing key to a listing models ?
Could you make a latest way on like setting up social logins like with google and facebook using DRF. Many libraries are being broked.
Good suggestion! Will add it to the list.
I have a question regarding database management, what is the best way to create database tables for multiple clients (small businesses), is creating a business model enough to separate the databases between them or is there a better practical way ?
I'd recommend a package like django-tenants for separation of tables for each client. This basically works by using a single database, but creating multiple schemas within the database - one per client. Each client can therefore have the same tables, but separated into their own schema.
pypi.org/project/django-tenants/
Would a video on this be useful?
@@bugbytes3923 thanks for the reply, it sure will be helpful thank you again I appreciate the effort
I never knew about the @property decorator in models - if I were using FastAPI as a microservice and SQLAlchemy, could I do the same? Is it inadvisable to have more complicated methods as @property?
Also, for some reason, your accent makes me pay attention better.
Thanks! Yes - properties are something provided by Python classes, so they can also be used with SQLAlchemy in exactly the same manner.
I would advise against doing anything too complicated in a property, particularly if it involves reaching beyond the model class for external dependencies or performing additional SQL queries, etc. For simple stuff, it's perfect though.
My problem is I can use property for indexing and filtering
Hello @bugbytes3923, can you please do a video on hxhtml2pdf, PLEASE, because there is a function provided in the documenention about how to Convert HTML URIs to absolute system paths so xhtml2pdf can access those
resources, it returns an error, i have tried to find the problem but i havent got the solution, I HOPE YOU WILL CONSIDER THIS!!!!
Problem
CharField need blank=True, null=False
Because db have two value ‘’, None
Confuse read db
Restaurant.objects.filter(nickname=‘’) or Restaurant.objects.filter(nickname_isnull=True)
The solution for a CharField would be to disallow Null values, and make the default an empty string.
Even though it is a CharField, I prefer to set NULL values on the database side.
CharField(null=True)
Storing a blank string still constitutes a value, whereas NULL itself signifies the absence of a value. If you store blanks in the database for a CharField where there should be no value, you will end up with various types of empty strings:
(i) ""
(ii) " "
(iii) " "
(iv) " "
(v) " "
It's better to use null=True even with CharField type of field.
When you use Django's save method or objects.create()
, it checks for values in this sequence for any absent field :
First priority: Use the default value if provided in the model field.
Second priority: Use NULL if null=True is provided in the model field.
Third priority: Use an empty blank string (irrespective of whether blank=True is provided or not), because you can't prevent Django from storing nothing on the database side. Django is frustrated now.