Try DJANGO Tutorial - 8 - Your First App Component

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

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

  • @jovid6410
    @jovid6410 6 ปีที่แล้ว +1

    Omg it's much more clear right now for me, this format where you explain the basics is much better ' personal for me'. Im so exited that i put the like button three time after each video. Thank you very much Sir.

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

    How can we make product on the table at 7:52 appear as the title which we gave our product?? If you know what I'm trying to say.. Like Product Object 1 doesn't appear really neat ^.^''''

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      Patient my friend , it is coming later. He just want to let us, power up the site, so the fun starts .

  • @joshualim5571
    @joshualim5571 6 ปีที่แล้ว

    This is the 1st time i am commenting on youtube. i just want to let u know that u are damn awesome...really learn a lot from you

  • @rick_in_MN
    @rick_in_MN 6 ปีที่แล้ว +1

    On my site admin page, Products did not show up(7:29 in video). I have saved all the files and did the makemigrations and migrate. Any suggestions?

    • @JustinMitchel
      @JustinMitchel 6 ปีที่แล้ว

      Rick Rio restart the server

    • @rick_in_MN
      @rick_in_MN 6 ปีที่แล้ว

      I found the error finally, I named the class Products instead of Product

    • @JustinMitchel
      @JustinMitchel 6 ปีที่แล้ว

      Nice!

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

      @@rick_in_MN i did the same mistake

  • @rotrose7531
    @rotrose7531 6 ปีที่แล้ว

    Thank you for your efforts, everything goes just too smooth, unbelievable!

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

    no such table: main.auth_user__old
    I am continuously getting this error every time I try to save a product to the database. Can someone please help me out here?

    • @logeshsaravanan27
      @logeshsaravanan27 5 ปีที่แล้ว +1

      Facing same problem. Help needed

    • @positivemindalways
      @positivemindalways 5 ปีที่แล้ว

      python manage.py makemigrations
      python manage.py migrate

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

      Same here

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

      @@sms7132 you need to upgrade the Django version. For upgrading Django you can check stackoverflow.com/questions/23708895/how-to-upgrade-django

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

    Why does it ask for a default value only for summary?

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

    At the end when I save I have the following error
    no such table: main.auth_user__old

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

    I get an error from conda I had installed. Python3 code works. What should I do?

  • @ameerabdulaziz
    @ameerabdulaziz 6 ปีที่แล้ว +1

    Hi! Based on I have OOP Java background I would like to make sure that I understand the structure when we extend the class model that we create from the "model.Model".
    "model" is a module that contains many classes like "Model" and functions in one file so we must import the file or the module first and then what we need inside it. IS THAT CORRECT?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  6 ปีที่แล้ว

      That is correct! It’s a python module inside of the Django project

  • @SaraKhan-bw2tc
    @SaraKhan-bw2tc 3 ปีที่แล้ว

    i keep getting the "reportMissingModuleSource" error, any ideas how to overcome that? I am using a Windows OS

  • @thenomadicvoice16
    @thenomadicvoice16 5 ปีที่แล้ว

    Thank you so much for providing such awesome videos but sir when adding the product module ,in the database i m having an error "Operational Error at /admin " what should do to remove that?

    • @dhruvjain2940
      @dhruvjain2940 5 ปีที่แล้ว

      Getting the same error, did you resolve it?

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

      same error too

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      May be late, but for new comers, check the debugging traceback output in the terminal.

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

    when you makemigrations, do u have to name the app you are making the migrations to? So like python manage.py makemigrations accounts? Or is this what one had to do for past versions of django? If you have a lot of different apps, will django makemigrations for all of the apps? thnx

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      Yeah, ./manage.py makemigrations will do it for all changed apps. On other hand ./manage.py makemigrations app1 app2 .. is the advance one and still valid in Django3. For learning, migrate for all apps, however later you may face cases where you need to migrate one by one.

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

      @@user.w18 thank you vry much!

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

    done everything just as you did but none of the field is visible in the add product page

  • @khantech2314
    @khantech2314 6 ปีที่แล้ว

    Great lessons. Thank you so much!

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

    Hi, everything worked like a charm up to the point I had to do makemigrations and migrate,I get errors. I use django version like you said,but my python version was already higher,dint know if that could be a problem. Some help would be much appreciated,I tryed to google but didnt find a soulution.I am a newbie. Here are the errors I get :
    (trydjango) boris@Boriss-MacBook-Air src % python manage.py makemigrations
    Traceback (most recent call last):
    File "manage.py", line 15, in
    execute_from_command_line(sys.argv)
    File "/Users/boris/Dev/trydjango/lib/python3.8/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
    File "/Users/boris/Dev/trydjango/lib/python3.8/site-packages/django/core/management/__init__.py", line 347, in execute
    django.setup()
    File "/Users/boris/Dev/trydjango/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "/Users/boris/Dev/trydjango/lib/python3.8/site-packages/django/apps/registry.py", line 112, in populate
    app_config.import_models()
    File "/Users/boris/Dev/trydjango/lib/python3.8/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
    File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1014, in _gcd_import
    File "", line 991, in _find_and_load
    File "", line 975, in _find_and_load_unlocked
    File "", line 671, in _load_unlocked
    File "", line 779, in exec_module
    File "", line 916, in get_code
    File "", line 846, in source_to_code
    File "", line 219, in _call_with_frames_removed
    File "/Users/boris/Dev/trydjango/src/products/models.py", line 4
    Class Product(models.Model):
    ^
    SyntaxError: invalid syntax

  • @devmehta6615
    @devmehta6615 5 ปีที่แล้ว +1

    I m unable to open django admin panel '127.0.0.1:8000/admin/' shows 'python stops working'. And i don't have any issue with home page.. please help me..and you do a very good job..

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      May be late, but for new comers, check the debugging traceback output in the terminal.

  • @hunarb.mohammed9189
    @hunarb.mohammed9189 6 ปีที่แล้ว +1

    do you try to the same eCommerce website as uploaded in udemy , i watched it , is here something different ?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  6 ปีที่แล้ว +1

      YES! eCommerce is a complete project. This is purely conceptual. So Try Django will just cover topics.

    • @shresta1527
      @shresta1527 5 ปีที่แล้ว

      we bought e commerce as well but as its on Django 1.11 .. we r fcaing troubles with higher python versions

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

    I am trying to put multiple spaces between the field-name and the field declaration(title = models.TextField() ). But every time I save it, it goes back to One(1) space (title = models.TextField()). Anyone knows how to fix it?

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      Check your editor setting for style correction, lint may be?

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

    Get rid of this issue easily maintaining the following steps:
    1. keep django version 2.1.5 (the issue addressed in this version) pip install django==2.1.5
    2. Delete the SQLite db
    3. Migrate again python manage.py makemigrations and then python manage.py migrate
    4. Start the server python manage.py runserver
    Found this solution on Stackoverflow
    IT WORKS
    you're Welcome!

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

      It worked. Thanks!

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

    i got this error when i issue the command: python manage.py makemigrations. ImportError: cannot import name 'Product' from 'products.models'

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

      i fixed myself. i just delete database

  • @everyday___life
    @everyday___life 6 ปีที่แล้ว +1

    I got this error "Exception Value:
    no such table: products_product"

    • @everyday___life
      @everyday___life 6 ปีที่แล้ว

      resolved it. I had not run makemigration after changing models.py

    • @yiyichanmyaewinshein8248
      @yiyichanmyaewinshein8248 5 ปีที่แล้ว +1

      I also have that error and makemigrations couldn't handle this one. if there is another solution, pls let me know.

    • @logeshsaravanan27
      @logeshsaravanan27 5 ปีที่แล้ว

      Facing same problem. Help needed

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

    I am trying to create my first Django project by following these videos, while running below command
    python manage.py makemigrations
    I am getting below error:
    AttributeError: module 'django.db.models' has no attribute 'Textfield'

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

      Try 'TextField' instead of 'Textfield'.
      Be careful with capital & small letters.

  • @nitishgupta6802
    @nitishgupta6802 5 ปีที่แล้ว

    You're cool and awesome both!!

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

    I've done everything exactly the same as in the video, and when I run makemigrations, it says "No changes detected", and nothings changing on the website even after I update the admin code

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

      same issue

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

      am using visual studio code and i had to do save all before I stopped getting no changes detected

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

      @@oluwatosinoseni7839 i did save all

    • @user.w18
      @user.w18 4 ปีที่แล้ว

      db migration only when you change a model in models.py. for other files, django server will just reload new updated files, if it get blocked with exception, just start again, ctrl+c then ./manage.py runserver

  • @shivjeechoudhary8005
    @shivjeechoudhary8005 6 ปีที่แล้ว

    its not working with me when is give command python manage.py makemigrations than I am getting error in description = models.Textfields() line
    The error is " unindent does not match any outer indentation level"
    please help me.

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

    You write python manage.py but I need to use python3 manage.py

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

    Thank you!

  • @lesleybih2081
    @lesleybih2081 6 ปีที่แล้ว

    Thanks so much for the video...
    I'm getting this error: SyntaxError: EOF while scanning triple-quoted string literal
    when I run python manage.py makemigrations

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

    you are the Harry Mack of django

  • @krishsandy8140
    @krishsandy8140 6 ปีที่แล้ว

    In models.py why you use braces when declaring class
    class Product():
    or
    class Product:
    which is correct

    • @webizfabulous2535
      @webizfabulous2535 5 ปีที่แล้ว +1

      both are same , you have to use brackets if u are using python 2.7

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

    cool brah

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

    HAI WHEN I ADD PRODUCTS I GOT OPERATIONAL ERROR

  • @ThePirateHistory
    @ThePirateHistory 6 ปีที่แล้ว

    class this(models.Model):
    is_active = models.BooleanField(default=True)
    timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
    updated = models.DateTimeField(auto_now_add=False, auto_now=True)
    def __str__(self):
    return "this - |{}| - |{}| ".format(self.this, self.this)
    class Meta:
    ordering = ["timestamp"]
    verbose_name = 'this'
    verbose_name_plural = 'this'

  • @shivamkapoor1827
    @shivamkapoor1827 6 ปีที่แล้ว

    Un understandable for bigineers

    • @TerriTerriHotSauce
      @TerriTerriHotSauce 5 ปีที่แล้ว

      ​@sandesh sukubhattu​Please share link to that