Help! I think i've gone in a bit over my head. I'm making a website for a friend who has already got a domain/hosting on the website 123reg. Keen to learn them i've been picking up python and django as i go, figured getting it online would be no problem because 123reg supports python (unspecified version).
So far i've been doing everything with the django test-server locally, i went to look into uploading it somewhere as a test and realised there's an awful lot i don't know and even with google its a bit overwhelming.
I found this link which will help me later i'm sure but right now, could someone help me understand What is Apache? I thought the server was the hardware a site was physically hosted on but i can't understand it at all now.. So i download Apache and then what? Can i just copy it into the root directory for the website on 123reg? Is their an installer? Will 123reg allow it to "run" or "serve" or whatever word's appropriate or will there be permissions issues?
And then once that's sorted there's mod_wsgi to look into, a cursory glance at the installation guide shows commands to be run, which confuses me further as i was not aware that a standard host like 123reg have any sort of inbuilt console window to be run on in which case how are you expected to execute these commands?
And another thing I didn't really think through, I'm using the built in sqlite database technology.. How will i be able to install it on my webspace? and then how will that effect my django configuration? or maybe i'll have to change to MySql v5 which 123reg says it supports?
I know these must be idiotic questions, I just wasn't sure where best to ask for help and SO has one of the most helpful and knowledgeable communities around. I did try having a google but everything was a bit overly technical for me.
You can't upload a Django site using FTP on a shared hosting provider and expect it to run. You'll need to configure it to run with their installed Apache, including configuration like mod_wsgi.
I very much doubt that 123-reg support this. You are unlikely to be able to run a Django site there. You should look for a more Django-friendly site - I recommend Webfaction.
Apache is the webserver software. It's already running on their machines. Don't try and install it lol, or they will certainly laugh at you.
To "run commands" you need to get a remote shell (console). This is typically done via Secure Shell (SSH). See this page regarding 123reg specifically: How do I connect using SSH (Putty)?
Django supports different databases, including SQLite and MySQL. SQLite is typically for small, simple databases, as the "database" is really just a local file that is manipulated by the SQLite engine. MySQL is the database of choice for many websites.
Related
I already finished my project that I made with django, and I want to upload it. I already bought the domain, and they are about to host it for me.. once they give me the host, I just upload it and that's it? Or are there more steps to do within the code? What do I have to do?. that is, once everything is uploaded to the host, will everything be seen?
And the Admin will continue to work, when in the search engine put /admin/ ???.
that is, I wonder what are all the steps to follow so that once I host my page everything can be seen.
that is, what things would have to be configured in the congif.py, and other things.
I would appreciate a lot if you give me advice/tips/solutions..
What I know is that I have to change the debug to DEBUG=False ...
And I don't know anything else, once they pass me the port and other host information, I simply upload the files of my project to the host and that's it, nothing more? Isn't it necessary to write more code to show it?
Excuse me, I have never displayed a page
There are a lot of steps involved in deploying your code to production. I suggest you check out a guide like this to get a better idea of what you need to do in order to deploy your website. Additionally, you can run the command python manage.py check --deploy for a quick, though insufficient, review of your code to see if it is ready to be pushed to production.
Django is an excellent choice for developing basic to more advanced websites. The web framework works well in local and production environments. Just the same way the local environment server is not suitable for a production environment, there are things you need to configure before deploying your Django website. Take a look at the links below
Https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
https://docs.djangoproject.com/en/4.1/howto/deployment/
https://github.com/vintasoftware/django-production-launch-checklist/blob/master/checklist-en.md
I'm following through the Django Tutorials by HackedExistence on youtube.
Since the video is about a year old, I assume that the version differences may contribute to this problem. I'm currently on the 2nd video but this issue arose since the first.
On my browser,
http://video1.hackedexistence.com/
This link opens up the Apache 2 Test Page, and the localhost link opens up the Django Administrator page nicely.
But he sets it up so that the hacked existence link loads up the Django Admin page.
How is he able to achieve this? and what steps are needed for setting it up that way with the versions that I'm working with.
Python 2.7.3, Django 1.4.1, Apache 2.2.22 (Unix)
Running on OS X 10.6.8.
video1.hackedexistence.com is (presumably) a domain under the control of HackedExistence, and it's showing an Apache 2 test page because the server it's pointing to is not configured to show anything else. You have no control over this domain or the server it is pointing to, so you can't affect it directly.
It doesn't have anything to do with different versions of python, django, apache, or anything else; it's likely that HackedExistence chose to move on to something else, is no longer maintaining his site (or at least the content on that subdomain of it) and his tutorial now no longer works as a result.
The closest you can come is add an entry to your /private/etc/hosts file (on OSX) so that video1.hackedexistence.com resolves to 127.0.0.1 (i.e. localhost, your own computer), but this is almost certainly not what you're after. For example, if you do this, everybody else will still see the test page you're seeing now, because the /etc/hosts file is just telling your computer to treat the video1.hackedexistence.com domain as if it's pointing to your computer.
For learning web development, you can safely completely disregard this and can continue to test on your local computer.
When it comes to deploying the website for other people to view and use, you will need to buy a domain (e.g. at http://namecheap.com/), get some hosting (for python/django hosting I can recommend WebFaction , or you can use Heroku's free plan), and follow the Django deployment instructions in the official documentation (or the documentation provided by the hosting provider you choose). My advice is to focus on learning web development and get something working before you spend money on any hosting.
I don't know the videos, but I'm assuming that the author of the book owns (or owned at the time) the hackedexistence.com domain name, and had it pointing to his server so that it would be able to interpret the Django App and serve it up to public requests ... and now it looks like that configuration doesn't exist any more.
If you're asking what I think you want to ask, "how can I get a Django app viewable on the public web," well, there are lots of ways to go about doing this. If your server is Apache, https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ is the way to go. Google could help you find the similar docs for other servers. Lots of answers on stack overflow as well.
If instead you're asking a different question, namely, "how can I get this app on my local machine to be viewable via some method other than localhost" (and you don't have a server), well, the answer is you'd have to get a domain that points to your local machine -- this is a question that has lots of answers elsewhere. One thing to be aware of is that Django through Apache on Mac OS X isn't terribly simple, as it requires manually installing mod_wsgi, but it's not overly difficult either. Here's Google's top link (a bit old but still relevant): http://jessenoller.com/2009/07/24/django-mod_wsgi-apache-and-os-x-do-it/
And finally, if you're asking how you can get your app to show up at hacked existence, well ... buy that domain and see the above paragraph. :)
I am completely new to this Django world. I haven't tried it ever before.
Now the problem is as below;
One of my clients was hosting his site somewhere else that I don't know and they built the site using Django. The host company doesn't allow to make any changes on their server, instead they provided the zip file for all the files in the site to me; so that now I can host my client's site.
As I don't know anything about Django, can someone please shed a light where I should start from?
Thanks in advance.
Cheers.
Sach
First of all, install Django on the development machine. Start by trying to get the development server run on your machine.
Gather requirements: check the settings.py for installed apps against the default Django settings.py file. See if there are any popular django apps that site depends on. If there are any, then you probably will have to install them, too.
In which format was the database provided? Will you move to another more appropriate format? Python bindings for databases are required too.
Considering the fact that you have inherited this project and probably will need to make some changes, consider installing django-south, so you can easily make changes to the database schema.
If you get the site running properly on your own machine, consider deplyoment. Is there a lot of static content? (if so, consider nginx). Set up apache2 and install the mod_wsgi module. Deploy.
Work your way through the Django tutorial first. Then look into Django Book as has been mentioned. Django IRC channel (#django) on Freenode is also great for help.
Your best bet would be to learn about Django before trying to jump in head first - https://www.djangoproject.com/ contains documentation as well as tutorials on creating Django apps.
Django is fairly easy to setup if you already have the code written. You'll need to install the chosen database and then simply follow the tutorial on the Django website
Django comes with a built-in server so it's very easy to run the website for development without needing Apache, nginx or much else.
I learned using the Django Book. Django is an easy-to-use framework, you should be fine.
Also, in the short-term there's a file called views.py and separate folder containing templates. If you're familiar with MVC (MVT in Django) this contains the views for the site in function form. There's probably (but not always) a folder for templates which contains a lot of the HTML for the site. Just a good starting pointing for basic modifications.
You can perhaps start here. https://docs.djangoproject.com/en/dev/howto/deployment/
First, find out the django version required by your client. Install that on a server (not a production one), setup apache and mod_wsgi. The zip files may go to a dir which can be included in the mod_wsgi configuration.
Find about the static files and setup apache or any other lightweight webserver to server it.
You may not be a developer, but have a try with the django book. It can give you a good idea how its structured.
Just downloaded Coldfusion 9 developer for review purposes. I am at the administrator page 127.0.0.1:8300 and I think everything has worked fine. I want to do a simple "Hello World" example. One tutorial gave me a simple 6 line script to do this and it looks pretty simple and understandable. I went to notepad and created the following:
<html>
<head><title>Hello World</title></head>
<body>
<cfoutput>#ucase("hello world")#</cfoutput>
</body>
</html>
It told me to save it as helloworld.cfm in inetpub/wwwroot directory. I could not find such a directory on my system. So I saved it to C:\helloworld.cfm. Then it told me to go to my browser and type http://localhost/helloworld.cfm. I got something to the effect of a page not found error. Any help you can spare here.
Secondly, and more importantly, exactly where do I really need to be to be to create and run the above helloworld.cfm script above? Is there another tool I must have to create the above script to do this? I also understand that there is very little tutorial documentation on Coldfusion 9, why is that the case. Can you offer me any suggestions. I would really like to use this development tool. Adobe says it is the easiest development tool out there. You will have a tough time convincing me of that at this stage, however, I just might be missing a procedural/processing step thats real simple. I hope this is the case. Thanks for you valuable time.
When you installed ColdFusion did you hook it up to a webserver or did you install it in standalone mode?
Did you install it as standard ColdFusion or Multiserver?
The reason I ask is that depending on how you installed it will determine where you will find the web root.
For example, ColdFusion standard in stand alone mode will have the web root under something like C:\ColdFusion9\wwwroot
Multiserver standalone will be something like C:\Jrun4\servers\cfusion\cfusion-ear\cfusion-war\
Installation with a connection to a web server will have asked you where you server's web root is and so on
To create scripts; notepad, but there are two eclipse based IDEs you might like to try. CFEclipse is free and ColdFusion Builder is adode's commercial product.
First of all, Welcome to the ColdFusion community!
I believe Jerry has done a default ColdFusion install. The CFAdmin URL as mentioned is 8300, so i guess it is a multi server installation.
As pointed out by stephen, your web root would be something like \Jrun4\servers\cfusion\cfusion-ear\cfusion-war\
You need to place your helloworld.cfm in the above path.
I recommend ColdFusion builder/ CFEclipse to start with.
CF is a easy language, you will realize that soon :)
http://localhost/ will point to where your web server is configured. So obvious question is did you configure a web server such as IIS or Apache? Which OS are you using and which install of ColdFusion did you pick (standard, multiserver, other...)?
If you don't want to use an external web server you can use the built-in one, I have never really used it much but here is a link that should get you going: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservmgmt_3.html
To create CFM files you can use pretty much any editor, the most popular one is Eclipse (http://www.eclipse.org/) coupled with the CFEclipse plugin (http://www.cfeclipse.org/). Adobe now has a IDE based on Eclipse called CFBuilder (http://www.adobe.com/products/coldfusion/cfbuilder/features/) which is gaining speed quickly, but it is not free.
Not sure if this is an excessively broad and newbie-ish question for Stack Overflow but here goes:
I paid someone else to build a web application for me and now I want to tweak certain aspects of it myself. I learn best by trial and error – changing stuff and seeing what happens. Obviously that's not a great way to treat a live site, so I need to duplicate the site on some kind of test server which I can play with without fear of the consequences.
Unfortunately the closest I've come to programming has been creating ActionScript-based websites. I've never touched a database. So I really don't know where to start with setting up a test server.
I would really appreciate any advice about where to start. I am completely ignorant and lost here.
The web application is built in python/django using a Postgresql database. I use Mac OS X 10.6 if that makes any difference.
You can run the site locally on your Mac. See the installation documentation for details on how to install Django and set it up to work with Postgres, then you can run the site just by going into the directory that contains the manage.py file and running python manage.py runserver.
The site will now be available in your browser by going to http://127.0.0.1:8000/