loading...

Discussion on: Writing Django custom command

Collapse
arsho profile image
Ahmedur Rahman Shovon Author

@marlysson , I have kept the files in the same directory of where I put the custom command. I suppose it is good practice to import data files in this way. Have you tried using the filename directly?

Thank you.
Shovon

Collapse
marlysson profile image
Marlysson Silva

Yes, I do.
Was because instead get current directory and join with filename, you got the app name and join with many folders and after that join with filename to build the complete path to file.

I just got this doubt, but this article was very useful to me.

Thread Thread
arsho profile image
Ahmedur Rahman Shovon Author

@marlysson , glad the tutorial helped you. FYI, I have added Django Custom Command in Django Docs Example Polls Application in this Github code repository: github.com/arsho/django-custom-com...

Stay safe! :)