Bestin
Raju
hi, can anyone give me this book (Django for Beginners: Build Websites with Python and Django) version Django 3.1.
Raju
hi, can anyone give me this book (Django for Beginners: Build Websites with Python and Django) version Django 3.1.
Anonymous
OperationalError at /admin/market/category/add/
no such table: market_category
Request Method: GET
Request URL: http://localhost:8000/admin/market/category/add/
Django Version: 3.2.1
Exception Type: OperationalError
Exception Value:
no such table: market_category
Exception Location: C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py, line 423, in execute
Python Executable: C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe
Python Version: 3.9.2
Python Path:
['C:\\Users\\User\\Desktop\\electronic\\electronic\\electronic',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\DLLs',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\lib',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39',
'C:\\Users\\User\\AppData\\Roaming\\Python\\Python39\\site-packages',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
Server time: Tue, 29 Jun 2021 19:20:42 +0000
Error during template rendering
In template C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\admin\templates\admin\includes\fieldset.html, error at line 19
no such table: market_category
9 {% for field in line %}
10 <div{% if not line.fields|length_is:'1' %} class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}>
11 {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
12 {% if field.is_checkbox %}
13 {{ field.field }}{{ field.label_tag }}
14 {% else %}
15 {{ field.label_tag }}
16 {% if field.is_readonly %}
17 <div class="readonly">{{ field.contents }}</div>
18 {% else %}
19 {{ field.field }}
20 {% endif %}
21 {% endif %}
22 {% if field.field.help_text %}
23 <div class="help">{{ field.field.help_text|safe }}</div>
24 {% endif %}
25 </div>
26 {% endfor %}
27 </div>
28 {% endfor %}
29 </fieldset>
Anonymous
guys how can i solve this issue
Anonymous
help me
Anonymous
guys
Anonymous
who knows
Musa
OperationalError at /admin/market/category/add/
no such table: market_category
Request Method: GET
Request URL: http://localhost:8000/admin/market/category/add/
Django Version: 3.2.1
Exception Type: OperationalError
Exception Value:
no such table: market_category
Exception Location: C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py, line 423, in execute
Python Executable: C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe
Python Version: 3.9.2
Python Path:
['C:\\Users\\User\\Desktop\\electronic\\electronic\\electronic',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\DLLs',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\lib',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39',
'C:\\Users\\User\\AppData\\Roaming\\Python\\Python39\\site-packages',
'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
Server time: Tue, 29 Jun 2021 19:20:42 +0000
Error during template rendering
In template C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\admin\templates\admin\includes\fieldset.html, error at line 19
no such table: market_category
9 {% for field in line %}
10 <div{% if not line.fields|length_is:'1' %} class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}>
11 {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
12 {% if field.is_checkbox %}
13 {{ field.field }}{{ field.label_tag }}
14 {% else %}
15 {{ field.label_tag }}
16 {% if field.is_readonly %}
17 <div class="readonly">{{ field.contents }}</div>
18 {% else %}
19 {{ field.field }}
20 {% endif %}
21 {% endif %}
22 {% if field.field.help_text %}
23 <div class="help">{{ field.field.help_text|safe }}</div>
24 {% endif %}
25 </div>
26 {% endfor %}
27 </div>
28 {% endfor %}
29 </fieldset>
Maybe you forgot to make migrations after creating market_category model
Anonymous
i have done makemigrations and migrate
Anonymous
but it snot working yet
shaikh
Do migrations with app name
shaikh
Python manage.py make migration appname
shaikh
Python manage.py migrate appname
Musa
Delete previous migration and migrate again
Anonymous
Anonymous
Anonymous
is there any other way of migrate
shaikh
is there any other way of migrate
Sometimes models in apps are not created using just python manage.py make migrations you have to specify python manage.py makemigrations <yourappname>
Anonymous
Anonymous
by the way is there any other way of making subcategory models
shaikh
No other way
shaikh
Then you have to delete all py ache files migration files
shaikh
Then again migrate
Anonymous
cashes it means files in migrations folder
Anonymous
i ve done it
shaikh
Rerun migration command
shaikh
Also check admin panel if table created it will be reflected there
Anonymous
yea it is already exsist but when i clicked it this issue happended
shaikh
https://www.pythonanywhere.com/forums/topic/15000/
shaikh
I found this you can also try this
Anonymous
Anonymous
class Category(MPTTModel):
STATUS = (
('True',"True"),
("False","False")
)
parent = TreeForeignKey('self',blank=True,null=True,related_name='childern',on_delete=models.CASCADE)
title = models.CharField(max_length=30)
desc = models.CharField(max_length=300)
img = models.ImageField(blank=True,upload_to="image/")
status = models.CharField(max_length=20,choices= STATUS)
slug = models.SlugField()
def str(self):
return self.title
class MPTTMeta:
order_insertion_by = ['title']
class Product(models.Model):
STATUS = (
("True","True"),
("False","False")
)
category = models.ForeignKey(Category,on_delete=models.CASCADE)
title = models.CharField(max_length=50)
desc = models.CharField(max_length=200)
img = models.ImageField(upload_to='image/',blank=True)
price = models.FloatField()
amount = models.IntegerField()
slug = models.SlugField()
status = models.CharField(max_length=20,choices=STATUS)
Anonymous
i ve writen this
Anonymous
is there any mistake
Anonymous
this is admin file
Raj
Please help flask roll login system
M***
Guyz. I have a problem. I wanted to created a website to enter the details of the a house and the details of the members. So I created two form regarding the members details and the house details. So how could I add more than one member in a single submitt click in dajngo.
✙Yaroslav
Hi, how to add multipleChoice in serializer and model?
M***
If we press add members we can add multiple members. Last if we press submitt the whole data would be go to the server
Someone
Hi, i have a model queryset which I need to randomize.. However need to keep certain rows together, those will be one group.. For ex, if 1-10 are rows in queryset they all can randomize but 5,6 should be together always bcz they will be on same group. Any help would be great
John
Hello guys how can we implement and get model values in a drop down using Ajax in Django admin
John
??
Anonymous
Any idea on how build products models, views and urls in drf
victor
Hello guys, what do you use for task execution and automation in your projects? In my latest post at https://importthis.tech/task-execution-and-automation-using-invoke, I introduce Invoke – a powerful and easy to use Python tool for task execution and automation. If you're like me and don't want to deal with the complexities of writing a Makefile, you'll love Invoke!
The
Can anyone tell about Django authentication system??
....
Hello guys ,
How can I call a function in prepopulated fields in admin page,
That's give me a error like this .
(admin.E030) ...... which is not an attribute ...
Actually I defined that in model .
How can I call that. ?
Actually I added the slug field after lot of datas inserting ..
So there is so many rows without slug .
https://dpaste.org/zDjb#L1,7,28
Editing Name
Hello guys, how Display data that no model exists in a serializer
Rohan
Rohan
Editing Name
What?
https://stackoverflow.com/questions/68187970/display-data-that-no-model-exists-in-a-serializer-python-django-django-res
Rohan
Rohan
Mr.TD
M***
M***
Doragonsureiyā
Help me
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work.
Have a nice day 😊
Mandeep
Hlo
Mandeep
Can anyone help me??
Ss
Anyone have knowledge of aws or aws cli ???
Mandeep
Mandeep
Mandeep
Mandeep
Anatolie
help me create custom models user please
Wajahat Hussain
I am new to django.
My first impression to django is like not flexible.
Is it true?
Anatolie
there are a lot of outdated django videos on Youtube
Anatolie
Wajahat Hussain
Wajahat Hussain
Anatolie
No, I want to make a database for CRM, but I want to add the following fields: email,first name, last name, login, phone, password, country,city, status, but I'm not an expert in this yet, I'll forgive you for help
Wajahat Hussain
No, I want to make a database for CRM, but I want to add the following fields: email,first name, last name, login, phone, password, country,city, status, but I'm not an expert in this yet, I'll forgive you for help
There is no complexity in it.