Komentáře •

  • @Pyplane
    @Pyplane Před 3 lety +8

    Hi again! Many of you asked me about the source code. It's available now at: github.com/hellopyplane/QR-codes-in-Django

  • @810Teams
    @810Teams Před 3 lety +10

    6:20 For those who're having problems with the QR code's image size, replace line 17 with `canvas = Image.new('RGB', (qr_code_image.pixel_size, qr_code_image.pixel_size), 'white')` to make the image size automatically configured.
    Btw, nice video. This literally saved me quite time!

    • @Pyplane
      @Pyplane Před 3 lety

      Thanks for the comment and for the remark on this! Cheers :)

    • @rubel1477
      @rubel1477 Před 3 lety

      Thanks

  • @Pyplane
    @Pyplane Před 4 lety

    Hi Guys. Thanks for watching this video! If you're interested in Data Science, I have a FREE DS with Django course on my channel available under this Link: czcams.com/video/bLidW4iByqo/video.html

  • @wolfisraging
    @wolfisraging Před 3 lety +1

    Excellent video buddy. Keep it up, CZcams seriously need good Django tutorials like this. Thanks.

  • @hervebineli5327
    @hervebineli5327 Před 3 lety +1

    Thank you very much for this video. Very clear and very well explaIned. Keep going on that way. I'm one of your followers.

    • @Pyplane
      @Pyplane Před 3 lety

      Thank you very much !! :)

  • @olaidealaka6802
    @olaidealaka6802 Před 2 lety

    Just what I was looking for. Thank you!

    • @Pyplane
      @Pyplane Před 2 lety

      Thanks for watching!

  • @mustang174
    @mustang174 Před 11 měsíci

    Excellente video. thanks a lot

  • @sandeshbthapa2644
    @sandeshbthapa2644 Před 3 lety

    i was trying to make a form where you type name and it will be saved on out miodels and later we could see that but i dont know how to override the super save function we declared on our models

  • @madiyarniyazkhanov4916

    thank you from Kazakhstan

  • @franciscovinuesa7908
    @franciscovinuesa7908 Před 2 lety

    How many scans have these qrs ? could you cap those scans ? thank you

  • @JuanitoOrtega
    @JuanitoOrtega Před rokem

    Thank you. Excuse me, how I can customize the image?.. For example: version, box_size, border?>>>

  • @vinsmokearifka
    @vinsmokearifka Před 3 lety

    Life saver, thanks

    • @Pyplane
      @Pyplane Před 3 lety

      Thanks for watching!

  • @Hamza-nu3xj
    @Hamza-nu3xj Před 2 lety

    This is very good example but when we use many to many relationship in models the qrcode doesnt give the tag names properly

  • @oshershukrun4217
    @oshershukrun4217 Před 3 lety

    Hey dear, Lets say i want to do a reffer to profile1?id=3, profile2?id=5

  • @Hamza-nu3xj
    @Hamza-nu3xj Před 2 lety

    How can we use this on many to many relationship?

  • @vuctuc737
    @vuctuc737 Před 3 lety

    Wow.

  • @gustinfauziah9231
    @gustinfauziah9231 Před 3 lety

    Hi. Thanks for the video. I keep getting an error "TemplateDoesNotExist at /home.html"
    Please help.

  • @xBrenn4n
    @xBrenn4n Před 3 lety

    Can i edit the qr code url later if i want to change where thw qr code redirects me?

    • @Pyplane
      @Pyplane Před 3 lety

      Hi. The qr code will be updated everytime you save the object. So if you change i.e. website from pyplane.com to youtube.com - the qr code will change

  • @oumaymasaddam5000
    @oumaymasaddam5000 Před 3 lety

    i have this error please help !
    AttributeError: 'Settings' object has no attribute 'MEDIA_Root'

  • @mehedihasannasim-
    @mehedihasannasim- Před 2 lety

    you showed the name in qrcode, how can i show more than name from database in qrcode? its just show self.name

  • @mamangcikal1255
    @mamangcikal1255 Před 4 lety

    thank u so much bro, but can we do a scan then the scan adds the quantity of an item?
    thanks for supporting Django community

    • @Pyplane
      @Pyplane Před 4 lety +1

      Hello Leric. I'm trying to understand what is the purpose of this solution. Besides you will be scaning the qr code with a smart phone, right? If you want to generate more than one QR code you can easily create a qr code generator. It can do a various things... i.e. generate QR codes which are the same (you choose the quantity) or for example you can create random qr codes based on random strings. Regards, Luke

  • @rlgraner
    @rlgraner Před 3 lety +2

    Thanks for the video, it helped me a lot. For production, I had to set DEBUG to False, but when debugging is disabled, the image is not displayed. Any idea to solve it.

    • @Pyplane
      @Pyplane Před 3 lety

      Hi Ricardo. You mean qr codes are not displayed or other images as well? I suggest to contact the hosting company customer service and ask for the proper media/static files for production

    • @rlgraner
      @rlgraner Před 3 lety

      Hi@@Pyplane. Thank you very much for your quick response. All images, including the QR code, are not displayed. But that only happens when I change DEBUG to false. The problem also happens on the localhost.

    • @Pyplane
      @Pyplane Před 3 lety

      @@rlgraner for local this is normal if you change debug to false, for going to production remember to fill out allowed hosts in the settings file and contact the hosting customer service to get the right configuration or try to find it online. good luck!

    • @hervebineli5327
      @hervebineli5327 Před 3 lety

      @@rlgraner Hi, try to use the package Whitenoise, it will save you from headaches whit serving Django static files in production.

  • @miles2590
    @miles2590 Před 3 lety

    Hi, do have a video on qrcode scanner using django? since qrcode is generated in djagno, I think, qrcode should be scan using djagno too. that would be great tutorial.

    • @Pyplane
      @Pyplane Před 3 lety +2

      hi. in order to scan the qr code you need to have access to the camera. In django I don't it's possible. At least I don't know how to do it. It's quite easy if you are a mobile app developer using react native

    • @miles2590
      @miles2590 Před 3 lety

      @@Pyplane hi, thank you for the information.

  • @rahulmullick7316
    @rahulmullick7316 Před 3 lety

    awesome....! sir please build social-media websites....!

    • @Pyplane
      @Pyplane Před 3 lety +1

      Thank you! :) I will make another social network project this time using django, drf and react js... coming soon :)

    • @rahulmullick7316
      @rahulmullick7316 Před 3 lety

      @@Pyplane pretty impressive...! i'm waiting for this...! thank you.....!

  • @josephsierra1961
    @josephsierra1961 Před 3 lety

    Hi!
    This work perfect for string under 15 characters.
    When i want to convert an string ith 15+ characters it gives me like an off-screen qr that my cellphone cant read.
    Can u help me?

    • @josephsierra1961
      @josephsierra1961 Před 3 lety +1

      I think that was pretty logic haha
      Just adjust that 290,290 to bigger values.
      Thank you for your videos :D

    • @Pyplane
      @Pyplane Před 3 lety +1

      Hi Joseph. Just tested scanning qr codes with 20 characters - works every time. Difficult for me to write anything more not knowing the details.

    • @josephsierra1961
      @josephsierra1961 Před 3 lety +1

      Ty very muchm
      Idk why that happened but I fixed it just changing the values to:
      Image.new('RGB',(360,360), 'white') when creating the canvas.

    • @Pyplane
      @Pyplane Před 3 lety

      @@josephsierra1961 Awesome! Happy you figured it out :)

    • @alexis3170
      @alexis3170 Před 3 lety +1

      @@josephsierra1961 Thanks for this, spent hours looking online for answers to why my qrcode couldn't be scanned. Dynamically generating qrcodes in Django is a surprisingly obscure topic.

  • @bryancirelly8116
    @bryancirelly8116 Před 4 lety

    Hello, excellent content, it was very useful for me to my final project. Now, how can i read a qr code with camera in django?

    • @Pyplane
      @Pyplane Před 4 lety

      Hi Bryan. In django you just create qr codes which you can read by your phone. If you are using iphone you even don't have to install any app - just open up the camera and skan the code :)

    • @bryancirelly8116
      @bryancirelly8116 Před 4 lety

      @@Pyplane oh bro sorry for my bad explanation, i want to read each qr code inside application to get scanned user profile. How can i do it?

    • @Pyplane
      @Pyplane Před 4 lety

      Bryan Cirelly still not sure I understand (sorry). The qr code should be based on the user profile? I created a qr code based on pyplane.com , in your case I would try to add a qr code to the profile model, so for each user you will have a value to put in the qr code. In example yoursite.com/profile1

    • @bryancirelly8116
      @bryancirelly8116 Před 4 lety

      @@Pyplane Sorry I'm bad at explaining, I'll try again being a little more specific. I have a patient profile that generates a qr code with their identification number, which would be printed (for when I attend a medical consultation). Within the application I need a scanner that reads the code and sends me directly to your profile. This to automate the search process within the app.

    • @Pyplane
      @Pyplane Před 4 lety

      ​@@bryancirelly8116 A patient comes, gives you his card where there is a qr code. You then decide to scan it with your phone? Unless you have a mobile app for this - I don't understand it. I would create a barcode generator and buy a scanner for $50, then I would place the barcodes on the patient card (instead of qrcode)...and you don't need your phone, everything can be taken care of from 1 app

  • @nelsonkehinde4303
    @nelsonkehinde4303 Před 4 lety

    Hi. Thanks for the video. I keep getting an error - "qrcode has no attribute 'make'". Please help.

    • @nelsonkehinde4303
      @nelsonkehinde4303 Před 4 lety

      Hi. Please reply

    • @Pyplane
      @Pyplane Před 4 lety +1

      Hi Nelson. Sorry for the late response. It's difficult for me to say anything without seeing your project code. If you follow the tutorial exactly step by step, such error should not take place. I use quite often qrcodes in the projects that I'm doing and never got such error. Sorry that I can't help on this. Regards, Luke

    • @nelsonkehinde4303
      @nelsonkehinde4303 Před 3 lety

      @@Pyplane okay. Thank you. Maybe I did something wrong. I have checked severally times till.... let me do it all over again one more time

    • @Pyplane
      @Pyplane Před 3 lety

      @@nelsonkehinde4303 In case of problems you can write me an email info@pyplane.com

    • @nelsonkehinde4303
      @nelsonkehinde4303 Před 3 lety +2

      @@Pyplane Hi again, I created it all over again step by step and i got it this time. THank you very much. You're wonderful! Lol

  • @november_pain
    @november_pain Před 3 lety

    How to make it so photo will be deleted automatically after you delete it from db?

    • @JesusGil90
      @JesusGil90 Před 3 lety +1

      i think you should read about signals (pre_delete) and delete the file "manually"

  • @forumkoding5921
    @forumkoding5921 Před 3 lety

    How to display the id instead of the item name? I have tried to replace the name with the id but the results are not displayed when the scan is done
    Thank you very much

    • @forumkoding5921
      @forumkoding5921 Před 3 lety

      because I need to be able to display the id when the scan is done

  • @suleymanefecelik8750
    @suleymanefecelik8750 Před 3 lety

    Thank you so much, but images create twice. How can fix it? (qr-code-a.png
    and qr-code-a_St8BXhq.png)

    • @Pyplane
      @Pyplane Před 3 lety

      Hi. Check your code to the one on source code available on github. The code presented there saves only one image. Good luck!

    • @suleymanefecelik8750
      @suleymanefecelik8750 Před 3 lety

      @@Pyplane I checked.
      def save(self, *args, **kwargs):
      qrcode_img = qrcode.make(f'192.168.1.50:8000/a/{self.business.pk}/{self.pk}')
      canvas = Image.new('RGB', (qrcode_img.pixel_size, qrcode_img.pixel_size), 'white')
      canvas.paste(qrcode_img)
      fname = f'qr-code-{self.name}.png'
      buffer = BytesIO()
      canvas.save(buffer, 'PNG')
      self.qr_code.save(fname, File(buffer), save=False)
      canvas.close()
      super().save(*args, **kwargs)
      I can't see any issiue

    • @suleymanefecelik8750
      @suleymanefecelik8750 Před 3 lety

      @@Pyplane Ooo I did. Ty :D

    • @JesusGil90
      @JesusGil90 Před 3 lety

      @@suleymanefecelik8750 how did you do it?

    • @JesusGil90
      @JesusGil90 Před 3 lety

      id None -.-

  • @dibri
    @dibri Před 3 lety

    i need help. doesnt work. cant save in the admin without providing a photo

    • @Pyplane
      @Pyplane Před 3 lety

      Hi. If it doesn't work please check the source code and compare to yours. I'm dropping the link here: github.com/hellopyplane/QR-codes-in-Django

    • @Pyplane
      @Pyplane Před 3 lety

      btw. if you named the qr_code field as photo make sure to set the imagefield as blank=True

    • @dibri
      @dibri Před 3 lety

      Hey I already referred to your github but still nothing is there anyway to reach you personally? Maybe discord? Or email?

  • @sakilanasrinsetu1057
    @sakilanasrinsetu1057 Před 3 lety

    This video is really awesome. But how to create qr code for multiple data?

    • @Pyplane
      @Pyplane Před 3 lety

      Hi Sakila. I honestly haven't tried that so I can't answer your question

    • @JesusGil90
      @JesusGil90 Před 3 lety

      maybe like string "json" style

    • @mohamedfowzan8828
      @mohamedfowzan8828 Před 2 lety

      ​@@JesusGil90 is there any reference to that? to generate qr code with json string in django?

    • @mohamedfowzan8828
      @mohamedfowzan8828 Před 2 lety

      @@Pyplane is there any reference to that? to generate qr code with json string in django?

  • @alvinng8338
    @alvinng8338 Před 3 lety

    Hi, sir, how if i want to have not just Name only from QR code, for example, I want to scan the QR code to retrieve the information of a profile like the username, address, email.... is it possible?

    • @Pyplane
      @Pyplane Před 3 lety

      Hi Alvin. I’m doing the things you mentioned like this: I use the qrcode instead of pk in a mobile app. So once I scan the code a proper screen appears with all the details. We will create a similar app here on the channel in the near future. If you are looking for a different solution you’ll need to do the research on your own. Good luck!

  • @MuhammadDavi
    @MuhammadDavi Před 3 lety

    you declare draw variabel, but you don't use that....what for draw variable?

    • @Pyplane
      @Pyplane Před 3 lety +1

      You're right. I was doing experiments with image new and image draw - both solution did work but accidently I added here image draw (although I wanted to present the other solution). You can ignore this line

    • @MuhammadDavi
      @MuhammadDavi Před 3 lety

      @@Pyplane okey, thanks

    • @MuhammadDavi
      @MuhammadDavi Před 3 lety

      @@Pyplane if i want add logo in my qr code, how i can read file image from static folder to my model?

    • @Pyplane
      @Pyplane Před 3 lety

      @@MuhammadDavi it would be easier if you would put the logo and the image to a pdf. That's usually what I'm doing

    • @MuhammadDavi
      @MuhammadDavi Před 3 lety

      @@Pyplane do you have blog or video that I made a reference? thanks

  • @foresttreehouse
    @foresttreehouse Před rokem

    First of all, great video, it really helped me a lot. But after experimenting a little bit I think creating the canvas with Image and ImageDraw isn't actually necessary, it works just the same if you delete all code related to that and replace canvas.save(buffer, 'PNG') with qrcode_img.save(buffer, 'PNG'). Still, I like your approach to the problem so thumbs up!

  • @rajshah7940
    @rajshah7940 Před 3 lety

    at least post github link