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
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,
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
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
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
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:
>
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'
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:
>
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
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,
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
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
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
>
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
14 matches
Mail list logo