Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration error 'function' object has no attribute 'slugify' #20

Closed
vladimirnani opened this issue Nov 22, 2016 · 2 comments
Closed

Migration error 'function' object has no attribute 'slugify' #20

vladimirnani opened this issue Nov 22, 2016 · 2 comments

Comments

@vladimirnani
Copy link

Hey here is what was generated with django migrations
from slugify import slugify
...
('slug', autoslug.fields.AutoSlugField(always_update=True, blank=True, editable=False, null=True, populate_from=b'name', slugify=slugify.slugify.slugify, unique=True)),

AttributeError: 'function' object has no attribute 'slugify'

I get this when trying to migrate.

@justinmayer
Copy link
Owner

Hi Vladimir. Were you able to resolve this issue? Might you be willing to help implement a fix for it?

@vladimirnani
Copy link
Author

Hey @justinmayer. To add more context:
I was using it together with https://github.com/voronind/awesome-slugify

The problem was in one too many slugify's :) slugify=slugify.slugify.slugify

Solution would be in either correcting path in the migration or better wrapping awesome-slugify into your own custom_slugify method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants