Hi Sandy,

On 01/09/2018 17.18, Sandy Leon wrote:
Hello everyone,
I am trying to upload my Django site files to github to then deploy with
Heroku.
I have had no major problems except in trying to upload the folder that
contains my Django site, github gets stuck on trying to upload '
/mysite/polls/__pycache__/__init__.cpython-36.pyc'
Just to be clear, my project is called 'mysite' and the app that I made
following the Django tutorial is called polls.
Thanks you in advance to anyone who can help.


I have no idea why you are not able to upload these files, but you shouldn't be uploading cache files or compiled python modules to you git repository anyway.

If you have any of these files in your local git repository, remove them using "git rm".

Something like:

# find -name __pycache__ -exec git rm -r {} \;

And:

# find -name *.pyc -exec git rm {} \;

Ought to do it.

Then commit these changes with something like:

# git commit -m "Remove cache and object files from repository"

Finally add cache and compiled object files to you .gitignore. Something like:

*.pyc
__pycache__

And try to push your changes again.

Be aware that I have not actually tested any of these commands, so please be careful before blindly executing them.

Hope that helps a bit.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/12e119ed-9ffe-d30a-2f88-71f8c70c37dd%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to