It doesn't matter, you should decide on something and stick to it,
consistency is more important than some suggestion you read somewhere.

What your suggested seems fair, write on your documentation that you
decided this and ask politely for contributions to follow this style

On Aug 18, 2016 3:08 PM, "Asad Jibran Ahmed" <surfer...@gmail.com> wrote:

> The ordering of your attributes and methods inside the model class doesn't
> have to do with Django, it has to do with Python. Inside a class, the
> ordering doesn't matter as far as I understand. All of these documents you
> will find are thus just conventions to follow.
>
> You could come up with your own if you want, but it's usually a good idea
> to stick to something already out there are used by a lot of people, as it
> makes it easy for new comers to your code to quickly navigate the code.
> Since this is an open source project using the Django style guide you have
> linked to sounds like a good option.
>
> On Thursday, August 18, 2016 at 4:04:06 PM UTC+4, uri wrote:
>>
>> By the way, I found this document
>> <https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/>
>> and I changed the order of elements in our models accordingly. But what
>> about def __init__? And this document is for Django developers, what about
>> Django users? Is there another document for us?
>>
>> Thanks,
>> Uri.
>>
>>
>> *Uri Even-Chen*
>> [image: photo] Phone: +972-54-3995700
>> Email: u...@speedy.net
>> Website: http://www.speedysoftware.com/uri/en/
>> <http://www.facebook.com/urievenchen>
>> <http://plus.google.com/+urievenchen>
>> <http://www.linkedin.com/in/urievenchen>
>> <http://twitter.com/urievenchen>
>>
>> On Thu, Aug 18, 2016 at 2:41 PM, Uri Even-Chen <u...@speedy.net> wrote:
>>
>>> To django-users,
>>>
>>> We are developing Speedy Net, a new social networks with apps (Speedy
>>> Match and Speedy Composer). Speedy Net is using Django (the previous
>>> version is written in PHP). I would like to ask you about the models, in
>>> https://github.com/urievenchen/speedy-net/blob/master/
>>> speedy/net/accounts/models.py (it's an open source project; there are
>>> other models too), is the order of elements in the models correct?
>>> Currently the constants are first, then class Meta, then fields, then
>>> managers, then methods and properties (in arbitrary order). What is the
>>> common order of elements in Django projects? Does it matter at all? I read
>>> something about it in Django documentation, but I don't remember exactly
>>> where. I know the constants must be first in the model, before the fields,
>>> but what about class Meta? Any help will be appreciated.
>>>
>>> Thanks,
>>> Uri.
>>>
>>> *Uri Even-Chen*
>>> [image: photo] Phone: +972-54-3995700
>>> Email: u...@speedy.net
>>> Website: http://www.speedysoftware.com/uri/en/
>>> <http://www.facebook.com/urievenchen>
>>> <http://plus.google.com/+urievenchen>
>>> <http://www.linkedin.com/in/urievenchen>
>>> <http://twitter.com/urievenchen>
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/743db8ee-73d4-4f9e-96a1-7fea49aafecf%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/743db8ee-73d4-4f9e-96a1-7fea49aafecf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tL30SxzkMQn1mRCw2ErHe1T%3D_y%3DahfERmxfXeuju7160A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to