Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django field name starting with a number
I'm wondering if it's possible to name a field starting with a number: class Stock(models.Model): ... 24h_volume = models.PositiveIntegerField() -
Update Django template without page refresh
I have Django code like this and i am getting connected device details dynamically and i am updating in template, I am getting what i want but i want refresh everytime to know whether any new devices or connected or not Here is My code class UserDashBoard(LoginRequiredMixin, TemplateView): def get_context_data(self, **kwargs): context = super(UserDashBoard, self).get_context_data(**kwargs) context['total_devices'] = get_device_mac_details(cmd='iw dev wlan0 station dump |grep Station |wc -l') return context Here is my template looks like <table class="table"> <tr> <th class="text-left">MAC Id</th> </tr> {% for device in total_devices %} <tr> <td class="text-left">{{ device }}</td> </tr> {% endfor %} </table> How can i get details without refreshing page -
Phantom Postman in Django App
I've encountered a strange problem in my django site-- the django-postman app is present but can't be edited nor deleted. I need to tweak the views but none of the changes work. I've even deleted the entire URLs and views and the postman app works fine. I thought there might be a duplicate directory that has all these files, but thats not it. What else could be the issue here? And what is a solution? -
Is pyenv or virtualenv enssential for Django?
For the first time, I made an environment for Django with virtualbox and vagrant (CentOS 7). But every tutorial I saw says I need to use pyenv or virtualenv. I think they are used to make a virtual environment for Django. But I don't know why I need to use pyenv or virtualenv. (For example, Cakephp3 doesn't need packages like pyenv or virtualenv.) And I was using virtualbox and vagrant, which are already virtual environment, so I think I was making virtual environment inside another virtual environment. I am not sure if this is meaningful. Maybe pyenv and virtualenv are not necessary if I am using virtual environment like virtualbox or vmware? Are they essential for Django? When I deploy Django in actual server, do I still need to use pyenv or virtualenv? -
Nginx default page showing. Cannot get app to display
first time Nginx user. Trying to connect Nginx to Gunicorn running a django app. The app is not actually written yet so once everything is configured, it would just display an under construction page. I can't seem to get the Nginx configuration correct to pass requests on to Gunicorn then to Django. Instead it always shows the Nginx default page. Greatly appreciate any help! Here is /etc/nginx/sites-available/: server { listen 80; #server_name <server IP>; server_name <mysite.com>; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/<my user acct>/<my app>/<my site>; } location / { include proxy_params; proxy_pass http://unix:/home/<my user acct>/<my app>/<my site>/<my site>.sock; } } Here is /etc/nginx/sites-available/default: ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # http://wiki.nginx.org/Pitfalls # http://wiki.nginx.org/QuickStart # http://wiki.nginx.org/Configuration # # Generally, you will want to move this file somewhere, and start with a clean # file but keep this around for reference. Or just disable in sites-enabled. # # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## # Default server configuration # server { listen 80 default_server; listen [::]:80 default_server; … -
Django test setup not being used
I am using Django cookiecutter 1.11 for a project. Trying to write some basic tests for a model. But the setup method is not being used in the test cases. from django.test import TestCase from myapp.users.models import User from ..models import Book class ModelTests(TestCase): def setup(self): self.username = 'john' self.password = '123' self.user = User.objects.create(name=self.username, password=self.password ) def test_create_book(self): Book.objects.create(artist=self.user, title=“An Art Book“, category=“Art”, ) self.assertEquals(Book.objects.all().count(), 1) I get this error message after running manage.py test Book.objects.create(artist=self.user, AttributeError: 'ModelTests' object has no attribute 'user' But it works when I put the lines from setup into the test case. Did I miss something? -
Django Form Handling Recommendations?
Let's say I have models like question and answers, created forms for question(ModelForm) and answers(BaseInlineFormSet) doubt 1 now I want to create the view that displays question and answers forms with prev and next option, so users, admin can use next to add a new question and related answers, recommended approach? doubt 2 Is it possible to embed Question(ModelForm) and Answer(BaseInlineFormSet) into single formset? -
Json Fields search with django unexpected behavior
Hi guys Im seeing a behavior than i don't understand in django postgres json search. Im Using django 1.11 and django orm with psycopg2 driver. It goes as follows: The json in the model field looks like this. {"2018": [1, 2, 3]} If I use this query: models.mymodel.objects.filter(jsonfield__2018__contains=1) Out[97]: <QuerySet []> So as you can see i get an empty query. Then I tried to do this just for testing purposes. New Json: [ {"2018": [1, 2, 3]}] New Query: models.mymodel.objects.filter(jsonfield__0__2018__contains=1) Out[98]: <QuerySet []> It still gives me no response. Then I finally tried this. New Json: [ {"2018_1": [1, 2, 3]}] New Query: models.mymodel.objects.filter(jsonfield__0__2018_1__contains=1) Out[100]: <QuerySet [<MyModel: MyModel object>]> This one responds and I cannot wrap my head around it. Does anyone know why is this? -
Lost my app.sock file while setting up my Django server on Digital Ocean
In the mix of renaming files/moving files/directories between my server and my Bitbucket repo, the app.sock file was removed. How do I get it back? I was following this tutorial whilst setting up my server. Previously the server comprised of env (virtual environment), static, draft (my app), draft1.sock and manage.py - now it's the same but draft1 is renamed to olddraft and the sock file is gone. So how do I retain the sock file? -
Heroku cannot detect default language(python-3.6.4) even runtime.txt exists
I try to upload app and run on heroku source files are below. https://github.com/utahub/django_attend-managing-app/tree/heroku_check with command git push heroku heroku_check:master but even thought runtime.txt exists in Root Dir, Heroku does not detect defauld language. remote: Compressing source files... done. remote: Building source: remote: remote: ! No default language could be detected for this app. remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. remote: See https://devcenter.heroku.com/articles/buildpacks remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to uta-attend-managing-app. remote: I stacked with this problem for 2 days. Please tell me why this is happened. Thankyou in advance. -
Heroku H12 errors with Django
I have a Djano 1.8 application running on 6 Heroku dynos. Every once in a while, a request that is normally very fast (200ms) comes in and hits the Heroku router 30 second timeout. Then that dyno times out other follow-on requests, sometimes taking 25 minutes to stabilize and go back to serving requests without timing out. I'm using gunicorn with default web_concurrency (2 workers per dyno). I read Heroku's article on timeout behavior here, and am considering adding something like --timeout 20 to my gunicorn startup in the Procfile. That seems to be what they are recommending. Do you think that will solve the problem? From looking at the gunicorn documentation on the timeout setting it says: Workers silent for more than this many seconds are killed and restarted. But my workers aren't silent are they? They are trying to process requests but are hung and unable to for some reason. Do I understand that correctly? -
Always image cannot be sent normally What is wrong in my code?
Always image cannot be sent normally. I wrote in views.py def photo(request): d = { 'photos': Post.objects.all(), } return render(request, 'registration/accounts/profile.html', d) def upload_save(request): form = UserImageForm(request.POST, request.FILES) if request.method == "POST" and form.is_valid(): data = form.save(commit=False) data.user = request.user data.save() return render(request, 'registration/photo.html') else: return render(request, 'registration/profile.html') in profile.html <main> <div> <img class="absolute-fill"> <div class="container" id="photoform"> <form action="/accounts/upload_save/" method="POST" enctype="multipart/form-data" role="form"> {% csrf_token %} <div class="input-group"> <label> <input id="file1" type="file" name="image1" accept="image/*" style="display: none"> </label> <input type="text" class="form-control" readonly=""> </div> <div class="input-group"> <label> <input id="file2" type="file" name="image2" accept="image/*" style="display: none"> </label> <input type="text" class="form-control" readonly=""> </div> <div class="input-group"> <label> <input id="file3" type="file" name="image3" accept="image/*" style="display: none"> </label> <input type="text" class="form-control" readonly=""> </div> <div class="form-group"> <input type="hidden" value="{{ p_id }}" name="p_id" class="form-control"> </div> <input id="send" type="submit" value="SEND" class="form-control"> </form> </div> </div> </div> </main> in forms.py class UserImageForm(forms.ModelForm): image = forms.ImageField() class Meta: model = ImageAndUser fields = ('image',) n my system,I can send 3 images at most each one time, so there are 3 blocks.Now always program goes into else statement in upload_save method, I really cannot understand why always form.is_valid() is valid.When I send only 1 image, same thing happens.So the number of image does not cause the error. … -
Is it possible to use django-filter OrderingFilter with function based views?
I'm trying to create an order by dropdown in a template that will order a queryset by fields of my model. Picture of ordering menu I'm going for I understand how to use the django-filter package to filter by model but I can't find any documentation on how to use the OrderingFilter without using class based views. I already have tons of function based views so I'm not looking to switch to class based views right now. Here is my code so far views.py def homepage(request): course_review_list = CourseReview.objects.all() course_review_filter = CourseReviewFilter(request.GET, queryset=course_review_list) return render(request, 'homepage.html', { 'course_review_filter':course_review_filter}) filters.py from course.models import CourseReview import django_filters from django_filters import OrderingFilter class CourseReviewFilter(django_filters.FilterSet): class Meta: model = CourseReview exclude = ['courseDepartment','courseNumber', 'reviewId','instructorId', 'courseReviewTagId', 'review', 'reviewDate' ] o = OrderingFilter( # tuple-mapping retains order fields=( ('courseDepartment', 'Course Department'), ('rating', 'rating '), ), ) homepage.html <form method="get"> {{ course_review_filter.form.as_p }} <button type="submit">Search</button> </form> <ul> {% for course_review in course_review_filter.qs %} <li>{{ course_review.courseDepartment }} - {{ course_review.rating }}</li> {% endfor %} </ul> -
Can't login users with specific permissions
I'm creating a school, kinda, and I created a group called Instructors. Instructors are users with permission to create courses. They have all permissions of the courses application except those of the Subject model). Whenever I try logging into the courses creation page with an instructor, I get the login page over and over again. It's only the superuser that can login successfully. Instructors just get the login page over and over again. Here are my files: models.py from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey from .fields import OrderField class Subject(models.Model): title = models.CharField(max_length=200) slug = models.SlugField(max_length=200, unique=True) class Meta: ordering = ('title',) def __str__(self): return self.title class Course(models.Model): owner = models.ForeignKey(User, on_delete=models.CASCADE, related_name='courses_created') subject = models.ForeignKey(Subject, on_delete=models.CASCADE, related_name='courses') title = models.CharField(max_length=200) slug = models.SlugField(max_length=200, unique=True) overview = models.TextField() created = models.DateTimeField(auto_now_add=True) class Meta: ordering = ('-created',) def __str__(self): return self.title class Module(models.Model): course = models.ForeignKey(Course, on_delete=models.CASCADE, related_name='modules') title = models.CharField(max_length=200) description = models.TextField(blank=True) order = OrderField(blank=True, for_fields=['course']) class Meta: ordering = ['order'] def __str__(self): return '{}. {}'.format(self.order, self.title) class Content(models.Model): module = models.ForeignKey(Module, on_delete=models.CASCADE, related_name='contents') content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE, limit_choices_to={ 'model__in':('text', 'video', 'image', 'file') }) object_id = models.PositiveIntegerField() item = … -
How to use GPS location in Django REST API?
I am making a REST API with Django for a restaurant search app. I need to get a list of restaurants within a distance of X meters from my location. I am not sure how to store this on my database (I am using PostgreSQL) and how to retrieve this list. I searched online some options and I found PostGIS as an extension to Postgres that can be used in Django, but I still want to listen to some of your recommendations. Thank you -
Can't display image on browser with django rest framework
I've a problem similar to this SO post, but none of its answers helped me to solve my issue. Here we are : I'm able to save an image on the server but not able to get Image from API image hyperlink. My files : model.py class Summary(models.Model): question_text = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now_add=True) cover_image = models.ImageField(upload_to='cover_image/', max_length=255) userProfileSummary = models.ManyToManyField(UserProfile, through='UserProfileSummary') def __str__(self): return self.question_text views.py class Summary(models.Model): question_text = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now_add=True) cover_image = models.ImageField(upload_to='cover_image/', max_length=255) userProfileSummary = models.ManyToManyField(UserProfile, through='UserProfileSummary') def __str__(self): return self.question_text serializer.py class SummarySerializer(serializers.ModelSerializer): """A serializer for summary item""" cover_image = serializers.ImageField(max_length=None, use_url=True) class Meta: model = models.Summary exclude = ('userProfileSummary',) settings.py STATIC_URL = '/static/' STATICFILES_DIRS =( os.path.join(BASE_DIR, 'static'), '/static', ) MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') urls.py from django.urls import path, include from rest_framework.routers import DefaultRouter from django.conf.urls.static import static from django.conf import settings from . import views router = DefaultRouter() router.register('Hello-viewset', views.HelloViewSet, base_name='hello-viewset') urlpatterns= [ path('hello-view/', views.HelloApiView.as_view()), path('UserProfileSummary/<int:id>/', views.UserProfileSummaryViewSet.as_view()), path('', include(router.urls)) ]+static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) App structure : - myproject/ - cover_image/ - media/ - myproject_api/ - models.py - serializers.py - ... - myproject/ - settings.py - ... I can Make a Request For POST successfully & It show correct image link but … -
django-channels Connecting websocket to channel
How do I connect the Websocket client to the Django channel? I created a basic handler and a the router: from channels.routing import route def ws_message(message): print(message["text"]) channel_routing = [ route("websocket.receive", ws_message), ] But when I try to connect a websocket client: import websocket ws = websocket.WebSocket() ws.connect("ws://127.0.0.1/") it throws the following error: Handshake status 200 -
How to get rid of superfluous slashes in url in django
I have an issue with extra slashes in the url in django. I have url subdomain.domain.com/, but subdomain.domain.com//// shows the same page. I need that people, who entering subdomain.domain.com////, are redirected to subdomain.domain.com/ or receive 404. This is the way how I define the url in urls.py: urlpatterns = [ url(r'^$', views.home, name='home'),] -
Django JSON Response to HTML Page Not Working
I have a Django project where I am trying to get AJAX working. I can't seem to send the JSON response to the HTML page. When I check the chrome console the JSON data is not returned only parses the HTML. This is my Views.py where I have the cart logic defined: def cart_home(request): cart_obj, new_obj = Cart.objects.new_or_get(request) return render(request, "carts/carts.html", {"cart": cart_obj}) def cart_update(request): print("Hello") product_id = request.POST.get('product_id') if product_id is not None: try: product_obj = Product.objects.get(id=product_id) except Product.DoesNotExist: print("Product is gone") return redirect("cart:home") cart_obj, new_obj = Cart.objects.new_or_get(request) if product_obj in cart_obj.products.all(): cart_obj.products.remove(product_obj) added = False else: cart_obj.products.add(product_obj) added = True request.session['cart_items'] = cart_obj.products.count() if request.is_ajax(): print("Ajax request") json_data = { "added": added, "removed": not added, } return JsonResponse(json_data) return redirect("cart:home") This is javascript for the Ajax: <script> $(document).ready(function(){ var productForm = $(".form-product-ajax") productForm.submit(function(event){ event.preventDefault(); console.log("Form is not sending") var thisForm = $(this) var actionEndpoint; thisForm.attr("action"); var httpMethod; thisForm.attr("method"); var formData; thisForm.serialize(); $.ajax({ url: actionEndpoint, method: httpMethod, data: formData, success: function(data){ console.log("success") console.log(data) console.log(data.added) console.log(data.removed) console.log("Added", data.added) console.log("Removed", data.removed) var submitSpan = thisForm.find(".submit-span") if (data.added){ submitSpan.html("<button>Remove</button>") } else { submitspan.html("<button>Add to Basket</button>") } }, error: function(errorData){ console.log("error") console.log(errorData) } }) }) }) </script> -
model_unpickle() takes exactly 3 arguments (1 given)
I'm facing this error bellow with celery 3.1.25 and 4.1.0, this happen if I set serializing with pickle (I know is a problem with security) but I use a library that needs this kind of serialization to work with files, anyone have solved this problem?. Will add my freeze at the bottom of the question. Thank you Can't decode message body: DecodeError(TypeError('model_unpickle() takes exactly 3 arguments (1 given)', , (('data_importer', 'FileHistory'),)),) [type:u'application/x-python-serialize' encoding:u'binary' headers:{u'origin': u'gen29@f6876eb537fc', u'lang': u'py', u'task': u'data_importer_task', u'group': None, u'root_id': u'655b3b91-b48e-41c3-a893-ab7b5bdfdf79', u'expires': None, u'retries': 0, u'timelimit': [3600, None], u'argsrepr': u'()', u'eta': None, u'parent_id': None, u'id': u'655b3b91-b48e-41c3-a893-ab7b5bdfdf79', u'kwargsrepr': u"{'source': , 'importer': , 'file': , 'owner': >, 'subproject': , 'action': 'u'}"}] body: '\x80\x02)}q\x01(U\x06sourceq\x02cdjango.db.models.base\nmodel_unpickle\nq\x03U\rdata_importerq\x04U\x0bFileHistoryq\x05\x86\x85Rq\x06}q\x07(U\x06statusq\x08K\x01U\x0bfile_uploadq\tXI\x00\x00\x00upload_history/map_su/2018/02/02/7bee4c1c-751c-44df-a318-d527916148f5.xlsU\x0fcontent_type_idq\nK\x17U\x0f_django_versionq\x0bU\x061.11.9U\ncreated_atq\x0ccdatetime\ndatetime\nq\rU\n\x07\xe2\x02\x02\x16\x188\x00\r\xd7cpytz\n_UTC\nq\x0e)Rq\x0f\x86Rq\x10U\x06_stateq\x11cdjango.db.models.base\nModelState\nq\x12)\x81q\x13}q\x14(U\x06addingq\x15\x89U\x02dbq\x16U\x07defaultq\x17ubU\nupdated_atq\x18h\rU\n\x07\xe2\x02\x02\x16\x188\x00\r\xf4h\x0f\x86Rq\x19U\tobject_idq\x1aNU\x07is_taskq\x1bK\x00U\x13_content_type_cacheh\x03U\x0ccontenttypesq\x1cU\x0bContentTypeq\x1d\x86\x85Rq\x1e}q\x1f(h\x0bU\x061.11.9U\x05modelq X... (220389b) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 592, in _receive_callback decoded = None if on_m else message.decode() File "/usr/local/lib/python2.7/dist-packages/kombu/message.py", line 142, in decode self.content_encoding, accept=self.accept) File "/usr/local/lib/python2.7/dist-packages/kombu/serialization.py", line 184, in loads return decode(data) File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/usr/local/lib/python2.7/dist-packages/kombu/serialization.py", line 59, in _reraise_errors reraise(wrapper, wrapper(exc), sys.exc_info()[2]) File "/usr/local/lib/python2.7/dist-packages/kombu/serialization.py", line 55, in _reraise_errors yield File "/usr/local/lib/python2.7/dist-packages/kombu/serialization.py", line 184, in loads return decode(data) File "/usr/local/lib/python2.7/dist-packages/kombu/serialization.py", line 64, in pickle_loads return load(BytesIO(s)) DecodeError: ('model_unpickle() takes exactly 3 arguments (1 given)', , (('data_importer', … -
Circular model references
I am not quite sure about the best/idiomatic way to approach the following: I have a model called BlogPost and a model called BlogPostContent. BlogPost has a field called CurrentContent which references a related record in the BlogPostContent table. BlogPostContent has a foreign key field called Post referencing its related BlogPost. When a blog is modified, a new BlogPostContent record is created, and the BlogPost is updated such that its CurrentContent field references the newest BlogPostContent. I do this so it is possible to provide a way to rollback and specify any BlogPostContent record to use the CurrentContent It is possible for the CurrentContent to reference ANY of the BlogPostContent records related to it. If I were to model this in code, it would be: class BlogPostContent { //Content } class BlogPost { BlogPostContent currentPost; List<BlogPostContent> contentHistory; } -
Adding to userform in django before saving in database
Im sure this was working and now it's not. Anyone know what could be up? its failing at the new_user = form.save(commit=False) class Signup(View): def get(self, request): return render(request, 'accounts/signup.html') def post(self, request): form = UserCreationForm(request.POST) new_user = form.save(commit=False) email=new_user.cleaned_data.get('email') new_user.username=email if new_user.is_valid(): new_user.save() username = new_user.cleaned_data.get('username') raw_password = new_user.cleaned_data.get('password') user = authenticate(username=username, password=raw_password) login(request, user) return redirect('/accounts/home/') -
Filter on checkbox as well as the filter.py items using Django Filters
I have my filters working correctly, but I want to also filter on a checkbox that's in my result set, is this possible? My filter.py is the following: class UserFilter(django_filters.FilterSet): class Meta: model = Employee fields = ['employeeusername', 'employeefirstname', 'employeelastname', 'statusid', 'positiondesc'] My search form is the following: <form method="get"> <div class="well"> <h4 style="margin-top: 0">Filter</h4> <div class="row"> <div class="form-group col-sm-4 col-md-4"> <label/> 3-4 User ID {% render_field filter.form.employeeusername class="form-control" %} </div> <div class="form-group col-sm-4 col-md-4"> <label/> First Name {% render_field filter.form.employeefirstname class="form-control" %} </div> <div class="form-group col-sm-4 col-md-4"> <label/> Last Name {% render_field filter.form.employeelastname class="form-control" %} </div> <div class="form-group col-sm-4 col-md-4"> <label/> Status {% render_field filter.form.statusid class="form-control" %} </div> <div class="form-group col-sm-4 col-md-4"> <label/> Title {% render_field filter.form.positiondesc class="form-control" %} </div> </div> <button type="submit" class="btn btn-primary"> <span class="glyphicon glyphicon-search"></span> Search </button> </div> </form> In my result set I have the following: <table class="table table-bordered"> <thead> <tr> <th>User name</th> <th>First name</th> <th>Last name</th> <th>Title</th> <th>Status</th> <th></th> </tr> </thead> <tbody> {% for user in filter.qs %} <tr> <td>{{ user.employeeusername }}</td> <td>{{ user.employeefirstname }}</td> <td>{{ user.employeelastname }}</td> <td>{{ user.positiondesc }}</td> <td>{{ user.statusid }}</td> <td><input type="checkbox" name="usercheck" />&nbsp;</td> </tr> {% empty %} <tr> <td colspan="5">No data</td> </tr> {% endfor %} </tbody> </table> What I … -
Named groups with slashes in Django URLs
I have a set of following URLs defined: GET /data/(?P<tag>[^/]+)$ POST /data/(?P<tag>[^/]+)/action_1$ POST /data/(?P<tag>[^/]+)/action_2$ ... I would like to know whether it is possible to use tags containing slashes? E.g., when I try to get the data for the tag a/b/c, I always obtain 404 errors. Although I quote tags before forming actual URLs (i.e. /data/a%2Fb%2Fc for the previous case), the obtained URLs still do not match (though a%2Fb%2Fc should match [^/]+), because it looks like Django performs implicit unquoting, which is undesired. How can I overcome this problem without changing the URL forming scheme? -
Issue migrating DB from Local to Heroku Django
I've been working on a Django application and have recently run into a few issues pushing updates and migrating DB settings from Local to Heroku. I followed these steps: I added a few columns to my app model. Then ran python manage.py makemigrations then python manage.py migrate. I then committed these updates via github. Then I ran git push heroku master w/ Heroku CLI Then I entered heroku run python manage.py migrate Unfortunately, this did not migrate the appropriate updates I made to the DB settings in my local dev environment. The error message I received is "Column x does not exist in X-app". I ended up reverting back to my previous settings in model.py temporarily, but I would like to eventually add new columns to my database. At this point, I'm trying to assess what the best solution is to the problem. I've reviewed several other Stack Overflow questions, but haven't found one that's worked for me yet. What's odd is that I was able to migrate successfully in previous Heroku deployments. Any tips anyone has would be extremely appreciated. For reference, I'm using Python 3.6.2 and Django 1.11