These are chat archives for django/django

7th
Nov 2018
Marquitos
@sonirico
Nov 07 2018 12:57
hello there! Do you happen to know if it is possible to add custom model managers to already existing models from a third-party library?
up
梁先森
@LiangXianSen
Nov 07 2018 16:09
image.png
hello, I met a problem. why the url was wrong?
setting.py :MEDIA_URL = '/media/' MEDIA_URL_ROOT = os.path.join(BASE_DIR, "media")
urls.py : ```
urlpatterns = [
path('store/<str:file_name>/', views.store, name="store"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_URL_ROOT)
fsecada01
@fsecada01
Nov 07 2018 17:59
MEDIA_URL_ROOT is wrong. It should be /media/