django-ordered-model : AttributeError

Hi, my use module : GitHub - django-ordered-model/django-ordered-model: Get your Django models in order

Error move down, up, top, bottom:

AttributeError at /administrator/photo/photo/1/move-bottom/
'Photo' object has no attribute 'bottom'
Request Method:	GET
Request URL:	http://localhost:83/administrator/photo/photo/1/move-bottom/
Django Version:	4.0.6
Exception Type:	AttributeError
Exception Value:	
'Photo' object has no attribute 'bottom'
Exception Location:	/media/dati/www/django/venv/lib/python3.10/site-packages/ordered_model/admin.py, line 87, in move_view
Python Executable:	/media/dati/www/django/venv//bin/python
Python Version:	3.10.4
Python Path:	
['/media/dati/www/django',
 '/usr/lib/python310.zip',
 '/usr/lib/python3.10',
 '/usr/lib/python3.10/lib-dynload',
 '/media/dati/www/django/venv/lib/python3.10/site-packages']
Server time:	Mon, 11 Jul 2022 11:11:08 +0200

idea ? solved problem ? no urls.py implemented ?

Hey there!
If you could provide a litte more code, that could help us to diagnose the problem you are facing.
My guess is that maybe you are missing something from this part of the installation part:
From the github…

Add ordered_model to your SETTINGS.INSTALLED_APPS.

Inherit your model from OrderedModel to make it ordered:

from django.db import models
from ordered_model.models import OrderedModel


class Item(OrderedModel):
    name = models.CharField(max_length=100)

Then run the usual $ ./manage.py makemigrations and $ ./manage.py migrate to update your database schema.

Does your Photo model inherits from OrderedModel?

ok , solved problem … how to my custom dashboard not use admin django??
Urls ? not working.

{% load static %}
<a href="{{ urls.top }}{{query_string}}">
    <img src="{% static 'ordered_model/arrow-top.gif' %}"></a>
<a href="{{ urls.up }}{{query_string}}">
    <img src="{% static 'ordered_model/arrow-up.gif' %}"></a>
<a href="{{ urls.down }}{{query_string}}">
    <img src="{% static 'ordered_model/arrow-down.gif' %}"></a>
<a href="{{ urls.bottom }}{{query_string}}">
    <img src="{% static 'ordered_model/arrow-bottom.gif' %}"></a>

how to copy html in template photo_list.html??

thanks.

Sorry i didn’t understand what you’re trying to tell.
What is happening that should not be happening?
What is not happening that should be happening?

not working links on my template … url not working routes.

running only admin urls routes.

Idea?.

venv/lib/python3.10/site-packages/ordered_model/admin.py

only admin django… not working my admin backend custom.