Re: Missing manage.py & settings.py

2019-03-08 Thread Sithembewena L. Dube
Understand the difference between a project and an app. See "Projects vs. apps" at the following link (correct for current version). https://docs.djangoproject.com/en/2.1/intro/tutorial01/ Kind regards, Sithembewena *Sent with Shift

Re: Missing manage.py & settings.py

2019-03-08 Thread gauravsrivastava2k17
after installing django inside virtual environment write following commands: django-admin startproject "you_project_name" go inside this folder and then type python manage.py startapp "your app name" this command will create apps and after this include your app inside installed apps On Saturday,

Re: Missing manage.py & settings.py

2019-03-08 Thread lujate
I know what startapp is for. I'm just wondering why it's applicable here. To recap, I have a 3rd party Django app that I need to pip install. I created a project to contain the app. When I add the app to installed apps in my settings, Django errors on start up. If startapp is still required for

Re: Static files in production [Was: How does WSGI work?]

2019-03-08 Thread Tal
Ok - maybe I'll try to get a hold of Grahame Dumpleton when I have some time. Thanks guys PS. Python frameworks like Flask or Django are good at making decisions about what response to return for a given request, and returning it. In most cases, that response is an HTML page, or json, or

Re: How to remove a model definition completely in Django when it previously had foreign keys

2019-03-08 Thread James Bennett
When you need to remove any piece of code that's been referenced in migrations, generally there's a multi-step process. For sake of a simple example, let's assume you have Model A in App A, and Model B in App B. And at some point you added a foreign key from Model A to Model B, but now you want

Re: ModuleNotFoundError: No module named 'sample,'

2019-03-08 Thread Ezequiel Bertti
Check your INSTALED_APPS on settings.py I think you have a simple typo with: "sample,", On Fri, Mar 8, 2019 at 7:14 AM abel otugeme wrote: > You must have written code that doesn't work. Check if you imported any > function e.g models that you didn't use. > On Mar 7, 2019 10:44 AM, wrote: >

Re: How to remove a model definition completely in Django when it previously had foreign keys

2019-03-08 Thread Henrik Ossipoff Hansen
Yes, when running tests (which happen on a clean database), the migration history is run all from the initial migrations (by Django itself). At this point, app b's initial migration (which have a reference to a.A) will fail because it cannot find such model: ValueError: Related model 'a.A'

Re: How to remove a model definition completely in Django when it previously had foreign keys

2019-03-08 Thread Clara Daia
Are you getting an error? I think migration dependencies should solve that by themselves, running "step 2" before "step 3". Doesn't Django complain if you try to migrate "step 3" before "step 2"? Em sex, 8 de mar de 2019 às 11:07, Henrik Ossipoff Hansen < henrik.ossip...@gmail.com> escreveu: >

How to remove a model definition completely in Django when it previously had foreign keys

2019-03-08 Thread Henrik Ossipoff Hansen
We're trying to remove a model completely from one of our apps - an operation I think we've done many times without issues, but this time it's causing us some headache. Consider we have two apps: An app called a with a model A An app called b with a model B, and this model B has a foreign key

Re: linking django app to slurm db

2019-03-08 Thread Derek
I have not worked with SLURM in any way at all ... but it seems to me that if its a third-party app, you'd be better off working with an API that will shield you from the messy details of the internal database e.g. https://github.com/PySlurm/pyslurm On Thursday, 7 March 2019 15:39:24 UTC+2,

Re: django.db.utils.OperationalError: no such table: user_user

2019-03-08 Thread cyril moreau
It does not work for me and i dont know why. if i want to have the table created I have to first make : python manage.py makemigrations my_app and then python manage.py migrate python manage.py makemigrations (without the name of my app) does not take into account my apps that i have

Re: django.db.utils.OperationalError: no such table: user_user

2019-03-08 Thread Nasir Ahmad
Hi, Migration for each app use cmd > python manage.py migrate, it migrate all inbuilt app. On Fri, Mar 8, 2019 at 2:27 AM cyril moreau wrote: > To fix my issue I had to makemigrations for each one of my app : > > by doing the following it will create my user table : > > python manage.py

Re: ModuleNotFoundError: No module named 'sample,'

2019-03-08 Thread abel otugeme
You must have written code that doesn't work. Check if you imported any function e.g models that you didn't use. On Mar 7, 2019 10:44 AM, wrote: > Hi Team > > My project name is Sample > While I am trying to connect database with models.py > I am finding these type of errors >

Re: Missing manage.py & settings.py

2019-03-08 Thread Andréas Kühne
The reason you have startapp in django-admin is because you might want to start a new part of your project from scratch. For example if you are selling ice-cream online and have models for ice-creams in the ice_cream app and you want to start selling cupcakes as well, you can then start a new app