First of all, you need to add all your apps in INSTALED APPS into the 
project > setings.py. I have 3 apps, core, members, and home. 

INSTALLED_APPS = [
  (..)
  'core',
  'members',
  'home',
 ]

Secondly, you need to create a route to each app in your project > urls.py

urlpatterns = [
  path(' ', include('home.urls')),
  path('udemy/', include('core.urls')),
  path('w3schools/', include('members.urls')),
  path('c-panel/', admin.site.urls),
 ]


After that, each app will be self-independent I  mean with your own models, 
templates, statics, etc. 

* Of course, you will need to run state collect and migrations commands on 
the terminal 
** make sure -->  ROOT_URLCONF = 'YOURPROJECT.urls' <-- project > setings.py

Let me show you an example 




Em terça-feira, 18 de outubro de 2022 às 07:01:15 UTC-3, [email protected] 
escreveu:

>
> mysite/
>
>     manage.py
>
>     config/
>
>         __init__.py
>
>         settings.py
>
>         urls.py
>
>         wsgi.py
>
>     app1/
>
>         app1a/
>
>       app1b/
>
>     app2/
>
>     app3/
>
> I would like to know how to combine  apps together just like above.  Each 
> app itself  works fine when runserver. I followed some websites talking 
> about this but I always get some error like ‘app1a' is not a registered 
> namespace. I'm not very familiar with combining apps. I hope someone can 
> tell me the simplest way to do that.
>
> Thank you.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/91be7100-d094-4c22-a2c2-6d662a7208a9n%40googlegroups.com.

Reply via email to