In Django project how to create app in subapp in apps folder.

2021-05-18 Thread Salima Begum
Hi all,

We initially developed our project with the following folder structure;

[image: old_folder_structure.PNG]

As shown in the above image we have developed and integrated everything
into a few files. Since the functionality is growing we are planning to
separate each functional module as an individual app folder structure
within the old app folder. I am thinking of creating an apps folder and
within the apps folder I want to create individual apps folder( just like
what is seen in the above image). So the new folder structure is created as
shown in the image below.

[image: within_app.PNG]
When I have run migrations after creating I am getting an error.
```
AttributeError: module 'oldapp.apps' has no attribute 'categories'
```

```
django.core.exceptions.ImproperlyConfigured: ' oldapp .apps' does not
contain a class 'categories'. Choices are: ' OldappConfig'.
```

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMSz6bnOSptHtzeSBK_2BfRE%2BxzLpD8LAAnkYecHTK25_nz1aA%40mail.gmail.com.


Re: In Django project how to create app in subapp in apps folder.

2021-05-18 Thread Ayser shuhaib
I think you should add __init__.py file inside your apps folder for Django
to see it

On Tue, 18 May 2021 at 17:20, Salima Begum 
wrote:

> Hi all,
>
> We initially developed our project with the following folder structure;
>
> [image: old_folder_structure.PNG]
>
> As shown in the above image we have developed and integrated everything
> into a few files. Since the functionality is growing we are planning to
> separate each functional module as an individual app folder structure
> within the old app folder. I am thinking of creating an apps folder and
> within the apps folder I want to create individual apps folder( just like
> what is seen in the above image). So the new folder structure is created as
> shown in the image below.
>
> [image: within_app.PNG]
> When I have run migrations after creating I am getting an error.
> ```
> AttributeError: module 'oldapp.apps' has no attribute 'categories'
> ```
>
> ```
> django.core.exceptions.ImproperlyConfigured: ' oldapp .apps' does not
> contain a class 'categories'. Choices are: ' OldappConfig'.
> ```
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bnOSptHtzeSBK_2BfRE%2BxzLpD8LAAnkYecHTK25_nz1aA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE0AZGLa2FfeFkJ6D4LZBBCef8cQnbfj%3D%2BTV2Kdyi2UGQaUkTQ%40mail.gmail.com.