title: Python Django - Upload a Picture to see in a browser in a dev-mode
body: <p>I'm trying to develop a blog website in a dev-mode in my localhost. When I'm trying to review my profile pictures in browser right after I upload my urls.py and settings.py; I'm havving error in the bottom. I'have tried other solutions mentioned in similar topics but those didnt' help.</p>
  
  <p>My base doc : <a href="https://docs.djangoproject.com/en/2.1/howto/static-files/#serving-files-uploaded-by-a-user-during-development" rel="nofollow noreferrer">https://docs.djangoproject.com/en/2.1/howto/static-files/#serving-files-uploaded-by-a-user-during-development</a> </p>
  
  <p>Error: django.core.exceptions.ImproperlyConfigured: Empty static prefix not permitted</p>
  
  <p>Urls.py:</p>
  
  <pre><code>from django.contrib import admin
  from django.contrib.auth import views as auth_views  
  from django.urls import path, include
  from users import views as user_views
  from django.conf import settings  
  from django.conf.urls.static import static  
  
  urlpatterns = [
  path('admin/', admin.site.urls),
  path('register/', user_views.register, name='register'),  
  path('profile/', user_views.profile, name='profile'),  
  path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),  
  path('logout/', auth_views.LogoutView.as_view(template_name='users/logout.html'), name='logout'),  
  path('', include('blog.urls')),  ]
  
  if settings.DEBUG: 
  urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>I've added this quote in settings.py:</p>
  
  <pre><code>STATIC_URL = '/static/'
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  MEDUA_URL = '/media/' 
  </code></pre>