Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django Carton App - Getting Ajax Working
I am using the Django Carton shopping cart add on and have got it working. I am now trying to add to cart via an ajax call and struggling to get the code working. I get an error which says "TypeError at /api/cart/↵Object of type 'property' is not JSON serializable" (on the Chrome Console). Views.py class ProductListView(ListView): (redacted for clarity) def add(request): cart = Cart(request.session) product = Product.objects.get(id=request.POST.get('id')) cart.add(product, price=product.price) added = True if request.is_ajax(): print("Ajax request") json_data = { "added": added, } return JsonResponse(json_data) return redirect('list') def remove(request): cart = Cart(request.session) product = Product.objects.get(id=request.GET.POST('id')) cart.remove_single(product) return redirect('list') def show(request): return render(request, 'carts/carts.html') def cart_detail_api_view(request): # cart_obj, new_obj = Cart.objects.new_or_get(request) cart = Cart(request.session) products = [{"name": x.name, "price": x.price} for x in cart.products.all()] cart_data = {"products": products, "total": Cart.total} return JsonResponse(cart_data) HTML Template: {% for product in cat_appetizers %} <form method="POST" class='form-product-ajax' action='{% url "shopping-cart-add" %}' data-endpoint='{% url "shopping-cart-add" %}'> {% csrf_token %} {{ product.name }} <input type="hidden" name='id' value='{{ product.id }}'> <br/> <span class='submit-span'> <button>Add to Basket</button> </span> </form> <br/> {% endfor %} {% load carton_tags %} {% get_cart as cart %} <div> <h4>This is your shopping cart</h4> <table class="cart-table"> <tbody class="cart-body"> <tr>These are the items in your basket … -
Django makemigrations error?
I'm new started to Django.where is my fault? -
Download static file displayed in the list Django
I am trying to make static files download-able from the template of my Django app. def list(request): folder = '/home/galander/Desktop/Projekty/django-pdf-generator/django-pdf/generator/static/pdfs' file_list = os.listdir(folder) return render_to_response('list.html', {'file_list': file_list}) def download_file(request): pdf_folder = '/home/galander/Desktop/Projekty/django-pdf-generator/django-pdf/generator/static/pdfs' response = HttpResponse(pdf_folder, content_type='application/pdf') response['Content-Disposition'] = 'attachment; filename="nowy.pdf"' return response list.html {% for file in file_list %} <a href="/home/galander/Desktop/Projekty/django-pdf-generator/django-pdf/generator/static/pdfs/{{ file }}">{{ file }}</a> {% endfor %} My current output is rather obvious at the moment - Django is looking for matching url pattern and it fails. My filename="nowy.odf" in download_file(request): is hard-coded atm just for testing purposes. 2 Solutions I am thinking of: 1) Create appropriate regex for url pattern in url.py to satisfy redirection to my download_file view which i fail to accomplish 2) I should change the display method for my static/pdf folder somehow All tips appreciated ! -
Django template - get object's choice field text
This is my model: class Person(models.Model): ... DOP = 1 PPP = 2 contract_choices = ( (DOP, 'always'), (PPP, 'sometimes'), ) contract = models.CharField(max_length=3, choices = contract_choices) ... I need contract field value in my template: {% for person in persons %} {{ person.get_contract_display }} {% endfor %} gives me '1' (or '2') instead of 'always' (or 'sometimes'). How can i get that string text instead of integer value? -
Pip/Django only works through CMD when there's no file path
Pip usually works fine when installing modules but when I shift-right-click on a folder and open cmd with that file path, Pip and Django are not recognised as internal or external command, operable program or batch file. -
Django - Want to search each words in a sentece using filter
I want to search each word in a sentence and put that is result['post'] dictionary but this code only search last query queries = querystring.split() for query in queries: results['posts'] = Post.objects.filter(text__icontains=query) i tried appending,extending and a lot of things but it didn't work. -
django-why bootstrap already loaded but gave no effect on the page?
hi guys im new to django, now im facing problem that the already loaded bootstrap template gave no effect on the page. i have read several post of this problem in this site, but none of it work. i use python 3.6.4 and django 2.0. here is my settings.py: STATIC_URL = '/static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"), ] installed apps: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rango' ] my index.html: <!DOCTYPE html> {% load staticfiles %} <html> <head> <title>Rango</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap.css" %}" /> the command prompt said: [17/Feb/2018 20:06:14] "GET /static/css/bootstrap.css HTTP/1.1" 200 178152 when i call an image from same static folder, it can show the picture <img src="{% static "images/alif.jpg" %}" width="500px" height="800px" alt="foto alif"> my debug set True and i use virtual environment i also check on chrome developer tools>network>css. it said the css run my folder structure: tango | static | css | bootstrap.css can anyone help me to solve this? -
No module named django_select2
I'm trying to run an example from the django-SHOP framework. Following their tutorial on running the example, I get the following error: Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute django.setup() File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/config.py", line 94, in create module = import_module(entry) File "/home/agozie/anaconda3/envs/env1/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named django_select2 I've installed django_select2 but it still throws the error. Any ideas? -
Django2 How can i make some conditions in my Class based View
please i have an issue , i want to check the difference between two dates from my form, then allows to create the object using my class based_View if the date is bigger than an other attribute, if not render it to an other page without inserting nothing in the database.here is my # view class AddVacation(LoginRequiredMixin, CreateView): form_class = VacationCreateForm template_name = 'vavcation.html' login_url = 'login' def form_valid(self, form): instance = form.save(commit=False) instance.employee = self.request.user return super(AddVacation, self).form_valid(form) # form: class VacationCreateForm(forms.ModelForm): class Meta: model = VacationModel fields = [ 'type', 'startDate', 'enddate', ] -
Django - ImportError : no module named django.core.wsgi
I am trying to deploy my Django application with Apache and mod_wsgi. I installed and configured them according to following references:- https://modwsgi.readthedocs.io/en/develop/user-guides/quick-installation-guide.html https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/modwsgi/ My django project tree - /home/zahlen mysite ├── db.sqlite3 ├── log │ ├── access.log │ └── error.log ├── manage.py ├── mysite │ ├── __init__.py │ ├── settings.py │ ├── static │ ├── templates │ ├── urls.py │ ├── views.py │ ├── wsgi.py ├── places │ ├── admin.py │ ├── apps.py │ ├── __init__.py │ ├── migrations │ ├── models.py │ ├── static │ ├── templates │ ├── tests.py │ ├── urls.py │ ├── views.py └── static django is present in /home/zahlen/.local/lib/site-packages //apache2/apache2.conf .... .... LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so WSGIPythonPath /home/zahlen/mysite:/home/zahlen/.local/lib/site-packages <Directory /home/zahlen/mysite/mysite> <Files wsgi.py> Require all granted </Files> </Directory> //apache2/sites-available/000-default.conf VirtualHost Configuration <VirtualHost *:80> ServerName www.mysite.com ServerAlias mysite.com ServerAdmin webmaster@mysite.com DocumentRoot /home/zahlen/mysite Alias /static /home/zahlen/mysite/mysite <Directory /home/zahlen/mysite/static> Require all granted </Directory> ErrorLog /home/zahlen/mysite/log/error.log CustomLog /home/zahlen/mysite/log/access.log combined <Directory /home/zahlen/mysite/mysite/> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess mysite.com python-path=/home/zahlen/mysite WSGIProcessGroup mysite.com WSGIScriptAlias / /home/zahlen/mysite/mysite/wsgi.py </VirtualHost> Django and mod_wsgi are configured to use python2.7 . Vitualenv is not used and Apache uses the Event MPM All of this is on a Ubuntu Server Virtual Machine. //log/apache2/error.log gives the following line … -
DJango display images in the grid
I want to have the this image display effect: LINK and I don't know how to do this. I'm using DJango to display images. -
Django: records that have most matching words should come up higher in the result set
This is my first app/site. I am trying to implement a search option. I have these to implement the search view: def normalize_query(query_string, findterms=re.compile(r'"([^"]+)"|(\S+)').findall, normspace=re.compile(r'\s{2,}').sub): return [normspace('',(t[0] or t[1]).strip()) for t in findterms(query_string)] def get_query(query_string, search_fields): ''' Returns a query, that is a combination of Q objects. That combination aims to search keywords within a model by testing the given search fields. ''' query = None # Query to search for every search term terms = normalize_query(query_string) for term in terms: or_query = None # Query to search for a given term in each field for field_name in search_fields: q = Q(**{"%s__icontains" % field_name: term}) if or_query is None: or_query = q else: or_query = or_query | q if query is None: query = or_query else: query = query | or_query return query def search_doctor(request): query_string = '' found_entries = None query_string = request.POST.get('doctor', None).strip() if query_string: entry_query = get_query(query_string, ['full_name']) found_entries = User.objects.filter(entry_query, groups__name='Doctor') #.order_by('first_name') context = { 'query_string': entry_query, 'doctors': found_entries } #return redirect('health:doctors' ) return render(request,'doctors_search_list.html', context ) It does search records but I am looking for a way to show records that have most matching search terms in them come up higher in the order. Can … -
Receive and process JSON using fetch API in Javascript in combination with Django
In my Project when conditions are insufficient my Django app send JSON response with message. I use for this JsonResponse() directive, Code: data = { 'is_taken_email': email } messages.error(request, 'Email is already used!') return JsonResponse(data) Now I want using Javascript fetch API receive this JSON response and for example show alert. I don't know how to use fetch API to do this. I want to write a listener who will be waiting for my JSON response from Django App. I try: function reqListener() { var stack = JSON.parse(data); console.log(stack); } var oReq = new XMLHttpRequest(); Thanks in advance! -
Collectstatic - permission denied, pythonanywhere bash terminal
I'm trying to use the collectstatic command in pythonanywhere's bash terminal, python manage.py collectstatic, but I get : PermissionError: [Errno 13] Permission denied: '/static' Please can anyone help? I've been trying to fix this for two days now! Here's the full error : nomadpad-virtualenv) 11:51 ~/nomadpad (master)$ python manage.py collectstatic Copying '/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/djang o/contrib/admin/static/admin/img/inline-delete.svg' Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/management/init.py", line 364, in execute_from_command_line utility.execute() File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/management/init.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/management/base.py", line 283, in run_from_argv self.execute(*args, cmd_options) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/management/base.py", line 330, in execute output = self.handle(*args, options) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle collected = self.collect() File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /contrib/staticfiles/management/commands/collectstatic.py", line 124, in collect handler(path, prefixed_path, storage) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /contrib/staticfiles/management/commands/collectstatic.py", line 364, in copy_file self.storage.save(prefixed_path, source_file) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/files/storage.py", line 54, in save return self._save(name, content) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/site-packages/django /core/files/storage.py", line 321, in _save os.makedirs(directory) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/home/DMells123/.virtualenvs/nomadpad-virtualenv/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/static' -
How to send password reset mail from custom Django views?
I have Django 2.0.2 with custom User model. One of feature is give anonymous users way to create order without "register-first" on site. Main idea is: Anonymous user fill order form, enter e-mail address and click Create Order; Django create User with entered e-mail and random generated password; Next, Django (or Celery) send on his e-mail link for reset password (like with reset form); User check e-mail and click to reset link, re-enter his own password. This was killed two functions by one: user register and create first order. And question: how can I send reset password mail from my custom views? I understand to link will generate and send on reset password view, but how to call to them on custom view? -
How to return double string in models django
Helo everyone. I have a little problem. I've create a models: class Cudzoziemiec(models.Model): imie = models.CharField(max_length=80, verbose_name="Imię", unique=False) nazwisko = models.CharField(max_length=150, verbose_name="Nazwisko", unique=False) class Meta: verbose_name = 'Cudzoziemca' verbose_name_plural = 'Cudzoziemcy' def __str__(self): return self.nazwisko class Umowa(models.Model): RODZAJ_UMOWY = ( ('UP', 'Umowa o pracę'), ('UZ', 'Umowa zlecenie'), ('UD', 'Umowa o dzieło'), ) osoba = models.ForeignKey(Cudzoziemiec, on_delete=models.CASCADE, verbose_name="Wybierz cudzoziemca") umowa_rodzaj = models.CharField(max_length=250,choices=RODZAJ_UMOWY, verbose_name="Rodzaj umowy") nr_umowy = models.PositiveIntegerField() umowa_od = models.DateField(auto_now=False, auto_now_add=False, verbose_name="Data rozpoczęcia pracy") umowa_do = models.DateField(auto_now=False, auto_now_add=False, verbose_name="Data zakończenia pracy") class Meta: verbose_name = 'Umowę' verbose_name_plural = 'Umowy' def __str__(self): return self.nr_umowy In panel admin everything works ok. But how to display "imie"+"nazwisko" in panel admin in case when I want to create a new record in Umowy. Now I have only "nazwisko" if I want to add new record via Umowa class, selected a "osoba" in that class. -
Flask Application for Speaker Identification
I am writing my first flask application code for speaker identification. i am dealing with the voice clip. Basically i want to read multiple voice clips and then print it on browser page. Here is the code of upload function: @app.route('/upload', methods=['GET','POST']) def upload(): query = [] uploaded_files = flask.request.files.getlist("file[]") filenames = [] print(uploaded_files) for file in uploaded_files: if file and allowed_file(file.filename): filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER '],filename)) filenames.append(filename) return render_template('upload.html', filenames=filenames) @app.route('/uploads/<filename>') def uploaded_file(filename): return send_from_directory(app.config['UPLOAD_FOLDER'],filename) if __name__ == "__main__": app.run() Right now, it works but it is not show my uploaded files on browser, any idea how can i do that? -
Using face as password for chat site
I am new at Django and I'm making a demo chat website through Django 2.0. My motive here is to save people's photos when they sign up, and run a face authentication python script on the backend (which I have already done, through the open source face_recognition library on Python) to recognise user's when they login. My script uses cv2 right now to click a photo and sends it over to the face recognition engine. I have to save the photos of the users in a directory on the server-side, with the name of the image as the Name of the user when they sign up, so I can run a face authenticator to for-loop over the list of faces in my folder to find the matching face. And when it finds that, I can return the name to query over my database and create a session for that particular User. (I know it is time taking and resource intensive, but since it is a demo, I think i can get by it. Also kindly suggest if there can be a faster way for face based authentication) My User Model looks like this User(models.Model): username = models.CharField(max_length=100) name = models.CharField(max_length=100) … -
join queryset using aliasing in django
i have a models class FriendsWith(models.Model): username = models.ForeignKey(User,on_delete=models.CASCADE) fusername =models.ForeignKey(User,on_delete=models.CASCADE,related_name='fusername') time = models.DateTimeField(auto_now_add=True) confirm_request = models.SmallIntegerField(default=1) blocked_status = models.IntegerField(default=0) i wanted to search all the friends of currently logged in user.So,i am doing like this obj1=FriendsWith.objects.filter(username=request.user).select_related('fusername') obj2=FriendsWith.objects.filter(fusername=request.user).values('username') obj=obj1 | obj2 friendslist=User.objects.filter(username__in=obj) Where User is a django User model I am trying to combine two queryset(obj1 and obj2) set here But it's not working.I can do the same thing in sql by using alias .But here i am not sure what to do. I am getting this error while performing the above code: TypeError: Merging 'QuerySet' classes must involve the same values in each case Please help in achieving this task -
Why I get no results filtering with Django?
I am trying to filter some of data and I use django filter to do it. One of my model fields is a Forerign Key, which automatically ModelChoiceFilter is used.In my case I need to choose more that one option from the specific filter so I use ModelMultipleChoiceFilter. A queyset parameter needs to be passed inModelMultipleChoiceFilter if you manually instantiated it. I am trying to achieve this using the code below, but I get no results using the specific filter. Although I get the proper results from the other filters: filters.py def available_bookies(request): """ Return available bookies for current user """ if request is None: return Bet.objects.none() user = request.user return Bet.objects.filter(user=user).values_list("bookie__name", flat=True).distinct() class BetFilter(django_filters.FilterSet): # Some other filters bookie = django_filters.ModelMultipleChoiceFilter(queryset=available_bookies) class Meta: model = Bet fields = ["date_from", "date_to", "odds_from", "odds_to", "stake_from", "stake_to", "country_multi", "competition_multi", "sport_multi", "status_multi", "home_multi", "visitor_multi", "bookie"] @property def qs(self): parent = super(BetFilter, self).qs return parent.order_by("-timestamp") -
Errno 13 Permission denied: '/home/pep_web/Structure_Descriptor/Input.csv'?
I have posted similar problem few days before but that time it was just solved by replacing manual path with the absolute path this time again i stuck with the similar problem and I have tried many thing but nothing is working. How can I resolve this problem This is my view which is throwing the error: def Pep_Str_Des(request): #return render(request, 'PepStructure/Structure.html', {}) if request.method == 'POST': form = Pep_str_Des(request.POST) if form.is_valid(): val = form.cleaned_data['Input_peptide'] pep_list = [] for v in val.split(','): if len(val.split(',')[0]) <= 17: if len(val.split(',')[0]) == len(v): pep_list.append(v) print v df = pd.DataFrame({'col_1':pep_list}) print df #file_path = os.path.join(os.path.dirname(__file__),'Input.csv') df.to_csv(os.path.join(os.path.dirname(__file__),'Input.csv'), index = False) os.environ['Input_file'] = os.path.join(os.path.dirname(__file__),'Input.csv') os.environ['out_file'] = os.path.join(os.path.dirname(__file__),'Out_file.csv') os.environ['cmds'] = os.path.join(os.path.dirname(__file__),'Structure_bassed_Descriptor_generation.py') os.system("python $cmds -p $Input_file -d $out_file") f_ns = glob.glob(os.path.join(os.path.dirname(__file__),'strs')+"/*.pdb") for f in f_ns: os.remove(f) f_ns = glob.glob(os.path.join(os.path.dirname(__file__),'strs')+"/*.sdf") for f in f_ns: os.remove(f) return render(request, 'Structure_Descriptor/Out.html', {'val':val} ) else: Input_peptide = 'ELIKAHLPDVALLDYRM,RYMKYLTGCAKLFRQGY,TGRVPLDQMSWVTPARW,IVKAVLDCAKGRDVVAP,QTRFANAPIRWLHADIM,GYRPDPATGAVNVPIYA' form = Pep_str_Des(initial={'Input_peptide': Input_peptide}) return render(request, 'Structure_Descriptor/Des.html', {'form':form}) error: IOError at /Pep_Str_Des/ [Errno 13] Permission denied: '/home/pep_web/Structure_Descriptor/Input.csv' Request Method: POST Request URL: http://93.188.167.63:8080/pep_learn/Pep_Str_Des/ Django Version: 1.10.8 Exception Type: IOError Exception Value: [Errno 13] Permission denied: '/home/pep_web/Structure_Descriptor/Input.csv' Exception Location: /usr/lib/python2.7/dist-packages/pandas/io/common.py in _get_handle, line 356 Python Executable: /usr/bin/python Python Version: 2.7.12 Python Path: ['/home/pep_web', '/usr/local/lib/python2.7/dist-packages/Django-1.10.8-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', … -
Cannot find the GeoManager in module django.contrib.gis.db. models in Django 2.0
I am working on a GeoDjango project(first time working in a web app). Tring to use GeoManager but an error pops out saying module 'django.contrib.gis.db.models' has no attribute 'GeoManager'. After that, I checked the release notes of Django 2.0 and found out that the GeoManagerand GeoQuerySet classes are removed in Django 2.0. Does anyone know which module is it in right now? Or can anyone suggest any better alternative -
AWS, Django, Apache, ALLOWED_HOSTS not working 400 Bad Request
I have two Django applications working on the AWS Lightsail. First one is working great with www.firstapp.com and firstapp.com, but when I try to visit the second app without www in URL, it returns 400 Bad Request. In both apps, DEBUG set to False, and I have necessary hosts in settings.py like this: ALLOWED_HOSTS = [ '.secondapp.com' ] I have tried with '*' and also tried to write down all possible hosts in ALLOWED_HOSTS but it didn't work. I am able to see website with www.secondapp.com but secondapp.com always return Bad Request (400) After any update in settings.py, I always restart Apache (tried to reload also) nothing changes, still getting 400 Bad Request. Any ideas? Maybe I should set up AWS in some way, this is my first experience with Django -
Validate a single field in django without using Form or models
I am using django to fill some forms, I know how to use Forms and use validation but my forms are complicated and it is hard to create Forms object from those forms, I wanted to know is there any way to use validators on a parameter which I get from POST in a view? for example I have a filed which is named user then def login_view(request): # if this is a POST request we need to process the form data if request.method == 'POST': user=request.POST["user"] # check whether it's valid without using forms I know about validators https://docs.djangoproject.com/en/dev/ref/validators/ and it seems they only works on models and forms is it even possible to validate a single field? If not what other options do I have for complex forms? -
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details
my heroku logs: X:\PythonDjango\venv_setup\online_venv\src>heroku logs 2018-02-15T18:19:26.207988+00:00 app[web.1]: application = DjangoWhiteNoise(application) 2018-02-15T18:19:26.207990+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/whitenoise/django.py", line 44, in init 2018-02-15T18:19:26.207992+00:00 app[web.1]: self.add_files(self.static_root, prefix=self.static_prefix) 2018-02-15T18:19:26.207996+00:00 app[web.1]: self.update_files_dictionary(root, prefix) 2018-02-15T18:19:26.207994+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/whitenoise/base.py", line 90, in add_files 2018-02-15T18:19:26.208000+00:00 app[web.1]: for directory, _, filenames in os.walk(root, followlinks=True): 2018-02-15T18:19:26.207998+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/whitenoise/base.py", line 93, in update_files_dictionary 2018-02-15T18:19:26.208001+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/os.py", line 335, in walk 2018-02-15T18:19:26.208003+00:00 app[web.1]: top = fspath(top) 2018-02-15T18:19:26.210257+00:00 app[web.1]: [2018-02-15 18:19:26 +0000] [9] [INFO] Worker exiting (pid: 9) 2018-02-15T18:19:26.209630+00:00 app[web.1]: TypeError: expected str, bytes or os.PathLike object, not tuple 2018-02-15T18:19:26.433218+00:00 app[web.1]: [2018-02-15 18:19:26 +0000] [4] [INFO] Shutting down: Master 2018-02-15T18:19:26.433450+00:00 app[web.1]: [2018-02-15 18:19:26 +0000] [4] [INFO] Reason: Worker failed to boot. 2018-02-15T18:19:26.552341+00:00 heroku[web.1]: Process exited with status 3 2018-02-15T18:19:26.830265+00:00 heroku[web.1]: State changed from up to crashed 2018-02-15T18:19:55.377507+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shoppingwave.herokuapp.com request_id=551a7986-4cd6-4b43-9b9a-9f1eb46a5bc4 fwd="157.50.221.99" dyno= connect= service= status=503 bytes= protocol=https 2018-02-15T18:19:56.339174+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shoppingwave.herokuapp.com request_id=f6606c27-b393-4c55-b4ac-2c956c8b32da fwd="157.50.221.99" dyno= connect= service= status=503 bytes= protocol=https 2018-02-15T18:22:48.555479+00:00 app[api]: Starting process with command python manage.py collectstatic by user rahulverma6612@gmail.com 2018-02-15T18:23:00.573440+00:00 heroku[run.1271]: State changed from starting to up 2018-02-15T18:23:00.692267+00:00 heroku[run.1271]: Awaiting client 2018-02-15T18:23:00.752947+00:00 heroku[run.1271]: Starting process with command python manage.py collectstatic 2018-02-15T18:23:10.269796+00:00 heroku[run.1271]: Process exited with status 1 2018-02-15T18:23:10.596849+00:00 heroku[run.1271]: State …