Improve RelatedField and callable default handling
- callable default values will now be properly called - PrimaryKeyRelatedField and SlugRelatedField will now return an appropriate type based on the relation model's Field - mock views now have a request object bound even when public is True
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,27 +0,0 @@
|
||||
# Generated by Django 2.0 on 2017-12-05 04:05
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('snippets', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='snippet',
|
||||
name='owner',
|
||||
field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='snippets', to=settings.AUTH_USER_MODEL),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='snippet',
|
||||
name='code',
|
||||
field=models.TextField(help_text='code model help text'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user