benoitc / benoitc/couchdbkit

couchdbkit.ext.django.schema thows import error with Django 1.7

Open
#180 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
263
Forks
90
PR merge metrics
No merged PRs in 30d

Description

couchdbkit.ext.django.schema thows import error because get_verbose method is removed from django.db.models.options

fix:
remove

``` python
from django.db.models.options import get_verbose_name
```

and include get_verbose_name from previous Django version

``` python
# Calculate the verbose_name by converting from InitialCaps to "lowercase with spaces".
get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip()
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at couchdbkit.ext.django.schema and reproduce the import with Django 1.7. Compare its get_verbose_name import with the compatibility implementation shown in the issue; done when the module imports without the reported error under Django 1.7.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.