Khuram
Khuram

Reputation: 1850

How to Create a Django Project in Netbeans 8.0.2

I'm using Netbeans for PHP and now I'm moving to Python Django. I've installed Python plug-ins for Netbeans and it works perfectly. But I don't know how to create a Django project in Netbeans 8.0.2. Can you help me in this regard???

Upvotes: 2

Views: 9012

Answers (3)

H.Antunes
H.Antunes

Reputation: 1

Netbeans 8.2 and Python/Django Hi! I'm using Netbeans 8.2 and plugin python http://plugins.netbeans.org/plugin/61688/python and works fine. How to do with Django? After downloaded the plugin and install it.

  1. Create your django project in terminal django-admin.
  2. Open netbeans and create a new project (Ctrl+Shift+N)
  3. Select a python project with Existing Sources - Ant.
  4. Select folder where the project was created with terminal.

Upvotes: -1

GTM
GTM

Reputation: 61

With the caveat 'something is better than nothing'.

https://georgeudosennigeria.wordpress.com/2015/10/26/django-netbeans-on-linux/

  1. Create a python app in NetBeans, but note several things here:

    • Add the Python project plugin.
    • Do not select the option in NetBeans to create a main file.
    • Leave the IDE open.
  2. Open up your terminal

    • Navigate to the django project folder in NetBeans.
    • Create the virtual environment by running the following command – virtualenv nameofyourenvironment.
    • Activate the environment you just created by running this command- source newenv/bin/activate. Note you won’t see the created environment in NetBeans project directory browser but you will see it in the file browser(open with “ctrl + 2”).
    • Now move into the “src directory”.
    • Run: django-admin startproject projectname
    • Move into "projectname". Here we have django’s main file (manage.py).
    • Run: python manage.py migrate
    • Run: python manage.py createsuperuser
    • Run: python manage.py runserver 0.0.0.0:8000
    • View the default project page at localhost:8000
  3. Now view your NetBeans IDE you should see files and folders for the django app

Upvotes: 0

valignatev
valignatev

Reputation: 6316

As e4c5 said netbeans isn't best choice for django development. As I remember, there was netbeans-django. But as you see the project was moved in archive long time ago and pretty dead now. And question about what to use instead of it definitely will turn into holywar.

For choosing of best django IDE you can start with this question.

Upvotes: 2

Related Questions