Help

22 views
Skip to first unread message

bode moses

unread,
Nov 23, 2022, 5:19:45 AM11/23/22
to Django users
Greetings 

Please can someone assist me on this question?  i'm  new to django 
i  am developing my first  website using Django and sublime text as editor. each time  my computer shutdown. i don't know how to resume back to the normal project page.

CMD
C:\User\Olabode\pycharmprojects> cd CodingWithMoses
C:\User\Olabode\pycharmprojects\ CodingWithMoses> scripts\activate
(CodingWithMoses) C:\User\Olabode\pycharmprojects\ CodingWithMoses> cd src
(CodingWithMoses) C:\User\Olabode\pycharmprojects\ CodingWithMoses\scr>

please help me out to resume back my project where i stop before shorting down

Thanks  

Dushime Mudahera Richard

unread,
Nov 23, 2022, 5:28:14 AM11/23/22
to django...@googlegroups.com
after activating your virtual environment  run :: python manage.py runserver 
then you can open again your code editor and continue as normal 

Best Regards 
Dushime Mudahera Richard
Google Crowdsource Influencer
GDSC Lead 2021-2022 Bugema University
Visit me Community Learning MS
Web dev and  IT Manager @Bluebird Soccer Academy 
Kyangwali Refugee Settlement  Office
Sports | Mentorship | Leadership | Girl Child Empowerment


--
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/36daa4cd-340d-4469-8d43-904f36d73cbbn%40googlegroups.com.

Rachid Abdoul

unread,
Nov 30, 2022, 8:52:23 AM11/30/22
to django...@googlegroups.com
Bonjour, quelqu’un parle français ici svp ? 

Le 30 nov. 2022 à 08:06, Viper Code <fathfa...@gmail.com> a écrit :


mess = Message.objects.get(title="sos")
// print(mess.person.email) // the error occurs here.

emails = []
for m in mess:
    emails.append(m.email)

print(emails)

Pada tanggal Rab, 30 Nov 2022 07.13, Issa N'golo Coulibaly <coulibal...@gmail.com> menulis:
Hi, when I try to access an attribute of a target model in a many to many relationship, I get an error : AttributeError: 'ManyRelatedManager' object has no attribute 'full_name'
so, how to do ?

An exemple:

Class Person(models.Model):
    full_name = models.CharField(max_length=200)
    email = models.EmailField()

Class Message(models.Model):
   
    person = models.ManyToManyField(Person)
    title = models.CharField(max_length=200)
    body = models.TextField()
    
I have already created a Person object and Message object to the database:
   
mess = Message.objects.get(title="sos")
print(mess.person.email) // the error occurs here.

--
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.

--
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.
Reply all
Reply to author
Forward
0 new messages