Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Consistently use settings.AUTH_USER_MODE in all languages #1754

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cs/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ V souboru `blog/models.py` budeme definovat všechny objekty nazývané `modely`
Otevři `blog/models.py`, odstraň vše, co v něm je, a vlož následující kód:

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion es/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ Abre `blog/models.py` en el editor, borra todo, y escribe código como este:
{% filename %}blog/models.py{% endfilename %}

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion fa/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ INSTALLED_APPS = [
{% filename %}blog/models.py{% endfilename %}

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion hu/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ A `Model` nevű objektumokat a `blog/models.py` fájlban definiáljuk - tehát i
Nyisd meg a `blog/models.py`-t, törölj ki mindent, és ezt a kódot írd bele:

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion pl/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ Otwórz plik `blog/models.py` w swoim edytorze kodu, usuń z niego całą zawart
{% filename %}blog/models.py{% endfilename %}

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion sk/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ Otvor `blog/models.py`, všetko z neho odstráň a napíš nasledovný kód:
{% filename %}blog/models.py{% endfilename %}

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion tr/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ INSTALLED_APPS = [
{% filename %}blog/models.py{% endfilename %}

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion uk/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ INSTALLED_APPS = (
Відкриємо `blog/models.py`, видалимо все звідси та запишемо наступний код:

```python
from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down
3 changes: 2 additions & 1 deletion zh/django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ Django 里的模型是一种特殊的对象 — — 它保存在 `数据库` 中

让我们打开 `blog/models.py`,从中删除一切并编写这样的代码:

from django.conf import settings
from django.db import models
from django.utils import timezone


class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down