Re: Combining django apps

2022-10-21 Thread Mohammed Mohamed
Hello there, can we arrange Google meetings so that I can be able to learn 
from you? I'm a Python Beginner.

On Wednesday, 19 October 2022 at 07:49:41 UTC+3 eupaulo...@gmail.com wrote:

> 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, tna...@gmail.com 
> 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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/36c601a7-124b-40b9-a2b3-687cb616d719n%40googlegroups.com.


Re: Django call_command from Admin

2022-10-21 Thread Mohammed Mohamed
Hello there Aziz, are you a beginner in Python? I'm one. Could we make some 
Google meet arrangements so that I can learn from you.

On Thursday, 20 October 2022 at 19:17:41 UTC+3 azi...@gmail.com wrote:

> Hi 
>
> Thank you very much for the  swift response and for the link, much 
> appreciated.
>
> I did have a look at that article this morning but it is using signals 
> which will only add one more layer to my stack and
> i think essentially does what call_command will do anyway.
>
> I really appreciate your response
>
> PS: I couldn't see your name in the email hence why I didn't address you 
> by it, apologies
>
> Kind regards
> Aziz 
> On Thursday, October 20, 2022 at 5:10:04 PM UTC+1 justt...@gmail.com 
> wrote:
>
>> Do a little read up on post_save signal.
>>
>> Below is a link to a good start point for you:
>>
>> https://simpleisbetterthancomplex.com/tutorial/2016/07/28/how-to-create-django-signals.html
>>
>> I hope this helps you in your search.
>> Best Wishes Aziz.
>>
>> On Thu, Oct 20, 2022 at 5:06 PM Aziz Mek  wrote:
>>
>>> Hi All,
>>>
>>> I was wondering  if you have come across the following:
>>>
>>> I have a field in the model that's empty, when the user fills it up and 
>>> clicks Save, it
>>> should trigger/call a management Command (This command is already build 
>>> that sends emails ), Django docs say i can use call_command but not sure 
>>> how to implement it with the save
>>>
>>> I am just after the trigger really when the save takes place
>>>
>>> Many thanks in advance
>>>
>>> Kind regards
>>> Aziz
>>>
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.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/accaca49-b8dc-484b-a4de-9e5c78395902n%40googlegroups.com.


Re: Django call_command from Admin

2022-10-21 Thread Mohammad Ehsan Ansari
Please refer the signal concept in django you will get how to implement it

On Thu, 20 Oct, 2022, 9:36 pm Aziz Mek,  wrote:

> Hi All,
>
> I was wondering  if you have come across the following:
>
> I have a field in the model that's empty, when the user fills it up and
> clicks Save, it
> should trigger/call a management Command (This command is already build
> that sends emails ), Django docs say i can use call_command but not sure
> how to implement it with the save
>
> I am just after the trigger really when the save takes place
>
> Many thanks in advance
>
> Kind regards
> Aziz
>
>
> --
> 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/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.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/CAF8ux6Li0BjKS2zvQuPWL6zq-R6Buo9wa1fBx68m4ESpTptHug%40mail.gmail.com.