How to run the packaged application from django's polls tutorial? - django

https://docs.djangoproject.com/en/3.0/intro/reusable-apps/
After it's packaged, the documentation says that 'With luck, your Django project should now work correctly again. Run the server again to confirm this.'. In this tutorial, to start the server, do this:
python manage.py runserver
But after this is packaged and installed to the user directory, it has been moved out of the project, and 'manage.py' isn't available. How to run the server and test the newly installed package?
This may be a silly question, but the doc does lack a key sentence to tell how to start the server to run the installed package.

Related

In the netbox plugin development tutorial, where is manage.py being run from?

I am following the tutorial on plugin development at https://netbox.readthedocs.io/en/stable/plugins/development/
I have gone as far as creating the models and want to make migrations...
However, the manage.py is not found in the root of my plugin folder.
Where is it expected that manage.py is?
The manage.pyis part of the Django application (= website). It is located in the Django root folder, see e.g. Django tutorial.
So, a plugin never has got its own manage.py, but it may have got a set of migration files that are used by the Django app when python manage.py migrate is invoked and the plugin has been installed and defined as being a part of the Django app (within settings.py).
Assuming you've followed the installation instructions and installed Netbox in /opt/netbox, the manage.py file you need to use is located in /opt/netbox/netbox/ folder.
Don't forget to activate the virtual environment in /opt/netbox/venv and to set DEVELOP to True in /opt/netbox/netbox/netbox/configuration.py

Deploy Django project with MSSQL DB in Local Server

I am new in Django and this will be my very FIRST Times web deploying. So I am trying to deploy my project to the local server and My project stack is Django with MSSQL so obviously I will need Window.
I was read the documentation and I think I will need WSGI and As the documentation say to deploy with gunicron or uWSGI but both are supported for Unix and not for window. So How can I start this one? This will be the first question.
I would like to know whether I am doing is correct or not.
Now I copy my project to the local server and when I try to run my project like python manage.py runserver it asks me to install Django and other but I thought this environment is working at well my computer and all of the needed application is already installed in the environment. So I still need to install all of my needed apps like Django to this environment again?
If u have any tutorial or can guide me to some useful site, I will be very very appreciated.
Anything u want to know further, Just let me know.
Thanks.

Deploying Django App on Heroku using Windows

I want to deploy my django app on heroku , which I have built on Windows machine.
Can I deploy the same application using heroku toolbelt for windows.
Or I have to setup all the things on a unix machine.
And one more thing the application uses Python 3 and Django 1.8
Will that be any problem.
There aren't any special process listed in the docs for windows usersYou should actually deploy from a unix environment, you have to create your Procfile, requirements.txt and make some changes to your settings.py file, it's easy and straight forward.
A step by step guide can be found here https://devcenter.heroku.com/articles/getting-started-with-django
Some problems you may encouter:
Internal Server Error heroku/django
Django migrations fail in heroku
Also make sure you add your migrations and cache folders to your .gitignore file.

How can I get started developing with Django on Cloud9?

So Cloud9 looks really cool, and you can create python files in it, but I can't figure out how to get it to run a Django project. I imported one from my github account into the IDE, but it says I need to install Django (a django.core import error) so I need to help getting going. Any Ideas? Any skeleton projects on the web that I missed that will do this?
After some research and looking for an answer on different blogs and sites I finally found a solution:
Create a new workspace
Execute easy_install django to install Django
Create new Django project python ./../bin/django-admin.py startproject myproject
Start dev server python ./myproject/manage.py runserver $IP:$PORT
Access http://projectname.username.c9.io
VoilĂ !!!
I hope this helps
Just write commands in shell as it is:
sudo pip install -r requirements.txt (you should have there django)
than
python manage.py runserver $IP:$PORT
you will have app on https://projectname-username.c9.io
You may also have to add the proper path: <workspace_name>-<username>.c9users.io to the ALLOWED_HOSTS list in django_project/settings.py file, as suggested by the error message returned by django server. Tested on Django 2.0

why i can't run app-engine-patch on my gae

this is app-engine-patch http://code.google.com/p/app-engine-patch/
i download it ,and unzip , but can't running on my google-app-engine launcher
why ?
updated
but the patch has app.yaml, and i can't find aep-sample
updated2
when i python manage.py runserver
so can app-engine-patch running on gae launcher ?
App Engine Patch isn't an App Engine app, it's a library to use with your app. If it doesn't have an app.yaml file, it won't be able to be run.
It looks like there's an aep-sample app included in the .zip file, try running that.
(response to edit)
The app.yaml file you found references aep-sample as the app's name, but the app listed in the launcher says "patch", so something's wrong there.
Have you read the Getting Started page on the project's site? Reading the documentation is generally a helpful first step.