# Django admin not show all record of tables

**URL:** <https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155>\
**Category:** The Admin\
**Created:** [December 11, 2024, 1:45pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155 "2024-12-11T13:45:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 11, 2024, 1:45pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/1 "2024-12-11T13:45:21Z")

</div>

Hi all,

I need to solve an issue is very strange. The admin interface show all record of a table but not the last inserted. For example the last inserted string is 6760 and when insert the 6761 the application tell me there is and is true in the db is present but not in the web table.

I have registered the model with admin.site.register(practice) but non show ll record of the table.

Please is very urgent.  
Thanks for all replay

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 11, 2024, 1:54pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/2 "2024-12-11T13:54:18Z")

</div>

The first thing to do would be to check the database directly. Use the database’s tool to examine the table to see if the data you’re expecting to see is actually there.

Also, it might help if you talked about the specific situation and not try to generalize or summarize it. Post the actual model you are trying to look at and identify the data you are expecting to see but aren’t. Then, you could post the output of a database query showing that the data you are expecting to see is actually in the database.

---

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 11, 2024, 3:41pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/3 "2024-12-11T15:41:21Z")

</div>

> [@KenWhitesell](#):
>
> The first thing to do would be to check the database directly. Use the database’s tool to examine the table to see if the data you’re expecting is actually there. Also, it might help if you talked about the specific situation and didn’t try to generalize or summarize it. Post the actual model you’re trying to look at and identify the data you expect to see that isn’t there. Then you could post the output of a database query that shows that the data you are expecting to see is actually in the database.

the data in the database are there, but the admin user interface does not display them it stops at 4 records before. I don’t know why, but it doesn’t show them. Are there any limitations in the admin’s model query?  
this is the model:

class practice(models.Model):  
practice\_number = models.IntegerField(unique=True)

```
def __str__ (self):
    practice_number = str(self.practice_number)
    return practice_number

def __unicode__ (self):
    return self.practice_number

```

the problem is related to practice\_number field not show all but all minus 4 without reason

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 11, 2024, 3:53pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/4 "2024-12-11T15:53:27Z")

</div>

The number of instances being shown on a page is configurable. Do you have more instances of that model than what are shown on a page?

How many instances are being shown?  
(At the top of the list, next to the action bar, it shows " \_\_ of \_\_ selected". What are the numbers shown there?)

Are you seeing the pagination selection at the bottom of the page?

---

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 11, 2024, 4:23pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/5 "2024-12-11T16:23:53Z")

</div>

Yes i see 0-100 selected but I have pagination. I don’t modify the page of a model so is default only i wrote is the model i posted before

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 11, 2024, 5:05pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/6 "2024-12-11T17:05:31Z")

</div>

How many instances of this model do you have?

What does the pagination show you at the bottom of the page?

---

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 11, 2024, 5:29pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/7 "2024-12-11T17:29:21Z")

</div>

One instance for admin interface. The pagination show me the number of the page anf total of practice 623, but now the problem is for only a specific number of practice: 6760, 6761, 6762 not show but 6763 is showing. I don’t what is different

---

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 11, 2024, 5:30pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/8 "2024-12-11T17:30:17Z")

</div>

I’m sorry but the image i can’t send because the application is on premis of customer and is very complex to connect

---

<div class="post-metadata">

**Author:** ![VincentAdamNemessis](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentadamnemessis/32/25585_2.png) [@VincentAdamNemessis](https://forum.djangoproject.com/u/VincentAdamNemessis)\
**Post date:** [December 12, 2024, 9:48am UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/9 "2024-12-12T09:48:25Z")

</div>

Maybe you missed admin config? Or you have some custom action to filter them?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/9/f/9f67cfe80fb2506f4eafda18aaa318d1df92a7ee.png)

---

<div class="post-metadata">

**Author:** ![VincentAdamNemessis](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentadamnemessis/32/25585_2.png) [@VincentAdamNemessis](https://forum.djangoproject.com/u/VincentAdamNemessis)\
**Post date:** [December 12, 2024, 9:52am UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/10 "2024-12-12T09:52:23Z")

</div>

> [@homeland3d-andrea](#):
>
> I need to solve an issue is very strange. The admin interface show all record of a table but not the last inserted. For example the last inserted string is 6760 and when insert the 6761 the application tell me there is and is true in the db is present but not in the web table.
> 
> I have registered the model with admin.site.register(practice) but non show ll record of the table.

Just do something like this:

This issue can be caused by several factors:

1. **Caching Issues** : Browser cache may prevent the latest data from being displayed. Try clearing the browser cache or refreshing the page (Shift+F5 or Shift+Reload).
2. **Database Synchronization Issues** : Ensure your database and Django models are synchronized. Run `makemigrations` and `migrate` commands to check for unsynchronized data.
3. **Model Registration Issue** : Check if your model is correctly registered. Make sure you have `admin.site.register(Practice)` in your `admin.py` file.
4. **Caching Mechanism** : Django’s caching mechanism may prevent the latest data from being displayed. Check if you have any caching mechanisms enabled, such as `Cacheops` or `Django Cache`, and try clearing the cache.
5. **Browser Issues** : Try using a different browser or device to access the Django admin interface to see if the problem persists.

### Troubleshooting Steps

1. **Clear Cache** : Clear your browser cache and refresh the page.
2. **Synchronize Database** : Run the following commands to synchronize the database:

```bash
python manage.py makemigrations
python manage.py migrate

```

3. **Check Model Registration** : Ensure your model is correctly registered in the `admin.py` file:

```python
from django.contrib import admin
from yourapp.models import Practice

admin.site.register(Practice)

```

4. **Check Caching Mechanism** : If you are using any caching mechanisms, try clearing the cache.
5. **Use Different Browser** : Try using a different browser or device to access the Django admin interface.

These steps may help you solve the problem

---

<div class="post-metadata">

**Author:** ![philgyford](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/philgyford/32/14295_2.png) [@philgyford](https://forum.djangoproject.com/u/philgyford)\
**Post date:** [December 12, 2024, 11:14am UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/11 "2024-12-12T11:14:53Z")

</div>

Also, check if you’ve redefined the `objects` property on the model with a custom Manager. I think that’s what is used to display the Admin listing.

---

<div class="post-metadata">

**Author:** ![homeland3d-andrea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/homeland3d-andrea/32/15592_2.png) [@homeland3d-andrea](https://forum.djangoproject.com/u/homeland3d-andrea)\
**Post date:** [December 13, 2024, 3:02pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/12 "2024-12-13T15:02:45Z")

</div>

I found the mistery the number of practice is real into db and correct created but in primary time to development so. The mistake is appear because the number of practice is just create and the order of the table in the admin interface is not for number of practice but in time order. How can I order the table for number practice?

---

<div class="post-metadata">

**Author:** ![philgyford](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/philgyford/32/14295_2.png) [@philgyford](https://forum.djangoproject.com/u/philgyford)\
**Post date:** [December 13, 2024, 4:19pm UTC](https://forum.djangoproject.com/t/django-admin-not-show-all-record-of-tables/37155/13 "2024-12-13T16:19:57Z")

</div>

You need [`ModelAdmin.ordering`](https://docs.djangoproject.com/en/5.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.ordering).
