Image File Upload to User Profile Model | Django (3.0) Crash Course Tutorials (pt 17)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 215

  • @junecnol79
    @junecnol79 4 ปีที่แล้ว +44

    0:50 adding ImageField in Model
    2:52 set MEDIA_ROOT in settings.py
    5:30 add MEDIA_URL in urls.py urlpatterns
    11:30 add input image field in view and template
    15:07 default image

  • @balaji8427
    @balaji8427 3 ปีที่แล้ว +11

    best Django playlist on youtube.
    I learned a lot throughout the series from basics to advance, to create an entire application
    with covering concepts, thank you man

  • @brownhillobinna9045
    @brownhillobinna9045 4 ปีที่แล้ว +2

    Hey Brother , I really want to appreciate your work. I say a whole bunch of THANK YOU. I jumped to Python from PHP and for months now it have been very difficult till i saw your videos.
    this is the very first youtube channel i have subscribed to. God bless you for me .

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      So happy to hear that! Best of luck to your studies and I hope my videos continue to help you! I welcome your blessings :)

    • @brownhillobinna9045
      @brownhillobinna9045 4 ปีที่แล้ว

      @@DennisIvy Yes Boss, I really am following you all the way.

  • @robxnguyen
    @robxnguyen 2 ปีที่แล้ว

    Dennis, no lie you have the BEST django react tutorials out there. Keep it up, you're big but you deserve 20x the subs.

  • @hemantagarwal6388
    @hemantagarwal6388 4 ปีที่แล้ว +21

    I think you have explained concepts very well as compared to others in youtube(django).

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      Thank you Hemant :)

  • @priteshwani5570
    @priteshwani5570 4 ปีที่แล้ว

    The keyboard clicks are too good and satisfying... and the Tutorial is very clear and easy to understand

  • @jimshapedcoding
    @jimshapedcoding 4 ปีที่แล้ว

    That might be the best tutorial on TH-cam that explains the whole ImageField process. Thanks Dennis

  • @frost1204
    @frost1204 3 ปีที่แล้ว

    I LOVE YOU BRO. SAVED ME A LOT OF TIME . Hands down one of the best coding tutorials out there !!!!

  • @JustForFun1426-t4k
    @JustForFun1426-t4k ปีที่แล้ว

    It is my first time to watch your tutorial.
    You are so wonderful!

  • @ritiksaxenaofficial
    @ritiksaxenaofficial 4 ปีที่แล้ว +20

    Hey Dennis, there is a small problem. When a user registers then a default image is set to his/her profile. Then if user adds/uploads a new profile picture then the default profile image will be overwritten with the new one. Now the problem is if the user clears/deletes his/her profile picture instead of choosing/uploading another one, then there will be no file in the 'profile_pic' field. And this causes an error when trying to go to the 'setting' URL.
    So what I came up with is not to set a default file in ImageField, and fetch the default image if the user has no profile image in the 'profile.html' template.
    In profile.html:
    {% if request.user.customer.profile_pic %}

    {% else %}

    {% endif %}

    • @ОлесьУкраїнський
      @ОлесьУкраїнський ปีที่แล้ว

      Haha, I did exectly the same and it's working.
      Geniuses think alike.xD

    • @Copt774
      @Copt774 4 หลายเดือนก่อน

      this is the simplest solution! thank you. Also just note that I had to add {% load static %} to the page in order for this to work

  • @WhitneyChakara
    @WhitneyChakara ปีที่แล้ว

    I'm so tired that I just tried to close YOUR tabs. On a brighter note, this tutorial was really easy to understand and very clear.

  • @paristonhill2752
    @paristonhill2752 4 ปีที่แล้ว +8

    When we update the image, the old image stays in the images file, how do we get rid of that?

  • @DarkStarRules
    @DarkStarRules 3 ปีที่แล้ว +10

    For Django 3.1, for the MEDIA_ROOT variable in settings.py, do this: MEDIA_ROOT = BASE_DIR/"static/images"
    If that doesn't work, then see if your static folder is somehow not in the same directory or just in your accounts folder (like it was for me). Move it to outside the accounts folder.

  • @MRROCKMAST
    @MRROCKMAST 4 ปีที่แล้ว

    I have been following this entire series. Very helpful and informative, looking forward to watching more educational content produced by you Dennis. Thank you for your effort!

  • @Copt774
    @Copt774 4 หลายเดือนก่อน

    Thanks for all your content! You said that a redirect needed to be added upon saving the form in the accountSettings function but didnt add the code for us. I realized without it, when the form is submitted it would not show the updated form information (e.g. if you delete an image or add one, you'd have to manually refresh the page, which could lead to duplication of data). So for anyone reading, add this after form.save()...... return redirect('/account')

  • @НикитаПосмак
    @НикитаПосмак 4 ปีที่แล้ว

    Спасибо!) Без вашего курса я бы еще долго думал почему выводиться imagefield.)

  • @IJaba27
    @IJaba27 3 ปีที่แล้ว

    If you are running your server at the beginning just after inserting in the Customer model the profile_pic's Image field, a red message will tell you, "Cannot use ImageField because Pillow is not installed"
    Just CTRL+C when running server and run the following command : python -m pip install Pillow
    For information, Pillow is a Python module responsible for opening/importing pictures, and Django seems to be using it in its backend to manage pictures.

  • @johndwick792
    @johndwick792 4 ปีที่แล้ว +5

    django 3.1 version -
    urlpatterns = [
    ...
    ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

  • @DejAyEnterprise
    @DejAyEnterprise 4 ปีที่แล้ว +1

    Hi Dennis, thanks for this excellent contribution to the developer community. Having gone through your tut, it seems like it is designed for a call-in order system whereby only an admin can create, update, or delete an order. I tried modifying some of the templates and scripts to enable a user create, update, delete an order from their user template but not successful. This is because the respective tables need reference (primary key) to a customer and/or order to work. Not sure how to modify code to recognize that current user/customer is the pk (id) that should be referenced. I agree that only an admin should be able to see all customers and their orders but each customer should be able to not only see their own orders but be able to generate new orders, update or delete current orders that have not been shipped. Your help is appreciated sir. And I welcome those who may have answers to this inquiry to so provide with equal gratitude from me to you.

    • @yadjnishnursiah8621
      @yadjnishnursiah8621 4 ปีที่แล้ว

      I have a problem in my website. Whenever i create an account for someone, his profile is shown in the navigation bar. But whenever i clicked on his profile, it is showing me errors, but if i login as an admin and add that person as a customer, now he will be able to click on his profile. Can anyone solve this problem for me please ? I want to make it like someone signs up and login as a customer automatically and view his profile without the admin to accept him as a customer and not showing the error !!!

  • @chrisbawizs8175
    @chrisbawizs8175 4 ปีที่แล้ว +5

    hey plz can you plz make a video talking of how to crop an image when uploading
    plz like talk about jcrop, and thanks for the explaination above

  • @PythonCareerCoach
    @PythonCareerCoach 4 ปีที่แล้ว +1

    Hello Dennis,
    Why we changed john's user at last and gave it to eric ? ( May be little stupid question , but please explain once :P)
    I belive , to remove the picture of john and assign it to eric so that john will get default picture ?

  • @louzynerd129
    @louzynerd129 4 ปีที่แล้ว +2

    i get this error when i press on the settings from the web site
    ValueError at /account/
    The 'profile_pic' attribute has no file associated with it.
    Request Method: GET
    Request URL: 127.0.0.1:8000/account/
    Django Version: 3.1.2
    Exception Type: ValueError
    Exception Value:
    The 'profile_pic' attribute has no file associated with it.
    what should i do?

  • @adityarathod05
    @adityarathod05 3 ปีที่แล้ว +1

    Hi Dennis I am getting following error
    "The 'profile_pic' attribute has no file associated with it."
    pls help

  • @ThePassportPapi
    @ThePassportPapi 4 ปีที่แล้ว +1

    how would you allow a user to add more than one image? but still require at least one image

  • @gel.ventures
    @gel.ventures 3 ปีที่แล้ว

    Tutorial on how to place order as customer would be great!

  • @mynameismynameis666
    @mynameismynameis666 4 ปีที่แล้ว +1

    not working with a default user_directory_path function?

  • @RonyEfendy
    @RonyEfendy 4 ปีที่แล้ว

    New version of Django. Great!

  • @tejaspachpile9269
    @tejaspachpile9269 4 ปีที่แล้ว +1

    how can i design the image field like hide the choose file and currenty showing image url like that.

  • @ionutmuntean2177
    @ionutmuntean2177 2 ปีที่แล้ว

    05:50 how come we only do this import "from django.conf import settings" only now, in the 17th video in the series? I mean... if I recall correctly, you mentioned at various times among the videos that we should be defining some variables there... so I am assuming that so far Django saw those variables... why we need to do the import just now?

  • @ind-ram
    @ind-ram 3 ปีที่แล้ว

    in customers you are setting users manually how to do it dynamically i.e when the user registered the user field in customer sets automatically

  • @riyasalunkhe2495
    @riyasalunkhe2495 3 ปีที่แล้ว

    @Dennis Ivy My CSS styling to the status on dashboard is working but styling is not working when I add style of the profile-pic in main.css file. What is wrong in my program? help me out.

  • @akshatsrivastava6840
    @akshatsrivastava6840 4 ปีที่แล้ว

    I am working on a project of website and got some bugs and error in uploading image and creating that site with the help of django ...but i found your channel and django tuturial thanks for teaching us sir

  • @ezekielnyamle6509
    @ezekielnyamle6509 3 ปีที่แล้ว

    Thank you Dennis for your wonderful tutorial videos. I got two solutions from your channel

  • @arek6296
    @arek6296 ปีที่แล้ว

    Thanks, amazing tutorial

  • @ВладиславБайдин-и5п
    @ВладиславБайдин-и5п 4 ปีที่แล้ว

    I didn't understand. You created OneToOne relationship Customer model and User default model, ok. When new user will register on the site, how does system bundle new registrated User to your Profile model, it can do it only manual in admin panel, don't it?

  • @abdelrhmanahmed1378
    @abdelrhmanahmed1378 3 ปีที่แล้ว

    first time we pass the instance argument to populate the from ,put why we pass it the second time ?! and why if remove it the form will not change , and with creatorder we didnot use instance

  • @RydenEden
    @RydenEden 4 ปีที่แล้ว

    i dont have a field im trying to add it with the command prompt becasue there is no log in it is a basketball website, how do i do that

  • @amitpatil515
    @amitpatil515 4 ปีที่แล้ว

    Change
    from django.conf.urls import static
    to
    from django.conf.urls.static import static
    and you're good to go.
    Those who are getting prb

  • @siddharthjain6719
    @siddharthjain6719 2 ปีที่แล้ว

    Thankyou very much!! Very well explained 😄

  • @electricimpulsetoprogramming
    @electricimpulsetoprogramming 3 ปีที่แล้ว

    Change
    from django.conf.urls import static
    to
    from django.conf.urls.static import static
    and you're good to go.
    Those who are getting problem

  • @aavlasti
    @aavlasti 4 ปีที่แล้ว

    Why if we create a new user and then go to admin panel click on Customers the email address is not filled with the email address that we give when we were registered?

  • @KingQAT
    @KingQAT 4 ปีที่แล้ว +5

    after adding the changes everything works except 'Add order' , keep giving me this error : TypeError at /admin/accounts/order/add/
    __str__ returned non-string (type NoneType)
    Anyone have a clue how to solve this?

    • @redabekka5940
      @redabekka5940 4 ปีที่แล้ว +1

      i have the same error did u solve the problem ?

    • @rupanshiagarwal4862
      @rupanshiagarwal4862 4 ปีที่แล้ว

      i have the prblm too

    • @LuisMendez-mi7jz
      @LuisMendez-mi7jz 4 ปีที่แล้ว

      Maybe it is because one of your fields has a null value so when it tries to be returned by __str__ function his value returns NoneType instead, which is a null value

    • @syrgakomuraliev
      @syrgakomuraliev 4 ปีที่แล้ว

      You need to set (blank='True', null='True') to your fields. I had the same problem and it worked for me

    • @unuefeejovwoke6609
      @unuefeejovwoke6609 3 ปีที่แล้ว

      @@syrgakomuraliev to all fields or just the customer

  • @benabdallahrahma8245
    @benabdallahrahma8245 3 ปีที่แล้ว

    hi thank you for your content , but what can i do to store images in a mangodb ? and update it retrieve it dynamically?

  • @yusuffabdulmusawwir6807
    @yusuffabdulmusawwir6807 2 ปีที่แล้ว

    What's the difference between the user and the customer?

  • @hemantgiri2377
    @hemantgiri2377 4 ปีที่แล้ว

    omg thank you soo much. I was literally looking for this

  • @brownhillobinna9045
    @brownhillobinna9045 4 ปีที่แล้ว +1

    Please when you are done with this video series, will you consider the school management system or just report card management system i earlier pleaded for?

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      Sorry totally forgot to address that. It's been requested alot so I probably will make one but I have a list of videos & series I need to complete before that.
      1 - Django Crash course series (This course)
      2 - Django Rest (API) Framework Course
      3 - Twitter Clone App
      4 - Django Live Chat App
      5 - Django React To DO app
      After these I'll have to give it a shot :) Sorry i hope you understand, I get alot of requests.

    • @brownhillobinna9045
      @brownhillobinna9045 4 ปีที่แล้ว +1

      @@DennisIvy i totally understand and appreciate. which ever way it is I'm learning. Thanks a lot Boss

  • @chelseafan1693
    @chelseafan1693 3 ปีที่แล้ว

    Dennis please make a video how to upload several images in one post

  • @abcrectify6916
    @abcrectify6916 4 ปีที่แล้ว +1

    make a video on upload image as a input file using html , don't use inbuilt form method for uploading image

  • @prachikhetwal2196
    @prachikhetwal2196 4 ปีที่แล้ว

    Hi Dennis , can you please specify about all the pip installs as multiple errors are arising on running the github code , when I am applying runserver command errors like :< frozen importlib ._bootstrap>,no module named widget_tweaks are coming up , also the __init__.py file is not showing in templates directly,
    any help would be appreciated Thanks..

  • @DennisIvy
    @DennisIvy  4 หลายเดือนก่อน

    Don't forget to check out my Complete Django course! dub.sh/NvGboTI

  • @hroman_codes
    @hroman_codes 2 ปีที่แล้ว

    Thank you this was super helpful!

  • @DarkStarRules
    @DarkStarRules 3 ปีที่แล้ว

    For anyone, if for some reason when you click on profile1.png it says that the image has not been found, make sure that the static folder is NOT in the accounts folder. I somehow made this mistake like 10 tutorials ago and just realised it now.

  • @work9167
    @work9167 3 ปีที่แล้ว

    You're great, man!

  • @luccatsoares
    @luccatsoares 3 ปีที่แล้ว

    Amazing Video!! how can I add the model custumer automatically to a user?

  • @mdbelalhosen5898
    @mdbelalhosen5898 4 ปีที่แล้ว

    image upload not working on heroku live... though works locally ....need your help badly dennis

  • @aishu812
    @aishu812 4 ปีที่แล้ว

    HELLO DENNIS,I could not see the customer name at the customer field of the admin panel after using that User field in the customer model.. so I couldn't upload the customer photo through the admin panel initially..

    • @aishu812
      @aishu812 4 ปีที่แล้ว +1

      I could not see the newly created customer after using the User field in the customer model...

  • @Magistrado1914
    @Magistrado1914 4 ปีที่แล้ว

    Excellent course
    21/07/2020

  • @Необест
    @Необест 4 ปีที่แล้ว

    Thanks a lot, I searched for it all day yesterday!!!

  • @brownhillobinna9045
    @brownhillobinna9045 4 ปีที่แล้ว +1

    Please again are you using django 3 or 2.1 as I saw in video 1?
    Can you do a school management system after this series? while student an view their report card, profile, update profile, view invoice view teacher , teachers can upload result, I hope you get what i am trying to say. (for a secondary school). please reply .

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      We started with django 2.1 but all source code was updated to 3.0. Honestly not much of a difference between the two since we're not using many 3rd party packages.

    • @brownhillobinna9045
      @brownhillobinna9045 4 ปีที่แล้ว

      @@DennisIvy Ok Thanks for the really.

  • @GodwinStefanSalvatoreAddo
    @GodwinStefanSalvatoreAddo 4 ปีที่แล้ว +1

    Great tutorial as usual, could you consider adding a validation to check mime types and file size before upload? that would be great. wouldn't want anyone uploading a 50mb pdf file as a profile photo.. right?

    • @hansenlobo
      @hansenlobo 4 ปีที่แล้ว

      I think we can set validation by checking the file extension...

    • @noah5592
      @noah5592 2 ปีที่แล้ว +2

      @@hansenlobo yes that would be good but also file size we dont want 20k photo taking up our space

  • @juneyou9207
    @juneyou9207 4 ปีที่แล้ว

    Thank you Dennis 👏👍👍👍

  • @ryan_0337
    @ryan_0337 4 ปีที่แล้ว +1

    Hey Dennis,
    Do you know when will be the last video of this tutorial ?
    Because I want to learn how to deploy the app.

    • @zulqarnainbutt9473
      @zulqarnainbutt9473 4 ปีที่แล้ว

      He already has a video on that. Check his playlist where there is another series of django related.

    • @acctivacct4709
      @acctivacct4709 4 ปีที่แล้ว

      th-cam.com/video/Wa8O5lL_d0M/w-d-xo.html

    • @ryan_0337
      @ryan_0337 4 ปีที่แล้ว +1

      I know but can I modify my app.
      After launching it on Heroku
      Thanks for your advice guys

    • @cse2357
      @cse2357 4 ปีที่แล้ว

      @@ryan_0337 Yes, You can. After modifying You have to just push on Heroku your updated app

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +6

      Hey Ryan! Yes I will be releasing a video on that soon for this project. Thanks for mentioning that video Zulqarain, but i will be coming out with another with more details since that was an old video of mine and I didn't explain alot there.
      Here are the next videos in the series:
      1 - Django Signals
      2 - Password Reset email
      3 - Postgresql database
      4 - Pushing Django Live to heroku
      5 - Django Static files on AWS S3 Buckets
      6 - Postgres Database hosted on AWS RDS
      This order may change a little but this should give you an idea

  • @pranayraj6295
    @pranayraj6295 4 ปีที่แล้ว +3

    Am getting a ValurError at /account/
    The 'profile_pic' has no file associated with it.
    Can anyone pls tell me how to solve this!!

    • @syrgakomuraliev
      @syrgakomuraliev 4 ปีที่แล้ว +1

      Have you solved that problem ?

    • @pranayraj6295
      @pranayraj6295 4 ปีที่แล้ว

      @@syrgakomuraliev no

    • @syrgakomuraliev
      @syrgakomuraliev 4 ปีที่แล้ว +1

      Pranay Raj Worshipper I think u should create a new user and he will have a default pic. It worked for me

    • @pranayraj6295
      @pranayraj6295 4 ปีที่แล้ว

      @@syrgakomuraliev Yeah will try, thanks by the way

    • @ritiksaxenaofficial
      @ritiksaxenaofficial 4 ปีที่แล้ว +2

      @@syrgakomuraliev what I have done for default profile picture is adding conditional statement in profile.html template:
      {% if request.user.customer.profile_pic %}

      {% else %}

      {% endif %}

  • @bekzodnegmatillaev8974
    @bekzodnegmatillaev8974 4 ปีที่แล้ว +1

    at the customers page on admin it created "-" and once i click or delete it, it says: __str__ returned non-string (type NoneType)

    • @Martin-Mwiti
      @Martin-Mwiti 4 ปีที่แล้ว

      In the models.py file under Customer model, change to ```def __str__(self):
      return str(self.name)``` . Worked for me.

    • @bekzodnegmatillaev8974
      @bekzodnegmatillaev8974 4 ปีที่แล้ว

      @@Martin-Mwiti but it creates just None

  • @manhdoan199x3
    @manhdoan199x3 3 ปีที่แล้ว

    help me please : ImportError: cannot import name 'six' from 'django.utils' (/home/doan/.local/lib/python3.7/site-packages/django/utils/__init__.py)

  • @shemaredwards9169
    @shemaredwards9169 3 ปีที่แล้ว

    Drop a like if Dennis Ivy is the best!!

  • @jamesadakole8068
    @jamesadakole8068 4 ปีที่แล้ว +2

    Thank you so much God Bless!

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว

      Thanks James :)

  • @marufhossen1581
    @marufhossen1581 11 หลายเดือนก่อน

    Love you, bro...

  • @sethassiamah8449
    @sethassiamah8449 3 ปีที่แล้ว

    I do get this error whenever I try to save the profile__pic image . ------- _getfullpathname: path should be string, bytes or os.PathLike, not list

  • @fabriziobandiera6648
    @fabriziobandiera6648 4 ปีที่แล้ว

    Is it possible to remove "currently" and change?

  • @cosplayfx
    @cosplayfx ปีที่แล้ว

    The fun beginns when you realise, that you cannot use that in production and your image url is viewable by anyone with the link.

  • @boutheinahaddad6803
    @boutheinahaddad6803 3 ปีที่แล้ว

    thank you it's very helpful

  • @kevinariza603
    @kevinariza603 3 ปีที่แล้ว +1

    Hello, world! If you want to delete the old image, you can use django-cleanup:
    Compatibility:
    Django 2.2, 3.0, 3.1
    Python 3.5+
    STEP 1: Install django-cleanup.
    ---> pip install django-cleanup
    STEP 2: Add django_cleanup to the bottom of INSTALLED_APPS in settings.py.
    --->
    INSTALLED_APPS = (
    ...,
    'django_cleanup.apps.CleanupConfig',
    )
    That is all, no other configuration is necessary.
    Where did I get this?
    ---> github.com/un1t/django-cleanup
    Thanks for the great content, Dennis!

  • @karthikk7460
    @karthikk7460 3 ปีที่แล้ว

    I uploaded the image successfully and uploaded the image stored in a specified directory .but when we open the admin panel, it is not showing the currently uploaded file .could u please tell me what to do?

    • @karthikk7460
      @karthikk7460 3 ปีที่แล้ว

      please anybody give reply for this

  • @mohammedqadir3851
    @mohammedqadir3851 4 ปีที่แล้ว +1

    Thank you so much sir.
    I am waiting this also how to add profile image using Django.

    • @yadjnishnursiah8621
      @yadjnishnursiah8621 4 ปีที่แล้ว

      I have a problem in my website. Whenever i create an account for someone, his profile is shown in the navigation bar. But whenever i clicked on his profile, it is showing me errors, but if i login as an admin and add that person as a customer, now he will be able to click on his profile. Can anyone solve this problem for me please ? I want to make it like someone signs up and login as a customer automatically and view his profile without the admin to accept him as a customer and not showing the error !!!

  • @nguyenquang97
    @nguyenquang97 4 ปีที่แล้ว +1

    I can't load the images and I don't know Why anyone can help me please

  • @loksewabyte
    @loksewabyte 4 ปีที่แล้ว

    Hey Dennis, Please Make a complete on Django signals. Like Setting profile picture automatically when user signup.

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      Working on it now :)

  • @cesaralvarez9436
    @cesaralvarez9436 4 ปีที่แล้ว

    Just leaving a mark guys: 8:00

  • @AlifAhsanul
    @AlifAhsanul 4 ปีที่แล้ว +1

    how to restrict anonymous visitor from viewing profile image by typing picture path to url?

    • @pythonmacho9954
      @pythonmacho9954 3 ปีที่แล้ว

      You can use
      {% if request.user.is_authenticated %}:
      #shows only to authenticated users
      {% else %}
      # shows to anonymous
      {% endif %}

  • @ytdavide
    @ytdavide 4 ปีที่แล้ว

    Thanks for all you do! 👍

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +2

      Your welcome Davide! I'm just glad people are finding these videos useful :)

    • @ytdavide
      @ytdavide 4 ปีที่แล้ว

      @@DennisIvy very useful

    • @ytdavide
      @ytdavide 4 ปีที่แล้ว

      @@DennisIvy twitter.com/chrisoncode/status/1216770622195240960?s=19

  • @Jon-s4s
    @Jon-s4s 4 ปีที่แล้ว +1

    Thanks To The Author !!! could you still make a video creating an ad site on django 3

    • @DennisIvy
      @DennisIvy  4 ปีที่แล้ว +1

      This was done in Django 3.0. What do you mean by “Ad site”? Если вам легче, можете по Русский говорит :)

    • @Jon-s4s
      @Jon-s4s 4 ปีที่แล้ว

      @@DennisIvy Спасибо Вам еще раз за ваши уроки!!! Можете еще создать курс по Django3 на тему сайта размещения объявлений.

  • @abdulselamtamene5812
    @abdulselamtamene5812 3 ปีที่แล้ว

    where can i get acode

  • @nirjalpaudel
    @nirjalpaudel 4 ปีที่แล้ว

    Empty static prefix not permitted
    got this error

  • @syrgakomuraliev
    @syrgakomuraliev 4 ปีที่แล้ว +1

    The 'profile_pic' attribute has no file associated with it
    Why is that ?

    • @aishu812
      @aishu812 4 ปีที่แล้ว

      FIRST U NEED TO UPLOAD THE CUSTOMER PIC USING ADMIN PANEL....AND THEN CHECK ONTO THE SPECIFIC CUSTOMER PAGE

    • @bishaladhikari8691
      @bishaladhikari8691 2 ปีที่แล้ว

      @@aishu812 but when u clear the profile pic in setting form it shows that error

    • @bishaladhikari8691
      @bishaladhikari8691 2 ปีที่แล้ว

      did u solved it yet ?

  • @ankurtiwari5664
    @ankurtiwari5664 4 ปีที่แล้ว

    CSS file is not updating what to do

  • @Pigirl
    @Pigirl 4 ปีที่แล้ว

    How can we retrieve the url of image field in views.py

  • @alphiuswambua9512
    @alphiuswambua9512 4 ปีที่แล้ว

    This is awesome men. Please do a video on how to deploy django in shared hosting (cpanel). Kindly do it with a cpanel that does not have terminal because majority of them do not have.

  • @marlinekhavele2461
    @marlinekhavele2461 4 ปีที่แล้ว

    Dennis Ivy can you assist me with my issue???

  • @Vivek-hf7mx
    @Vivek-hf7mx 4 ปีที่แล้ว

    So when we create a customer, do we need to create a corresponding user account for that customer??...please clear this doubt....

    • @talhashakil8245
      @talhashakil8245 4 ปีที่แล้ว +2

      I also have the same question. I cannot understand the relationship between User and Customer

    • @brainiacmarco4014
      @brainiacmarco4014 ปีที่แล้ว

      you must add to customer an user in admin Django before

  • @yadjnishnursiah8621
    @yadjnishnursiah8621 4 ปีที่แล้ว

    I have a problem in my website. Whenever i create an account for someone, his profile is shown in the navigation bar. But whenever i clicked on his profile, it is showing me errors, but if i login as an admin and add that person as a customer, now he will be able to click on his profile. Can anyone solve this problem for me please ? I want to make it like someone signs up and login as a customer automatically and view his profile without the admin to accept him as a customer and not showing the error !!!

    • @foadhaydari5075
      @foadhaydari5075 4 ปีที่แล้ว

      hi,
      when user register make it customer in view.py

  • @marlinekhavele2461
    @marlinekhavele2461 4 ปีที่แล้ว

    I have this issue
    The view accounts.decorators.wrapper_function didn't return an HttpResponse object. It returned None instead.

    • @SS010791
      @SS010791 4 ปีที่แล้ว

      I had the same issue - login to the admin panel with the user that has a group assigned to it (admin or customer) then launch the cpm login page. It worked for me.

  • @yamanrana7531
    @yamanrana7531 4 ปีที่แล้ว

    I tried to upload the images but thd images are save in separate folder with same name static/images/ please can you tell me anything about this

    • @sabasiddika
      @sabasiddika 4 ปีที่แล้ว +1

      I had the same problm.
      but it works as per this tutorial

    • @yamanrana7531
      @yamanrana7531 4 ปีที่แล้ว

      Hehhe same problem😂

  • @vickysmart9292
    @vickysmart9292 4 ปีที่แล้ว

    the image cannot load in fronend view whats the solution for that anyone help for this

  • @sergeyvarfolomeev2627
    @sergeyvarfolomeev2627 3 ปีที่แล้ว

    Денис, у тебя отличный английский! :) Где так натаскался?

  • @KevinTempelx
    @KevinTempelx 4 ปีที่แล้ว

    Thank you!

  • @brycewong4869
    @brycewong4869 4 ปีที่แล้ว +1

    Hey Dennis
    + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    after adding the above code into urls, i found that my main.css won't work, whenever i change style in main.css, templates will not inherit the css design, how can i solve this?

  • @deepjyotide181
    @deepjyotide181 4 ปีที่แล้ว +1

    "Empty static prefix not permitted" I am having this issue right now.

  • @rainfeedermusic
    @rainfeedermusic 4 ปีที่แล้ว

    How to remove previous profile picture? (delete it)

  • @creationduwal
    @creationduwal 4 ปีที่แล้ว

    how did you make the profile pic appear circular

    • @k.santiagodiaz3744
      @k.santiagodiaz3744 4 ปีที่แล้ว

      That's made with the following CSS rule:
      img {
      border-radius: 50%;
      }

  • @siddhantpokhrel6955
    @siddhantpokhrel6955 4 ปีที่แล้ว

    TypeError at /images/anil.jpg
    expected str, bytes or os.PathLike object, not NoneType
    I am gettting this error please help while