title: Django Azure upload file to blob storage
body: <p>I've got an application that needs to upload a file to an Azure Blob Storage container. I've been trying for a very long time and followed every tutorial to no avail.</p>
  
  <p>I have installed the following:</p>
  
  <pre><code>pip3 install django-storages[azure]
  </code></pre>
  
  <p>Here is my settings.py file:</p>
  
  <pre><code>DEFAULT_FILE_STORAGE = 'backend.custom_azure.AzureMediaStorage'
  STATICFILES_STORAGE = 'backend.custom_azure.AzureStaticStorage'
  
  STATIC_LOCATION = "static"
  MEDIA_LOCATION = "http://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media"
  MEDIA_ROOT='http://{AZURE_ACCOUNT_NAME}.blob.core.windows.net'
  
  AZURE_ACCOUNT_NAME = '&lt;mystorageaccount&gt;'
  AZURE_ACCOUNT_KEY = '&lt;my key here&gt;'
  AZURE_CUSTOM_DOMAIN = f'{AZURE_ACCOUNT_NAME}.blob.core.windows.net'
  AZURE_LOCATION=f'{AZURE_ACCOUNT_NAME}.blob.core.windows.net'
  
  STATIC_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{STATIC_LOCATION}/'
  MEDIA_URL = f'https://{AZURE_CUSTOM_DOMAIN}/{MEDIA_LOCATION}/'
  </code></pre>
  
  <p>Here is the .backend/custom_azure.py &lt;- my customer storage class</p>
  
  <pre><code>from storages.backends.azure_storage import AzureStorage
  
  class AzureMediaStorage(AzureStorage):
      account_name = '&lt;mystorageaccount&gt;' 
      account_key = '&lt;mykey&gt;'
      azure_container = 'media'
      expiration_secs = None
  
  class AzureStaticStorage(AzureStorage):
      account_name = 'mystorageaccount'
      account_key = '&lt;my key&gt;'
      azure_container = 'static'
      expiration_secs = None
  </code></pre>
  
  <p>Here is my .account/models.py:</p>
  
  <pre><code>from django.db import models
  from django.urls import reverse
  from django.contrib.auth.models import User
  from billing.models import Subs
  from PIL import Image
  import phonenumbers
  from backend.custom_azure import AzureMediaStorage as AMS
  
  class MasterAccount(models.Model):
      image = models.ImageField(default='default.jpg', storage=AMS, upload_to='profile_pics')
      profile_pic = models.FileField(default='default.jpg', storage=AMS, upload_to='profile_pics')
  
      def __str__(self):
          return "MasterAccount Number: " + str(self.number)
  
      def save(self, *args ,**kwargs):
          super().save(*args ,**kwargs)
          img =  Image.open(self.image.path)
  
          if img.height &gt; 300 or img.width &gt; 300:
              output_size = (300, 300)
              img.thumbnail(output_size)
              img.save(self.image.path)
  </code></pre>
  
  <p>I am running this in apache.(not runserver)</p>
  
  <p>PROBLEM: I have figured out that with this configuration, I am able to retrieve all of the files from blob storage including the media files and the static files. They all show up perfectly. However, when I try to add and save a MasterAccount instance it barfs with the absolute paths error:</p>
  
  <pre><code>NotImplementedError at /admin/account/masteraccount/2/change/
  This backend doesn't support absolute paths.
  Request Method: POST
  Request URL:    http://13.67.214.185/nbn/admin/account/masteraccount/2/change/
  Django Version: 2.1.7
  Exception Type: NotImplementedError
  Exception Value:    
  **This backend doesn't support absolute paths**.
  Exception Location: /opt/bitnami/apps/django/lib/python3.7/site-packages/Django-2.1.7-py3.7.egg/django/core/files/storage.py in path, line 106
  Python Executable:  /opt/bitnami/python/bin/python3
  Python Version: 3.7.2
  Python Path:    
  ['/opt/bitnami/python/lib/python37.zip',
   '/opt/bitnami/python/lib/python3.7',
   '/opt/bitnami/python/lib/python3.7/lib-dynload',
   '/opt/bitnami/python/lib/python3.7/site-packages',
   '/opt/bitnami/apps/django/lib/python3.7/site-packages',
   '/opt/bitnami/apps/django/lib/python3.7/site-packages/Django-2.1.7-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/pytz-2016.7-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/gevent-1.3.7-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/olefile-0.46-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/Pillow-4.0.0-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/lxml-4.2.5-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/mysqlclient-1.3.12-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/psycopg2-2.7.3.1-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/html5lib-0.90-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/python_Levenshtein-0.12.0-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/scandir-1.5-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/argparse-1.2.1-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/pyparsing-2.1.10-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/simplejson-3.11.1-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/pyldap-2.4.28-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/reportlab-3.3.0-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/pydot-1.2.3-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/MarkupSafe-0.23-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/psutil-4.3.1-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/pytz-2016.7-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/six-1.10.0-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/libsass-0.15.1-py3.7-linux-x86_64.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/virtualenv_clone-0.2.6-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/virtualenv-15.1.0-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/jmespath-0.9.3-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/python_dateutil-2.6.1-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/botocore-1.7.43-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/s3transfer-0.1.11-py3.7.egg',
   '/opt/bitnami/python/lib/python3.7/site-packages/boto3-1.4.7-py3.7.egg',
   '/opt/bitnami/apps/django/django_projects/nbn']
  Server time:    Sat, 16 Feb 2019 21:38:11 +0000
  </code></pre>
  
  <p>So it looks like no matter what, it's just passing the 'default.jpg' filename but doesn't know where to send it?</p>
  
  <p>Do I need to change settings in azure? Is my config all wrong? Please help, I've been wracking my brain on this one and exhausting google for about 3 weeks! Thanks!!!</p>
  
  <hr>
  
  <h2>UPDATE</h2>
  
  <p>After the helpful suggestion below I can at least now log into the admin panel. but whenever I try to edit a MasterAccount model by clicking on it, I get a typeError error:</p>
  
  <pre><code>TypeError at /admin/account/masteraccount/5/change/
  url() missing 1 required positional argument: 'name'
  Request Method: GET
  Request URL:    http://localhost:8000/admin/account/masteraccount/5/change/
  Django Version: 2.1.4
  Exception Type: TypeError
  Exception Value:    
  url() missing 1 required positional argument: 'name'
  Exception Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/fields/files.py in url, line 62
  Python Executable:  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
  Python Version: 3.7.2
  Python Path:    
  ['/Users/elliottcastillo/Documents/azure-git/trt/src',
   '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip',
   '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7',
   '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload',
   '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages']
  Server time:    Mon, 18 Feb 2019 13:46:22 +0000
  </code></pre>
  
  <p>Here is the copy-paste traceback
      Environment:</p>
  
  <pre><code>Request Method: GET
  Request URL: http://localhost:8000/admin/account/masteraccount/5/change/
  
  Django Version: 2.1.4
  Python Version: 3.7.2
  Installed Applications:
  ['account.apps.AccountConfig',
   'administrative.apps.AdministrativeConfig',
   'users.apps.UsersConfig',
   'blog.apps.BlogConfig',
   'billing.apps.BillingConfig',
   'videos.apps.VideosConfig',
   'stats.apps.StatsConfig',
   'train.apps.TrainConfig',
   'external_content.apps.ExternalContentConfig',
   'tinymce',
   'phone_field',
   'phonenumbers',
   'colorfield',
   'djmoney',
   'crispy_forms',
   'django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'storages',
   'azure']
  Installed Middleware:
  ['django.middleware.security.SecurityMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware']
  
  
  Template error:
  In template /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/contrib/admin/templates/admin/includes/fieldset.html, error at line 19
     url() missing 1 required positional argument: 'name'
     9 :             {% for field in line %}
     10 :                 &lt;div{% if not line.fields|length_is:'1' %} class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}&gt;
     11 :                     {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
     12 :                     {% if field.is_checkbox %}
     13 :                         {{ field.field }}{{ field.label_tag }}
     14 :                     {% else %}
     15 :                         {{ field.label_tag }}
     16 :                         {% if field.is_readonly %}
     17 :                             &lt;div class="readonly"&gt;{{ field.contents }}&lt;/div&gt;
     18 :                         {% else %}
     19 :                              {{ field.field }} 
     20 :                         {% endif %}
     21 :                     {% endif %}
     22 :                     {% if field.field.help_text %}
     23 :                         &lt;div class="help"&gt;{{ field.field.help_text|safe }}&lt;/div&gt;
     24 :                     {% endif %}
     25 :                 &lt;/div&gt;
     26 :             {% endfor %}
     27 :         &lt;/div&gt;
     28 :     {% endfor %}
     29 : &lt;/fieldset&gt;
  
  
  Traceback:
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
    34.             response = get_response(request)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
    156.                 response = self.process_exception_by_middleware(e, request)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
    154.                 response = response.render()
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/response.py" in render
    106.             self.content = self.rendered_content
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/response.py" in rendered_content
    83.         content = template.render(context, self._request)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/backends/django.py" in render
    61.             return self.template.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    171.                     return self._render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
    163.         return self.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
    150.             return compiled_parent._render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
    163.         return self.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
    150.             return compiled_parent._render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
    163.         return self.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
    62.                 result = block.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
    62.                 result = block.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py" in render
    209.                     nodelist.append(node.render_annotated(context))
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
    188.             return template.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    173.                 return self._render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
    163.         return self.nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py" in render
    209.                     nodelist.append(node.render_annotated(context))
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py" in render
    209.                     nodelist.append(node.render_annotated(context))
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py" in render
    309.                 return nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py" in render
    309.                 return nodelist.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    937.                 bit = node.render_annotated(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_annotated
    904.             return self.render(context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
    993.         return render_value_in_context(output, context)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render_value_in_context
    972.             value = str(value)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/utils/html.py" in &lt;lambda&gt;
    397.     klass.__str__ = lambda self: mark_safe(klass_str(self))
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/boundfield.py" in __str__
    33.         return self.as_widget()
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/boundfield.py" in as_widget
    93.             renderer=self.form.renderer,
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in render
    229.         context = self.get_context(name, value, attrs)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in get_context
    415.         context = super().get_context(name, value, attrs)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in get_context
    281.         context = super().get_context(name, value, attrs)
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in get_context
    221.             'value': self.format_value(value),
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in format_value
    411.         if self.is_initial(value):
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/forms/widgets.py" in is_initial
    405.         return bool(value and getattr(value, 'url', False))
  
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/fields/files.py" in url
    62.         return self.storage.url(self.name)
  
  Exception Type: TypeError at /admin/account/masteraccount/5/change/
  Exception Value: url() missing 1 required positional argument: 'name'
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/FJLjx.png" rel="noreferrer">Here's what it looks like in the browser</a></p>
  
  <p>When I try to load the front-end I get the following error in django:</p>
  
  <pre><code>Internal Server Error: /
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 829, in _resolve_lookup
      current = current[bit]
  TypeError: 'ImageFieldFile' object is not subscriptable
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
      response = get_response(request)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/Users/elliottcastillo/Documents/azure-git/trt/src/account/views.py", line 49, in index
      return render(request, 'account/index.html', context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
      content = loader.render_to_string(template_name, context, request, using=using)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
      return template.render(context, request)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
      return self.template.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 171, in render
      return self._render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
      return self.nodelist.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 937, in render
      bit = node.render_annotated(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
      return self.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
      return compiled_parent._render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
      return self.nodelist.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 937, in render
      bit = node.render_annotated(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
      return self.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
      return nodelist.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 937, in render
      bit = node.render_annotated(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
      return self.render(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 987, in render
      output = self.filter_expression.resolve(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 671, in resolve
      obj = self.var.resolve(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 796, in resolve
      value = self._resolve_lookup(context)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py", line 837, in _resolve_lookup
      current = getattr(current, bit)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/fields/files.py", line 62, in url
      return self.storage.url(self.name)
  TypeError: url() missing 1 required positional argument: 'name'
  </code></pre>
  
  <p>Here is the message from the browser... It seems that the url() method is not acting properly:</p>
  
  <pre><code>Error during template rendering
  In template /Users/elliottcastillo/Documents/azure-git/trt/src/account/templates/account/base2.html, error at line 178
  
  url() missing 1 required positional argument: 'name'
  168                                                 &lt;input class="rd-navbar-search-form-input form-input" id="rd-navbar-search-form-input" type="text" name="s" autocomplete="off"&gt;
  169                                                 &lt;div class="rd-search-results-live" id="rd-search-results-live"&gt;&lt;/div&gt;
  170                                             &lt;/div&gt;
  171                                             &lt;button class="rd-search-form-submit fl-budicons-launch-search81" type="submit"&gt;&lt;/button&gt;
  172                                         &lt;/form&gt;
  173                                     &lt;/div&gt;
  174                                 &lt;/li&gt;
  175                                 {% if user.is_authenticated %}
  176                                     &lt;li class="rd-nav-item"&gt;
  177                                         &lt;a class="rd-nav-link" href="{% url 'users:profile' %}"&gt;
  178                                             &lt;img class="rounded-circle border border-info mr-2" src="{{ user.masteraccount.image.url }}" width="50" height="50"&gt;
  179                                             Account
  180                                         &lt;/a&gt;
  181                                         &lt;!-- RD Navbar Dropdown--&gt;
  182                                         &lt;ul class="rd-menu rd-navbar-dropdown"&gt;
  183                                             &lt;li class="rd-dropdown-item"&gt;
  184                                                 &lt;a class="rd-dropdown-link" href="{% url 'users:profile' %}"&gt;
  185                                                     My Profile
  186                                                 &lt;/a&gt;
  187                                             &lt;/li&gt;
  188                                             &lt;li class="rd-dropdown-item"&gt;
  </code></pre>