I'm building an app with a django backend and a jquery mobile frontent. I am trying to figure out how to view what I'm building. What I mean is, to date, when I build my web apps (regular django powered websites) I do it all locally and use the django testing server (python manage.py runserver) to test what I'm building, viewing my results at 127.0.0.1:8000/.
If I'm building an app for our iPhones, how can I view my web app on my phone while I'm testing? If I fire up the django test server, I can navigate to my app on my laptop and it looks like an app. However, I want to open up my phone's web browser to see the same app page.
On my laptop I navigate to: 127.0.0.1:8000/m/ and I assume that on my iPhone I would navigate to my laptop's IP address, so: 192.168.1.103:8000/m/
I think I'm missing something here conceptually... any ideas?
try
python manage.py runserver 0.0.0.0:8000
By using 0.0.0.0, you will be able to serve files up to external computers and your iphone
Related
I have a web app made with Flask and I want to host it on GitHub pages. However, GitHub pages can't run Python apps, and I can't use something like Frozen-Flask because my app is dynamic.
I'm new to web development and deployment however I developed a web site using Python 2.7 and Flask. I can't get the site to load when the user hits the site. When testing on the server using SSH the program starts like it did on my development PC but does not render the first template and shows this error: WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
In researching that error I found an article that says Flask is not meant for a multi-user public web environment. Further investigation said: If you want to run Flask in production, be sure to use a production-ready web server like Nginx, and let your app be handled by a WSGI application server like Gunicorn.
I think what this is telling me is:
Find a provider that supports Nginx.
Install Gunicorn and then configure it to run on that host.
Doing that should allow my program to run on the host server and be accessible to the world.
Would folks with experience with Python/Flask web apps please confirm the direction I should be heading as I can't afford to go down the wrong path again.
im running django development server and all models works fine..
But when i have configured and run apache through wsgi, only "Groups" and "Users" could be administrated, my own models disappears:
screenshot of admin pages from development server and production server
Why, please?
(After first comments here is my edit:)
I want to use django on localhost only, to fill and administrate small database file. Project is not intended for web hosting yet. I have no html views and templates defined. So I have try some simple view for testing purposes only, and problem is the same. Web server cant find some includes..:
image2: simple view also dosen't work
Make sure your production settings file has all the apps included. Normally when you don't see your admin models its due to the app missing from the list of apps included in settings.py.
Had the exact same problem. Had to restart uwsgi
sudo service uwsgi restart
Maybe for you it's wsgi or apache. Something in the pipeline needs to know you changed some python code.
I have been developing an application in Django. The production version of the app is running on an Apache server in a unix system. In order to get my app to play nicely with over applications running on the server, I had to create a WSGIScriptAlias (so on the production server www.example.com/home became www.example.com/alias/home). This change initially broke a few links and AJAX calls where the urls were a little too hard coded, but I think I've weeded out those issues.
However, for testing purposes and so that my development environment more closely reflects the production system, I would like to be able to alias the dev server as well. Is there any way to do this short of setting up an apache on my dev machine as well? manage.py runserver 0.0.0.0:8000/alias does not seem to work.
Main Question: Is it possible to do all development for a Sencha Touch 2 web app on a Linux server?
I have a Linux server already hosting/running a decent size Django web application for the company I work for and want to build a web app for use on iPads in the field (the web app would only have a small amount of functionality for field crews). Ideally, I would be able to do all the development for this web app on the linux server, and not on my personal Windows computer.
I can't find anything that shows how one would set up such a scenario. Do I put the SDK files in my Django project directory? Would they go in an app directory within my Django directory? How do I set up the apache server to manage the Sencha Touch app?
The Sencha "Getting Started" guide shows code for what looks like a Linux type shell (they say to change to the ST directory by doing cd ~/webroot/sencha-touch-2.0.00gpl/ <- that looks like Linux command line, no?)
Anyone have any guides, information, tutorials, tips about thi