Re: - CRUD To Learning

2022-05-13 Thread Pradeep Chowdhary
django for everybody by Dr Charles Severance  DJ4E - Django for Everybody 
 
Another site I found  useful is a series by Corey Shafer  Python Django 
Tutorials - Full Series - CoreyMS 


On Tuesday, May 3, 2022 at 10:03:03 PM UTC+5:30 carlos...@gmail.com wrote:

> Hello
>   Do you have a step by step to learning to programming with Django?
>
> Carlos
>

-- 
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/980092a6-f8b6-42a7-9291-04871b041cben%40googlegroups.com.


Re: Images

2022-05-13 Thread Boris Pérez
If the images files are sotored in static:
{% load static %}



El vie, 13 may 2022 a las 10:03, Nicolas Passarini (<
nicolaspassar...@gmail.com>) escribió:

> how do you refer to the object in the template?
>
> El martes, 10 de mayo de 2022 a la(s) 09:58:56 UTC-3, narsh...@gmail.com
> escribió:
>
>> You change the names of the pictures in the separate folder then copy
>> them in a static folder then change the picture file names in the template
>> folder then refresh then see pictures are new ones or not
>>
>> On Mon, 9 May 2022 at 20:15, Aliya Janmohamed 
>> wrote:
>>
>>> Hi
>>>
>>> It is still displaying the same image as above.
>>>
>>> On Sun, 8 May 2022 at 03:34, Arshad Noman  wrote:
>>>
 First, you change the picture name and place it in the pictures folder
 like static or media folder then change the picture name in templates where
 you want the picture to be displayed


 
  Virus-free.
 www.avast.com
 
 <#m_-8114907552984717051_m_3502899349567986621_m_-4392793013509788988_m_-8012441007838514003_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

 On Sun, 8 May 2022 at 03:37, Aliya Janmohamed 
 wrote:

> Hello,
>
> I cannot load my images, this is what shows:
>
>
> --
> 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/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com
> 
> .
>
 --
 You received this message because you are subscribed to a topic in the
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/django-users/M5ZOBHwScMA/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 django-users...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CALHQhB7p5fnh2PQRKZYx9rCt3ZgHyGazV41Px4gyqBZv%3DQZJJA%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/b93e1ab4-bd95-4df3-b1b3-7970261baa12n%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/CAObPVPD8-T_QjCqwZ47bT%2BYT%2BHX%3Dpdwd%3DOEEUQYfiCWQJtxgWg%40mail.gmail.com.


Allocating items to users

2022-05-13 Thread 'dtdave' via Django users
I have the following code:
from django.conf import settings
from django.db import models

class AccountManager(models.Model):
account_manager = models.ForeignKey(
settings.AUTH_USER_MODEL, on_delete=models.PROTECT, null=True, 
blank=True
)

class Meta:
verbose_name = 'Account Manager'
verbose_name_plural = 'Account Managers'

def __str__(self):
return str(self.account_manager)
The view for this, effectively a profile, is as follows

from django.contrib.auth import get_user_model
from django.shortcuts import render
from django.views.generic import DetailView
from django.contrib.auth.mixins import LoginRequiredMixin

from .models import AccountManager

User = get_user_model()


class AccountManagerDetailView(LoginRequiredMixin, DetailView):
model = AccountManager
template_name = "accountmanagers/dashboard.html" 
 
def get_object(self, *args, **kwargs):
return self.request.user

And the url:
urlpatterns = [
path('detail/', views.AccountManagerDetailView.as_view(), 
name='accountmanagers'),
]
The template then shows the relevant user details but my problem is that I 
am stuck allocating the clients to the specific account manager. I know 
that I am missing the point in implementing a queryset and tieing it to 
that user.
Any help would be appreciated.

-- 
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/87ede928-7459-4031-a7a2-9edf52f8bacan%40googlegroups.com.


Django deploy Apache

2022-05-13 Thread Nicolas Passarini
Hello, i ve deployed a django app in apache. the problem is that i works 
for 5 minutes and then it stops responding. 

-- 
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/84858a53-2256-4bee-889a-ff365127f86en%40googlegroups.com.


Re: Images

2022-05-13 Thread Nicolas Passarini
how do you refer to the object in the template?

El martes, 10 de mayo de 2022 a la(s) 09:58:56 UTC-3, narsh...@gmail.com 
escribió:

> You change the names of the pictures in the separate folder then copy them 
> in a static folder then change the picture file names in the template 
> folder then refresh then see pictures are new ones or not
>
> On Mon, 9 May 2022 at 20:15, Aliya Janmohamed  
> wrote:
>
>> Hi 
>>
>> It is still displaying the same image as above. 
>>
>> On Sun, 8 May 2022 at 03:34, Arshad Noman  wrote:
>>
>>> First, you change the picture name and place it in the pictures folder 
>>> like static or media folder then change the picture name in templates where 
>>> you want the picture to be displayed
>>>
>>>
>>> 
>>>  Virus-free. 
>>> www.avast.com 
>>> 
>>>  
>>> <#m_3502899349567986621_m_-4392793013509788988_m_-8012441007838514003_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>
>>> On Sun, 8 May 2022 at 03:37, Aliya Janmohamed  
>>> wrote:
>>>
 Hello, 

 I cannot load my images, this is what shows:


 -- 
 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/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com
  
 
 .

>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/django-users/M5ZOBHwScMA/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CALHQhB7p5fnh2PQRKZYx9rCt3ZgHyGazV41Px4gyqBZv%3DQZJJA%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/b93e1ab4-bd95-4df3-b1b3-7970261baa12n%40googlegroups.com.