Hello all,I have a few questions of which I am not finding answers.1) If I export my development db (Postgresql) and then import it into production database,won't I be pulling in a very weak password that I used for development? I guess I canjust change that.
Don't do that.
2) Should I export all the content and structure from my development server to myproduction server? Or should I just create the database connection and then run migrations andthen create the data content on the production server? Obviously, my development server hasminimal content.
3) Should I just upload the other packages that I installed with pip on my development server orshould I instead run pip install on the production server to get all the packages needed on theproduction server?
Pip, pip, forever pip
4) Is it a best practice ( continuing from #3) to create a requirement file and use that to installwith pip all the packages, as opposed to uploading the packages from development to production?Note: I am developing on Ubuntu but deploying to Centos.
Yes. That way you can make changes to your install and just do `pip install -U -r requirements.txt` when there's a bug fix to one of your things.
5) I suppose, even if I had a Centos development environment, I would still want to install the requiredpackages on the production server instead of just uploading everything.
Pip doesn't use your distro. It downloads from https://pypi.python.org/pypi
Regarding #5, I am liking Python better than what I have used for some time, PHP based applicationdevelopment. However, for the longest time, things were much simpler with php in that most php code isjust text and so there isn't the notion of "installing" a package. One could expect things to work fineif one just uploaded the site from development to production (perhaps certain new OO features are changingthis situation for php sites, e.g. the use of autoloaders but that's another topic).
First of all, that's not quite true. For many PHP features you have to install a package from your Linux distro. Or figure out how to compile PHP yourself. Of course, many people just install all of the things, so that even if you don't use a feature, it's still a part of your monolithic PHP install. This has been the case for over a decade.
6) Is there anything else, in addition to the top level assets (with js/css) that I would want apache to serve directlyversus going through mod_wsgi? It seems like I read something to this effect relating to parts of the admin,that need to be served directly by apache. I could be wrong.
Anything that doesn't change. That includes images too. The admin has it's own CSS, JS, etc. that should be served by Apache.
Thanks in advance for any help,BruceP.S. If anyone wants to develop a course on udemy.com on a python framework, please don't develop withsqlite3 since we won't use that in production and please discuss deployment on a server besidessomething like pythonanywhere.com. The issues of setting things up on one's own vps server are nottrivial at all. (smile).--
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+unsubscribe@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/50b71c19-10a1-4610-8050-191bde7facda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter of the Norse
No comments:
Post a Comment