Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
django error ajax CSRF token missing or incorrect without jquery
django csrf_token error 403 with js ` var httpRequest = new XMLHttpRequest(); var links = document.querySelectorAll('form') for (var i = 0; i < links.length; i++) { var link = links[i] link.addEventListener('submit', function(e) { e.preventDefault() httpRequest.onreadystatechange = function() { if (httpRequest.readyState === 4) { document.getElementById('result').innerHTML = httpRequest.responseText } } httpRequest.open('POST', this.getAttribute('action'), true) httpRequest.send() }) } ` -
Limit access to registration page. How to make it available only for not authenticated users?
I have registration page and use default login: urlpatterns = [ ... path('accounts/', include('django.contrib.auth.urls')), ... ] But question is how to make it available only for not authenticated users? For registration page (for which I have view) I'm trying to make if not request.user.is_authenticated: ... else: redirect(...) So what to do with login page? Thanks) -
calculate the time Django
I want to calculate the time between the hottest modification of the table and the amendment that will be on the table in the future to calculate the speed of service to customers and I want to calculate how many customers were served at a certain time? class Customer(models.Model): customer_bank = models.ForeignKey('Bank', on_delete=models.SET_NULL,related_name='coustmer_bank' ,null=True) customer_branch = models.ForeignKey('Branch', on_delete=models.SET_NULL,related_name='coustmer_branch',null=True) booking_id = models.CharField(max_length=120, blank= True) identity_type = models.ForeignKey('IdentityType',on_delete=models.SET_NULL,related_name='identity_type',null=True) identity_or_passport_number = models.CharField(max_length=20) bank_account_no = models.CharField(max_length=15) Done = models.BooleanField(default=False) booking_date_time = models.DateTimeField(auto_now_add=True, auto_now=False) Entrance_date_time = models.DateTimeField(auto_now_add=False, auto_now=True) how to do it ? -
Filter/display elements based on selected category
I am still very new to Django and I stucked with one Issue. I have built Models as defined below: # models.py from django.db import models from bifrost.models import CustomUser from django.urls import reverse # Create your models here. # Model Projektu class Project(models.Model): PROJECT_TYPE = ( ('Scrum', 'Scrum'), ('Kanban', 'Kanban'), ) project_key = models.CharField(max_length=8) project_name = models.CharField(max_length=160) project_type = models.CharField(max_length=10, choices=PROJECT_TYPE) project_lead = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, blank=True) project_date_created = models.DateField(null=True, blank=True) def __str__(self): return self.project_name def get_absolute_url(self): return reverse('project-detail', args=[str(self.id)]) class Issue(models.Model): ISSUE_PRIORITY = ( ('C', 'Critical'), ('H', 'High'), ('M', 'Medium'), ('L', 'Low'), ) issue_type = models.TextField(default='Issue', editable=False) issue_id = models.IntegerField(primary_key=True) issue_date_created = models.DateField() issue_date_updated = models.DateField(null=True, blank=True) issue_project = models.ForeignKey(Project, on_delete=models.CASCADE) issue_title = models.TextField() issue_description = models.TextField(null=True, blank=True) issue_epic = models.ForeignKey(Epic, null=True, blank=True, on_delete=models.CASCADE) issue_sprint = models.ForeignKey(Sprint, on_delete=models.CASCADE, null=True, blank=True) issue_priority = models.CharField(max_length=8, choices=ISSUE_PRIORITY) issue_assignee = models.ForeignKey(CustomUser, on_delete=models.CASCADE, related_name='assignees', null=True, blank=True) issue_author = models.ForeignKey(CustomUser, on_delete=models.CASCADE, related_name='authors') issue_remaining_estimate = models.IntegerField(null=True, blank=True) # w minutach issue_time_logged = models.IntegerField(default='0') issue_attachment = models.FileField(null=True, blank=True) issue_backlog_order = models.IntegerField(null=True, blank=True) Now I would like to display list of Issues, that relates to selected Project. I read about creating a dictionary in view or proper queryset, but no solution works for me :( How can … -
NoReverseMatch at /posts/ Reverse for 'detail' with keyword arguments '{'id': 1}' not found. 1 pattern(s) tried: ['posts/(?P<slug>[^/]+)/$']
I am trying to use slug as url in post detail. But this gives me error like this .It says error is realted to posts.view.detail when my database is empty. but after adding few posts from admin interface i get error something like this What is wrong here? NoReverseMatch at /posts/ Reverse for 'detail' with keyword arguments '{'id': 1}' not found. 1 pattern(s) tried: ['posts/(?P[^/]+)/$'] posts/models.py from django.db import models from django.urls import reverse from django.db.models.signals import pre_save from django.utils.text import slugify # Create your models here. def upload_location(instance, filename): #filebase, extension = filename.split(".") # return "%s/%s.%s" %(instance.id,instance.id, extension) return "%s/%s" %(instance.id, filename) class Post(models.Model): title = models.CharField(max_length= 120) slug = models.SlugField(unique=True) image = models.ImageField(upload_to=upload_location, null=True, blank = True, width_field="width_field", height_field="height_field") height_field = models.IntegerField(default=0) width_field = models.IntegerField(default=0) content = models.TextField() updated = models.DateTimeField(auto_now=True, auto_now_add=False) timestamp = models.DateTimeField(auto_now=False, auto_now_add=True) def __unicode__(self): return self.title def __str__(self): return self.title def get_absolute_url(self): return reverse("posts:detail", kwargs={"slug": self.slug}) #return "/posts/%s/" %(self.id) class Meta: ordering: ["-timestamp", "-updated"] def create_slug(instance, new_slug=None): slug = slugify(instance.title) if new_slug is not None: slug = new_slug qs = Post.objects.filter(slug=slug).order_by("-id") exists = qs.exists() if exists: new_slug = "%s-%s" %(slug, qs.first().id) return create_slug(instance, new_slug=new_slug) return slug def pre_save_post_receiver(sender, instance, *args, **kwargs): if not instance.slug: … -
Can I publish a web app that I built on repl.it
I have been working on my web app using Django as the backend and HTML, CSS and javascript as the frontend I am doing all of these projects on repl.it the reason I am doing on repl.it is because I want to access my project anytime, anywhere and on any computer so that I can work on my project as often as possible. The other reason I chose repl.it is because I didn't want to bother setting up these project on my computer. MY QUESTION IS CAN I PUBLISH MY PROJECT THAT I BUILT ON REPL.IT???? -
Comments are diplaying on every post django?
Hey guys I am trying to make a comment form in django but the problem I am facing is that while posting that comment ,It gets posted on every other post .. I want it to be specific to the post where the user will coment as a normal comment form works. Here,s the views.py def BlogDetail(request,pk): post = get_object_or_404(Post,pk = pk) comment_view = Comment.objects.all() comment = CommentForm() if request.method == 'POST': form = CommentForm(request.POST) if form.is_valid(): form = form.save(commit = False) form.save() return redirect('blog',pk = post.pk) else: form = CommentForm() return render(request,'app/blog.html',{'blog_object':post,'comment':comment, 'comment_view':comment_view}) Here,s the html code {% for i in comment_view %} <p>{{i.name}}</p> <p>{{i.body}}</p> {% endfor %} -
Django Python how to calculation time difference given two time strings
In Django Python, I have 2 timestring for HH:mm, how can I get the duration (difference) ? Eg: 15:30 and 11:00 ---> difference is 04:30 19:28 and 12:25 ---> difference is 07:03 -
Django does not return expected view
my site uses a category rating feature so that members can request a new category. If at least 100 others Members have successfully rated on the request, the category will get created. If there are 100 positives votes i want to return a special template to the user which has provided the last positiv rating. return render(request, 'MyProject/Category/category_request_accepted.html', {'new_category': new_category}) views.py def category_request_up_vote (request, pk): category_request = get_object_or_404(CategoryRequests, pk=pk) try: if request.method == 'GET': if category_request.author == request.user: messages.error(request, 'You are trying to vote a request you created by your own. Thats not possible (Transmision ignored).') return redirect('category_request_detail', pk=category_request.pk) if CategoryRequests_Vote.objects.filter(voter=request.user, voted=category_request).exists(): messages.error(request, 'You already Voted this request. Double votes are not allowed (Transmision ignored).') return redirect('category_request_detail', pk=category_request.pk) else: if category_request.up_vote == 100: messages.error(request, 'This request is already closed (Transmision ignored).') return redirect('category_request_detail', pk=category_request.pk) if category_request.up_vote >= 99: new_category = Category( title=category_request.title, description=category_request.description, cover=category_request.cover ) category_request.up_vote = F('up_vote') + 1 category_request.status = 'Accepted' category_request.save() new_category.save() return render(request, 'MyProject/Category/category_request_accepted.html', {'new_category': new_category}) else: category_request.up_vote = F('up_vote') + 1 category_request.save() CategoryRequests_Vote.objects.create(voter=request.user, voted=category_request) messages.success(request, 'You have successfully Provided an Up-Vote for this Request.') return redirect('category_request_detail', pk=category_request.pk) else: messages.error(request, 'Uuups, something went wrong, please try again.') return redirect('category_request_detail', pk=category_request.pk) except: messages.error(request, 'Uuups, something went wrong, … -
How to use ModelFrom with django-address?
I'm looking to use django-address to store an Address against a Profile. Entering an address through both my webpage and the Django admin results in an Address being saved, however, the Address is not being stored against the Profile, i.e. the Profile object does not end up with an Address. How do I get the Address to be saved against the Profile model? profiles/forms.py from django import forms from profiles.models import Profile from address.forms import AddressField, AddressWidget class ProfileUpdateForm(forms.ModelForm): class Meta: model = Profile fields = ['somefieldsthatsave', 'address', ] field_classes = { 'address': AddressField, } widgets = { 'address': AddressWidget, } profiles/models.py import datetime from django.db import models from django.urls import reverse from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from guardian.shortcuts import assign_perm from address.models import AddressField class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) address = AddressField(blank=True, null=True, on_delete=models.CASCADE) class Meta: ordering = ["-id"] permissions = ( ('view_profile', 'View profile'), ) def save(self, *args, **kwargs): super().save(*args, **kwargs) assign_perm('view_profile', self.user, self) @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) @receiver(post_save, sender=User) def save_user_profile(sender, instance, **kwargs): instance.profile.save() profiles/views.py from django.views.generic.edit import UpdateView from guardian.mixins import PermissionRequiredMixin from profiles.models import Profile from profiles.forms import ProfileUpdateForm class ProfileOverview(PermissionRequiredMixin, … -
DJANGO - AJAX request.files empty
This problem killed all my weekend so appreciate all the help i can get. I have a form that upload reports by category. When submit form without ajax there is no problem. Bu when i switch to ajax, ajax doesn't send the file data to server. print(self.request.FILES) returns <MultiValueDict: {}> This is html output of crispy form, so enctype="multipart/form-data" does exist. <form class="form-horizontal my-2 mx-2" id="newReportForm" method="post" enctype="multipart/form-data"> views.py class ProjectMainView(View): def get(self, request): template_name = 'SiteMangement/index.html' form_class = newReportForm return render(self.request, template_name, {'form': form_class}) def post(self, request): if request.is_ajax(): print(self.request.FILES) data = self.request.POST form = newReportForm(self.request.POST,self.request.FILES) form.save(commit=False) if form.is_valid(): data = {'is_valid' : True} else: print(form.errors) data = {'is_valid' : False, 'form_errors' : form.errors} return JsonResponse(data) my ajax post $(document).ready(function() { var newRepForm = $('#newReportForm'); newRepForm.submit(function(event){ $.ajax({ type: "POST", url: "", dataType: 'json', data: { report_type :$('#id_report_type').val() , report_projects :$('#id_report_projects').val(), report_date : $('#id_report_date').val(), report_name:$('#id_report_name').val(), report_file: $('#id_report_file').val() }, success: function (data) { $('#message').html("<p class='text-center text-success font-weight-bold'>Success</p>"); }, error: function(data) { $("#message").html("<p class='text-center text-danger font-weight-bold'>Failed</p>"); } }); return false; }); }); -
Can I publish my web app that I built on repl.it?
I have been working on my web app using Django as backend and html,css and js as my frontend I am doing all of these projects on repl.it, the reason I am doing these is because I want to access my project anytime, anywhere and on any computer so that I can work on my project as often as possible. The other reason I chose repl.it is because I didn't want to bother setting up these project on my computer. *****MY QUESTION IS***** Can I publish my project that I built on repl.it???? IF YES HOW???? -
Trouble using a custom tag correctly with Django
Summary I've been trying to get a custom tag working in Django, but seemingly it wont register correctly. The index file looks to load correctly, it just complains about the tag not being registered correctly. What I've done right now is just to put the .py file where I register the tag inside an app that is in the django installed apps part. Should I be doing something else to ensure the tag registers properly? Further info The error I get: Invalid block tag on line 1: 'show_loans'. Did you forget to register or load this tag? The view where I call the tag index.html {% show_loans %} The python file where i try to register the tag loansTable.py from .models import Loan from datetime import datetime from django import template register = template.Library() @register.simple_tag('loansTable.html') def show_loans(): l1 = Loan() l2 = Loan() l1.loanedDate_date = datetime.now l2.handinDate_date = datetime.now l2.loanedDate_date = datetime.now l2.handinDate_date = datetime.now loans2 = { l1, l2 } return {'loans': loans2} Thanks for your help. -
Django serializers create method gets empty validated data
Im trying to create new sheet. My serializer: class PostSandBox(serializers.Serializer): def create(self, validated_data): print(validated_data) return Sheets.objects.create(**validated_data) Viewset: class Sandbox(mixins.CreateModelMixin, viewsets.GenericViewSet): serializer_class = PostSandBox So my problem is, validated_data is always empty. How can i solve this -
Preventing Multiple Login with same login credentials on Geonode
I'm just started with genode customization and sucked on this problem how can I prevent user to login anywhere? I need to set 1 session per user which makes theme logout anywhere else if login a new one.. any one works with GeoNode I works with django but really hard for me to find out how do that? cause just starting with python ;) find out the login model here is the code : @on_ogc_backend(geoserver.BACKEND_PACKAGE) def do_login(sender, user, request, **kwargs): """ Take action on user login. Generate a new user access_token to be shared with GeoServer, and store it into the request.session """ if user and user.is_authenticated(): token = None try: Application = get_application_model() app = Application.objects.get(name="GeoServer") # Lets create a new one token = generate_token() AccessToken.objects.get_or_create( user=user, application=app, expires=datetime.datetime.now() + datetime.timedelta( days=1), token=token) except BaseException: u = uuid.uuid1() token = u.hex # Do GeoServer Login url = "%s%s?access_token=%s" % (settings.OGC_SERVER['default']['PUBLIC_LOCATION'], 'ows?service=wms&version=1.3.0&request=GetCapabilities', token) cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) jsessionid = None try: opener.open(url) for c in cj: if c.name == "JSESSIONID": jsessionid = c.value except BaseException: u = uuid.uuid1() jsessionid = u.hex request.session['access_token'] = token request.session['JSESSIONID'] = jsessionid -
Boto3/S3/Django: Avoid blocking the event loop while file hash being calculated
From a gunicorn+gevent worker, making (multipart) uploads to S3 via django-storages, how can I make sure that during the calculation of the hash of file/part contents, the event loop is not blocked? Looking in the source for django-storages, there doesn't really seem to be any scope for passing in the md5(/another other hash), and in the source for botocore there doesn't seem to be scope for yielding the event loop while the hash is being calculated. -
Adding an extra field to a serializer without it being in the model
I've been trying to add the field 'distance' to the fields included in the results. This field is however, not in the model or the serializer and I just wondered what the best way to return such a field would be? Any help is greatly appreciated. Thanks! The view is: class PlaceViewSet(viewsets.ModelViewSet): """ API endpoint that allows places to be viewed or edited. """ current_lat = 54.52984 current_lon = -1.5609 """ Haversine formula used to sort places by distance (closest first). """ query = "select distinct id, (((acos(sin((" + format(current_lat) + \ "*pi()/180)) * sin((lat*pi()/180))+cos((" + format(current_lat) + \ "*pi()/180)) * cos((lat*pi()/180)) * cos(((" + format(current_lon) + \ " - lon)*pi()/180))))*180/pi())*60*1.1515) AS distance " \ "from mobileapi_place " \ "order by distance asc" queryset = Place.objects.raw(query) serializer_class = PlaceSerializer Below is the serializer. class PlaceSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Place fields = ('title', 'lat', 'lon', 'featured_image_url', 'created_at') -
Django: How can I redirect to a ListView with a Pagination after submitting a form?
I am using Django bootstrap modal form and when I update some record from a paginated page it redirect to the very first page of the list view. I want to redirect it to the paginated page of the record selected/updated. My list view with update in the left corner and pop up modal form to update it After I Click save it will redirect to the record list without the pagination parameter, How can I add pagination parameter in success url. Please help My views.py def record_list(request): queryset_list = Record.objects.filter(recorded__lte=timezone.now()).order_by('-recorded') query = request.GET.get("q") if query: for term in query.split(): queryset_list = Record.objects.filter(Q(persons__last_name__icontains=term) | Q(persons__first_name__icontains=term) | Q(persons__middle_name__icontains=term) | Q(title__icontains=term) ) paginator = Paginator(queryset_list.order_by('-recorded'), 10) page_request_var = "page" page = request.GET.get('page', 1) try: queryset = paginator.page(page) except PageNotAnInteger: queryset = paginator.page(1) except EmptyPage: queryset = paginator.page(paginator.num_pages) context = { "record_list": queryset, "page_request_var": page_request_var, "title": "List", } return render(request, 'Bato_Cabugao/Record/record_list.html', context) class RecordUpdateView(LoginRequiredMixin,generic.UpdateView): template_name = 'Bato_Cabugao/Record/record_update.html' model = Record form_class = RecordForm Models.py class Record(models.Model): title = models.CharField(max_length=200) persons = models.ManyToManyField(Person) details = models.TextField() recorded = models.DateTimeField(default=timezone.now) def __str__(self): return self.title def get_absolute_url(self): return reverse('Bato_Cabugao:list_record') record_list.html - pagination {% if record_list.has_other_pages %} <nav aria-label="Page navigation example"> <ul class="pagination justify-content-end"> {% if record_list.has_previous … -
Django: Update a model attributre after a certain period of time
I have a car reservation form. The form redirects to a view after saving. The view fetches the form id i.e., an instance of my Reservation model, and then selects the specific vehicle from the form's chosen_car field, then, should update that vehicle's available attribute to False. Now, a user books a car for a fixed period of time. When the time gets over, I want the available attribute of the specific vehicle instance in the Vehicle model to be set to True. I tried to implement this using while loop in a view but it just isn't working. I want this process to be somewhat automated, i.e., for a vehicle instance the available attribute updates to False when that vehicle is reserved, and updates to True when the time gets over. This way it becomes available for other users to book. # My Vehicle model: class Vehicle(models.Model): car_no = models.CharField (max_length = 20, blank=False) car_model = models.ForeignKey (Car_model, on_delete=models.CASCADE) garage = models.ForeignKey (Garage, on_delete=models.CASCADE) category = models.ForeignKey (Category, on_delete=models.CASCADE) available = models.BooleanField(default=True) # The Reservation model: class Reservation(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) date_from = models.DateField(auto_now=False, auto_now_add=False, blank=False) date_to = models.DateField(auto_now=False, auto_now_add=False, blank=False) time_from = models.TimeField(auto_now=False, auto_now_add=False, blank=False) time_to = … -
How to authenticate already signed up clients visting my website with JWT tokens?
I have a django website where the APIs are currently username:password based. I would like to introduce JWT token and move away from username:password based approach for accessing API endpoints. There are lots of tutorials out there that explains how it can be done. But I have a confusion. In all the tutorials I found, they show the code that needs to be written in the backend and then they us Postman to do the API testing. So they create separate API to get token and then include the token along with regular POST parameters and get the response back. This is great but what I don't understand is how is a client who is logged in my website use this feature? Currently once they are logged in and any API calls they make to get information, I already know their username and password and hence I am able to give the information back. But once I introduce JWT, do I have to ask the client to first visit a separate URL to get the token? And how are they supposed to pass me the token? Currently they just login with their username and password and that's it. I know … -
How to mock redis in django using django-redis and mockredis
Redis is configured as following in django settings: CACHES = { 'default': { 'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://127.0.0.1:6379/', 'OPTIONS': { 'CLIENT_CLASS': 'django_redis.client.DefaultClient', } } } CACHE_TTL = 3600 I have the following view which uses redis cache: from django.core.cache import cache class TestView(APIView): def post(self, request): serializer = TestSerializer(data=request.data) if serializer.is_valid(): serializer.save() data = serializer.data # save new data to cache cache.set(data['title'], data, timeout=CACHE_TTL) return Response(data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) and I have this test that uses the view above and uses cache: class MyTest(APITestCase): @patch('redis.StrictRedis', mock_strict_redis_client) def test_create(self): url = reverse('test-list') data = {'title': '77test'} response = self.client.post(url, data) self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertEqual(IP.objects.count(), 1) self.assertEqual(IP.objects.get().title, '77test') The problem is that it uses real redis cache instead of using mocked one. I'm looking through http://niwinz.github.io/django-redis/latest/#_testing_with_django_redis and https://github.com/locationlabs/mockredis and can't understand what I'm doing wrong. -
confused about adding apps to INSTALLED_APPS
I just started learning Django and I watch 2 different courses on Youtube. And adding apps to a project got me confused right from the start. In the first tutorial they tell me to add an app to a list of installed apps like this: INSTALLED_APPS = [ 'blog.apps.BlogConfig', ... ... ... ] and in the other tutorial they simply add the app name to the list: INSTALLED_APPS = [ 'blog', ... ... ... ] Could you please explain me the difference? And how should I add apps to the project? -
How To Print List Of JsonResponse Data in html
hy i am creat a form and i am submit the form using ajax and i recive the list of data in my success ajax this is my form : <form id="myForm" method="POST"> <input type="submit" value="Refresh"> </form> this is my view function def refresh(request): user = usertab.objects.all().values() d={"data" : list(user)} return JsonResponse(d) and this is my ajax : $(document).on('submit','#myForm',function(e){ e.preventDefault(); $.ajax({ type:'POST', url: '/refresh/', data:{ csrfmiddlewaretoken : "{{ csrf_token }}" }, success: function(d){ for (a in d['data']){ alert(a) } }, error: function(xhr, status, error) { alert(xhr.responseText); } }); }); ia ma recive all user data in my success ajax and i want to print this data in table using for loop how i do that please tell me i am apply for loop in dict but i am got alert in aray form 0 then 1 then 2 i want to print this data in hrml table please tell me this is my table : <table id="myTable"> <thead> <tr> <th>id</th> <th>username</th> <th>email</th> </tr> </thead> <tbody> <tr> <td> ??????? </td> <td> ??????? </td> </tr> </tbody> </table> -
What files to omit in .coveragerc to get coverage report using django-pytest and pytest-cov?
I have a Django project that uses pytest-django for testing. Besides, I am also using pytest-cov to produce a coverage report. I want to omit files that should not be checked for generating the report, and also exclude some lines that are not relevant for the report, so I have a .coveragerc file with the following content: [run] branch = True omit = */migrations/* */tests/* ./manage.py [report] # Regexes for lines to exclude from consideration exclude_lines = # Have to re-enable the standard pragma pragma: no cover # Don't complain about missing debug-only code: def __repr__ if self\.debug # Don't complain if tests don't hit defensive assertion code: raise AssertionError raise NotImplementedError # Don't complain if non-runnable code isn't run: if 0: if __name__ == .__main__.: ignore_errors = True [html] directory = coverage_html_report So, basically I would like to know what files I should omit in order to generate a significant report. For example, I don't see the point of including the generated migrations in the report or the manage.py file (correct me if I am wrong) since this is generated when creating a Django project. However, I wonder if I should also omit the files that are inside the … -
Django testing database for multiple developers
Our development database (MariaDB in this case) is on a server and the dev db instance is shared among multiple developers working on their local desktops. If we all run the Django tests (manage.py tests) at the same time, would there potentially be collisions where the local test runners would create/delete the same objects in the test db instance? I'm assuming each developer is supposed to have their own local database so that they are testing in isolation before deploying changes to a server? This is running on Django 1.11.