0xE111 / django-mptt-urls

Creating hierarchical URLs in Django associated with django-MPTT models
MIT License
36 stars 5 forks source link

add syntax highlight in the python examples #16

Closed Maksim-Burtsev closed 2 years ago

Maksim-Burtsev commented 2 years ago

As we know Markdown support syntax highlight in many languages and this makes docs more readable and pretty:

Before

from mptt.models import MPTTModel, TreeForeignKey

class Category(MPTTModel):
    ...
    parent = TreeForeignKey('self', null=True, blank=True)
    slug = models.SlugField()
    class Meta:
        unique_together = ('slug', 'parent')

After

from mptt.models import MPTTModel, TreeForeignKey

class Category(MPTTModel):
    ...
    parent = TreeForeignKey('self', null=True, blank=True)
    slug = models.SlugField()
    class Meta:
        unique_together = ('slug', 'parent')

So i update this in readme =)

0xE111 commented 2 years ago

This is so nice, thank you very much!