Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 343043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:51:38+00:00 2026-05-12T10:51:38+00:00

I have a simple model like this one: class Artist(models.Model): surname = models.CharField(max_length=200) name

  • 0

I have a simple model like this one:

class Artist(models.Model):
   surname = models.CharField(max_length=200)
   name = models.CharField(max_length=200, blank=True)
   slug = models.SlugField(unique=True)
   photo = models.ImageField(upload_to='artists', blank=True)
   bio = models.TextField(blank=True)  

class Images(models.Model):
   title = models.CharField(max_length=200)
   artist = models.ManyToManyField(Artist)
   img = models.ImageField(upload_to='images')

Well, I started to insert some Artists and then I went to the Images insert form. I found that the many-to-many artist box is unsorted:

  • Mondino Aldo
  • Aliprandi Bernardo
  • Rotella Mimmo
  • Corpora Antonio

Instead of:

  • Aliprandi Bernardo
  • Corpora Antonio
  • Mondino Aldo
  • Rotella Mimmo

How can I solve this issue?
Any suggestion?
Thank you in advance.

Matteo

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:51:38+00:00Added an answer on May 12, 2026 at 10:51 am

    Set ordering on the Article’s inner Meta class.

    class Article(models.Model):
        ....
    
        class Meta:
            ordering = ['surname', 'name']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume I have such simple model: class Foo(models.Model): name = models.CharField(max_length=25) b_date = models.DateField()
I have some simple Django Models like this: class Event(models.Model): # some stuff class
I have a simple one-to-many structure like this: class User(db.Model): userEmail = db.StringProperty() class
I need some help with this one.... I have this simple model: public class
You have models: class Order(Model): date = DateField(editable = False, auto_now_add=True) status = CharField(max_length
I have a Rails 3 simple scaffolded application having one model like that: class
I have a simple one-to-many (models.ForeignKey) relationship between two of my model classes: class
I have a simple Python/Django class: class myModel(models.Model): date = models.DateTimeField() value = models.IntegerField()
I have a simple question. I have a model that looks like this: public
I have a simple form in Django that looks like this: class SettingForm(forms.Form): theme

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.