modocache / django-generate-scaffold

Generate a Django model, views, URLconf, and templates using a single command.
139 stars 39 forks source link

Syntax error on install with Python 3.4 ? #31

Open Daneaux opened 10 years ago

Daneaux commented 10 years ago

When installing the latest dev build (or the master branch), I get the following error:

Running setup.py install for django-generate-scaffold File "/Users/Danny/Projects/InterviewProject/dj15_env/lib/python3.4/site-packages/generate_scaffold/management/commands/generatescaffold.py", line 186 exec code in globals() ^ SyntaxError: invalid syntax

Daneaux commented 10 years ago

Ok so, forgive me, but this is my first dive into python and django, so obviously this codebase doesn't compile with python 3.*

To get it to compile, I've changed "exec code in ..." to exec(code, globals()) And fiddled with StringIO to get it to work.

So now it compiles properly and I was able to call 'setup.py' and get it installed. Works through manage.py, sweet.

BUT: when I go to actually generate something, it fails with "reload undefined" Bummer, was super excited to use this...

modocache commented 10 years ago

@Daneaux thanks for your interest and for the issue. To be honest, I haven't maintained this for a long while. Back when I made it, Django didn't even support Python 3! How times have changed! :open_mouth:

If you can get it to work and send a pull request, I'd be more than happy to merge it. And if you'd be interested in making sure it works from now on, I'd love to give you write access to the repo.

Otherwise, I'll try and debug this as soon as I can get around to it, but don't hold your breath! :sweat_smile:

divyaiyer commented 8 years ago

@modocache was this fixed by any chance? or any work around to suggest?

modocache commented 8 years ago

@divyaiyer Thanks for your interest, but unfortunately I haven't been able to prioritize this project at all lately. I'd be happy to review pull requests that get this working with Python 3, though! :)

divyaiyer commented 8 years ago

I see. Will definitely give a try. Thank you @modocache

arjamizo commented 6 years ago

https://github.com/arjamizo/django-generate-scaffold/commit/e4bc1fed110da884b63a3c9e52e851eda9b1eb89 I made it running, but still it lacks parsing command arguments