Reorganize code a bit, add current directory to sys.path (#198)

* reorganize code a bit

* add current directory to sys.path

* remove PYTHONPATH mention from the docs

* linting
This commit is contained in:
Maxim Kurnikov
2019-10-05 19:44:29 +03:00
committed by GitHub
parent b939bc96b7
commit 717be5940f
11 changed files with 287 additions and 238 deletions

View File

@@ -212,4 +212,45 @@
class User(models.Model):
pass
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
# TODO
- case: f_expression_simple_case
main: |
from myapp.models import User
from django.db import models
User.objects.filter(username=models.F('username2'))
User.objects.filter(username=models.F('age'))
installed_apps:
- myapp
files:
- path: myapp/__init__.py
- path: myapp/models.py
content: |
from django.db import models
class User(models.Model):
username = models.TextField()
username2 = models.TextField()
age = models.IntegerField()
# TODO
- case: f_expression_with_expression_math_is_not_supported
main: |
from myapp.models import User
from django.db import models
User.objects.filter(username=models.F('username2') + 'hello')
installed_apps:
- myapp
files:
- path: myapp/__init__.py
- path: myapp/models.py
content: |
from django.db import models
class User(models.Model):
username = models.TextField()
username2 = models.TextField()
age = models.IntegerField()