Django: url error when saving a record from admin

0

I tell you my problem.

I am deploying a web (Python 3.4 and Django 2.0.4), it has already saved data in several models from the admin panel logged in as superuser, but when I came to an app called About, with a model of the same name, I is jumping this error:

Page not found (404)
Request Method: POST
Request URL:    http://www.myweb.com/admin/about/about/add/

Raised by:  django.contrib.admin.options.add_view
Using the URLconf defined in myweb.urls, Django tried these URL patterns, in this order:
busqueda/
contacto/
sobre-mi/
admin/
[name='home']
<slug:categoria>/ [name='category']
<slug:category>/<slug:slug>/ [name='post']
^media\/(?P<path>.*)$
The current path, about/about/add/, didn't match any of these.

This model has an ImageField field, in which I had saved so far this field does not exist, I have tried another model with this field and I get the same error.

This is myproject / urls.py:

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
        path('busqueda/', include('search.urls')),
        path('contacto/', include('contact.urls')),
        path('sobre-mi/', include('about.urls')),
        path('admin/', admin.site.urls),
        path('', include('post.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

And the about / urls.py:

from django.urls import path
from .views import AboutView

app_name = 'about'
urlpatterns = [
    path('', AboutView.as_view(), name='about-me'),
]

It looks like a beginner's mistake, but I'm unable to solve it. Thanks.

EDITO : Deleting the ImageField field of the model has let me record it.

    
asked by Ray 14.09.2018 в 11:23
source

1 answer

0

The problem was in the python version (3.4), it was not compatible with the Django version offered by the hosting company (dinahosting). I've tried another provider (guebs.com), which lets me install python 3.6 and it worked for me the first time.

    
answered by 24.09.2018 / 10:40
source