Navigation Menu

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

oscar_fork_app issue when forking to a current dirrectory using dot(.) #1717

Closed
manevant opened this issue Apr 16, 2015 · 4 comments
Closed

Comments

@manevant
Copy link
Contributor

Hello.
When im trying to fork some app to current dirrectory with blank folder_path argument i get a CommandError exception from ../oscar/management/commands/oscar_fork_app.py with error:

"You must specify an app label and a folder to create the new app in"

While im try to fork with dot (like a ./manage.py oscar_fork_app promotions . ) in __init__.py file and config.py file i got a invalid path.

# __init__.py
default_app_config = '..promotions.config.PromotionsConfig'

# config.py
from oscar.apps.promotions import config
class PromotionsConfig(config.PromotionsConfig):
    name = '..promotions'

Now I am preparing to fix this error.
Please specify, how can do it in right way?

--edit--

I did commit that solves the problem, what do I do next?
p.s.it's my first time contributing, forgive my possible retarding :)

@maiksprenger
Copy link
Member

Hello @manevant, sorry for being slow to get back to you. Thank you for the PR as well.

Can you explain why you'd like to fork the app in the top level folder? I think it's pretty common to have an apps folder under which you keep your Oscar apps. We had that structure in mind when building the fork_app command. I think it should technically be possible to not do that and keep them all at root level, but I'm not convinced it's a good idea.

Could you try to explain your motivation a bit more?

Related: I do think we have an issue where we should be looking at absolute paths, and expand relative paths into such. But I'm not sure right now.

@manevant
Copy link
Contributor Author

manevant commented May 6, 2015

Hello @maikhoepfel !

Only one reason why i want to copy forked apps into a root directory - our project guideline(btw i dont agree them :) )
So right now i had to create app/ directory and fork into them.
That's absolutely not critical for me but i think it's may be a good idea to give (who want) this feature.

What do you think about that?

PS-BTW: Does Oscar page with frequently asked questions in the documentation?

@joelhaasnoot
Copy link

+1 for allowing apps in the root directory - this is the default project layout for Django. Unless you consider oscar apps different from other apps - then you might want to namespace them. My project is mainly overriding various bits and pieces of oscar, so a flat project layout is fine.

@codeinthehole
Copy link
Contributor

Fixed by #1718

manevant added a commit to manevant/django-oscar that referenced this issue Jun 4, 2015
Added usecase for oscar_fork_app command with dot path for forking to project_root dir. 
Added in django-oscar#1717
mvantellingen added a commit that referenced this issue Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants