I want to use slugs in my details urls but when I want to acces to a url like this:

localhost:8000/movie-1

Send me this error

```
Value Error: invalid literal for int() with base 10: 'pelicula'

```

Here is my model:

```
from django.utils.text import slugify

class Movie(models.Model):

    name = models.CharField(verbose_name='nombre', max_length=250)

    @property
    def slug(self):
        return '{}'.format(slugify(self.name, allow_unicode=True))

```

My url:

```
url(
    regex=r'^(?P<slug>[\w-]+)/$',
    view=views.DetailMovie.as_view(),
    name='movie'
),

```

And finally my view:

```
class DetailMovie(DetailView):

    model = Movie
    pk_url_kwarg = "slug"
    context_object_name = "movie"
    template_name = "detail_movie.html"

```

Thanks a lot for your help!