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.
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 ^.^''''
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?
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?
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?
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
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.
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
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..
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?
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!
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'
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
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
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.
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
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.
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 ^.^''''
Patient my friend , it is coming later. He just want to let us, power up the site, so the fun starts .
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
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?
Rick Rio restart the server
I found the error finally, I named the class Products instead of Product
Nice!
@@rick_in_MN i did the same mistake
Thank you for your efforts, everything goes just too smooth, unbelievable!
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?
Facing same problem. Help needed
python manage.py makemigrations
python manage.py migrate
Same here
@@sms7132 you need to upgrade the Django version. For upgrading Django you can check stackoverflow.com/questions/23708895/how-to-upgrade-django
Why does it ask for a default value only for summary?
At the end when I save I have the following error
no such table: main.auth_user__old
I get an error from conda I had installed. Python3 code works. What should I do?
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?
That is correct! It’s a python module inside of the Django project
i keep getting the "reportMissingModuleSource" error, any ideas how to overcome that? I am using a Windows OS
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?
Getting the same error, did you resolve it?
same error too
May be late, but for new comers, check the debugging traceback output in the terminal.
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
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.
@@user.w18 thank you vry much!
done everything just as you did but none of the field is visible in the add product page
Great lessons. Thank you so much!
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
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..
May be late, but for new comers, check the debugging traceback output in the terminal.
do you try to the same eCommerce website as uploaded in udemy , i watched it , is here something different ?
YES! eCommerce is a complete project. This is purely conceptual. So Try Django will just cover topics.
we bought e commerce as well but as its on Django 1.11 .. we r fcaing troubles with higher python versions
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?
Check your editor setting for style correction, lint may be?
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!
It worked. Thanks!
i got this error when i issue the command: python manage.py makemigrations. ImportError: cannot import name 'Product' from 'products.models'
i fixed myself. i just delete database
I got this error "Exception Value:
no such table: products_product"
resolved it. I had not run makemigration after changing models.py
I also have that error and makemigrations couldn't handle this one. if there is another solution, pls let me know.
Facing same problem. Help needed
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'
Try 'TextField' instead of 'Textfield'.
Be careful with capital & small letters.
You're cool and awesome both!!
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
same issue
am using visual studio code and i had to do save all before I stopped getting no changes detected
@@oluwatosinoseni7839 i did save all
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
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.
Check your indentions
That’s a (basic) Python error 👀
You write python manage.py but I need to use python3 manage.py
Thank you!
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
solved....
you are the Harry Mack of django
In models.py why you use braces when declaring class
class Product():
or
class Product:
which is correct
both are same , you have to use brackets if u are using python 2.7
cool brah
HAI WHEN I ADD PRODUCTS I GOT OPERATIONAL ERROR
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'
Un understandable for bigineers
@sandesh sukubhattuPlease share link to that