I am trying to create my 1st project in django using jython. I am following this tutorial - http://docs.djangoproject.com/en/dev/intro/tutorial01/.
As mentioned in tutorial, I navigate to the directory where i intend to create a django project and run 'jython C:\jython2.5.1\Lib\site-packages\django\bin\django-admin.py'. On pressing enter, it says- Type 'django-admin.py help' for usage.
It is not creating a new project. I am using windows and have installed jython 2.5.1 and django 1.1.1.
I tried searching on google but no luck. This is the very first step and i am not getting how to do it. please help.
You need to type django_admin.py startproject your_project, where your_project is whatever you want to call your project.
Related
I will be thankful if someone can help me with the following issue.
I am using windows 10
Django version: 2.1.1 with Python version: 3.5
I have my TensorFlow object detection API, that trained my images which is totally outside of my Django project.
However, I created my Django project after that in the same environment that I had my TensorFlow object detection models.
Both of them with the same (python version: 3.5).
Before creating the Django webpage, I always needed to run my 'Object_detection_image.py' from anaconda prompt line, otherwise, I got an error.
My question is: how I can specify my Object_detection_image.py path directory in the setting.py in Django using anaconda prompt line?
When I write my directory like this: C:\tensorflow1\models\research\object_detection
then how I can use anaconda prompt line in this path? because if I write it like this, it doesn't work. please help me.
Thank you.
I did not run it because I have a problem with how to write the path for my TensorFlow project. I thought if they locate in the same environment, I won't get any problem. I mean before creating Django I could not run it directly from the script. I had to use an anaconda prompt line. but now, since i have django i dont know how to do it.
I've started learning django. Through the django docs, I am using vscode for the project. The matter is that I've started a new project named "mysite" in the project folder named "web-project" by using the following commands as mentioned in the screenshot
But if you noticed an error in the last of the screenshot. It pops every time I tried to run the server
I have PyCharm professional edition, and I have been trying to PyCharm and Django. However, it seems that I could not enable Django support in PyCharm. As shown in the following figure, when I try to enable Django support in the PyCharm setting, there is nothing shown for Django.
Can anyone help me identify the issue?
That's because you haven't created a project yet. You get this screen because you're still in the step before creating a project.
Create a new project
Select Django on the left column
Enter a name for your project
Select (or create on the fly) a virtualenv
Click the Create button
Now, after project has been created, you can go to Languages & Frameworks => Django and then enable the Django support by selecting your project root directory and your settings.py file.
Can someone please guide me on How to use Django on Pycharm ?
Any descriptive steps or any link to videos would be very helpful..
I am using Python 2.7 with pycharm 4.5.4
Create a virtual environment
Create a new Django project
Add local interpreter for your project
It's simple as that.
Steps:
create github repository
create virtualenv
clone github repo into your virtualenv folder
inside github repo folder, create new django project
open the folder with pycharm
setup python interpreter
Enable Django support
setup Project Structure if needed
Switch to Django Template Engine
Have fun with Pycharm! it is an awesome IDE
In eclipse,when i create new project, i got an error like,
Error creating Django project
settings.py file not created
Stdout:
Stderr:
If i synchronize present project and runserver, iam getting Error: No module named filterspecs.But i haven't used filterspecs in my project. Already filterspecs.py installed in usr/local/lib/python2.7/dist-packages/django/contrib/admin.
Kindly advise to rectify the error.
You may be using django.contrib.admin.filterspecs to create custom filters for your admin pages, such as outlined here:
Custom Filter in Django Admin on Django 1.3 or below
Unfortunatelly, you will have to rewrite these using the new list_filter module functionality.
See the manual here:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter
This happened to me as well, even though my code wasn't directly using any filterspecs.
Run python manage.py runserver --traceback to see exactly where the error is coming from.
This module was removed in Django 1.4, but other external modules you have listed in your settings.py might still be using it, so make sure you upgrade everything in your INSTALLED_APPS list. In my case, I was using an outdated version of FeinCMS, but after I upgraded it, the error went away.
Obviously, your system is lacking filterspecs module which is required by the project. Install it by typing sudo pip install filterspecs in the console (if you are on linux)