Apps location in Django using pinax - python

Maybe this is a silly question, but I'm new to all of this and I could use some help. I recently just started a new django project using pinax. Specifically, it's the pinax accounts project for user sign-ins. When I look at my project folder, it doesn't include any apps. I've noticed that all of my apps are stored in virtualenv/Lib/site-packages...
Why is it that the apps for my project are stored here? Does it make more sense to move them into my actual project folder instead of working out of the virtual machine folder? So I guess my question is: when working in a virtual machine, are all apps, etc stored in the virtual machine folder as apposed to the project folder? And why?

Related

How to add virtual environment in an existing Django rest project

I have made a Django rest project I want to add virtual environment to it
https://github.com/iamahmedshahh/djangowallet
This is the structure of my project which is pretty much the default structure when creating a project from command line.

Run Django Project on other system

I have developed a student website using django which includes a database(MySQL), so now I want to run this django project in another system, so how can I run this django project in another system including the database(that is MySQL)
You can make a backup of the database and copy it to the other system. Then you can create a requirements.txt file to get the dependencies, or you just try to run the project and look which packages are missing. The last thing you have to do is that you may change some paths to different files, you added in your Project. This might also help you.
Hope I could help you!

Python doesn't recognise Django app folder

I am new to Django and was following the tutorial here (https://simpleisbetterthancomplex.com/series/2017/09/04/a-complete-beginners-guide-to-django-part-1.html#hello-world) to get my first application running. I could not reference my application so I decided to name everything exactly as is in the tutorial in another Python project. I am unable to import view from boards no matter what I do (change it to projectname.appname and a number of different variations that I found on here). I have tried this tutorial on another computer I do not have access to at the moment and can confirm that it works usually. Is this an issue with PyCharm/my Python environment?
Project Structure
Error I am receiving
Fixed
To resolve this I marked my Django Project Folder (not Python Project Folder) as root.

Python Manage.Py

I am very New to Python web development ,so got confuse while learning ,when we create new Project with the command --django-admin startProject 'ProjectName'
It Created a project folder in my drive and then we create application in it suppose with the name of "calculator", we start working in it ,
but after some more requirement we have to create a new different Project with the Name of the Hrms so the question arise for this again we have to run the same command django-admin startProject 'ProjectName' and then we have to create application in it or we can create in it?
One project may have many application in it & you can create app using below code.
django-admin startapp my_new_app.
Also you can reuse same app in multiple projects.
For Hrm you should create new app instead of new project.
Example : One ERP projects may have many apps like hrm, sales, purchase, inventory etc.. & we can reuse same apps into another ERP projects also if needed.
Hope above clarifications works for you.
Project and apps and different see this
django-admin startproject mydjangoproject creates the project for you,
What you want to do is to create an app hrms and caculator can be apps living under umbrella of one project that is mydjangoproject
You should create apps here by django-admin startapp hrms and django-admin startapp calculator and add it to settings.py in your project folder
INSTALLED_APPS = [ #otherapps here
'hrms',
'calculator']
Start project and start app are very different commands. With the first one you create a project which will have a base structure to work on. The second command is used to create apps which you could classify as controllers. Each app will live in a folder where you will program the business logic and bind endpoints.
The app would be a new module in your project, let's say it would be a management system with human resources, financial modules, etc., so you would create an app for each of them to better organize, but nothing prevents creating everything in one app.Create a project only if it is something different.

Import Existing Django Application into Pycharm

I have an existing Django application. I want to start developing it in Pycharm, instead of sublime text and command line. I have opened my existing directory (cloned from my git repo) into Pycharm but I can not for the life of me figure out how to set it as a django project. All the examples I see are new projects from scratch or existing pycharm projects, neither of which applies to me. I'm running on a brand new mac, if that helps (I'm coming from Ubuntu)
You need to enable Django Support in the project settings under Project Settings -> Django. You also would need to set up the project root, path to settings.py and manage.py.

Categories