Re: Domain Names and Web Servers

2020-05-08 Thread David Merrick
Ok to rephrase the Question whats a typical set up for Django Web for say
Website
Web Servers and Domain Name Servers.

For example for Rails I could use Heroku fro the Hosting
https://www.heroku.com/
For the Domain Name Server I could use Domains4less
https://www.domains4less.co.nz/
but Domain4less can't use Dynamic IP address so the two are related sorry.

On Sat, May 9, 2020 at 10:14 AM Kasper Laudrup 
wrote:

> Hi David,
>
> On 08/05/2020 23.18, David Merrick wrote:
> > Hi, I am interested in what web servers can be used for Django Web Apps
> > and whether the Domain Name Servers are Static or Dynamic. Static Domain
> > Name Servers (DNS) the IP Address doesn't change and Dynamic (DNS) IP
> > Address does change.
> >
>
> That is really two completely unrelated questions.
>
> For deployment you can use quite a few different web servers, but it
> really depends on your requirements:
>
> https://docs.djangoproject.com/en/3.0/howto/deployment/
>
> Django doesn't know anything about domain servers, that's not really
> related at all.
>
> To be a bit pedantic, there really isn't any difference between a
> dynamic and a static DNS server. DNS just resolves host names to IP
> addresses (and more, but that's not relevant). Some DNS records just
> have a low TTL meaning that the information provided changes more often
> making them more "dynamic".
>
> How you decide to handle that also depends on your requirements and most
> likely how you decide to host your Django application.
>
> Hope that helps.
>
> Kind regards,
>
> Kaspr Laudrup
>
> --
> 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/2Tx8UU5K-n0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/c94d816f-b88b-feab-0a61-cd08718bc70f%40stacktrace.dk
> .
>


-- 
Dave Merrick

TutorInvercargill

http://tutorinvercargill.co.nz

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merrick...@gmail.com

Ph   03 216 2053

Cell 027 3089 169

-- 
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/CA%2B%3DMcKZm7hSGRE_Wa7%2BDhJM%3D9LBdixuXL6qmUWamaf-9OXTm2A%40mail.gmail.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread Motaz Hejaze
first , check your excel file , see what are the columns types ..
then , make a model in django models.py and choose model fields to be the
same type as each column in the excel file ..
in your views.py make a function that will read the excel file from the
file location on your machine ..
in this function use the code provided in Kasper tutorial link
https://www.geeksforgeeks.org/reading-excel-file-using-python/
while you are looping through each row in your excel file you can populate
the model you created in models.py ..
but if the excel file is too large , this will block your code , maybe
cause the database to be locked too ..
if you face this problem consider using threading or asyncio ..

On Sat, May 9, 2020 at 7:09 AM ratnadeep ray  wrote:

> Thanks Derek for this.
>
> On Friday, 8 May 2020 19:20:31 UTC+5:30, Derek wrote:
>>
>> If you can, use an existing app:
>>
>> https://github.com/wq/django-data-wizard
>>
>>
>> On Friday, 8 May 2020 14:57:43 UTC+2, Kasper Laudrup wrote:
>>>
>>> Hi Ratnadeep,
>>>
>>> On 08/05/2020 14.03, ratnadeep ray wrote:
>>> > Hi all,
>>> >
>>> > Can anyone let me know how to push the fetched data from an excel to
>>> any
>>> > DB using Django?
>>> >
>>>
>>> It's not very clear what you mean by "the fetched data". Have you
>>> fetched some data already? In which format?
>>>
>>> If you need to extract data from an excel sheet, this was the first
>>> guide I could find:
>>>
>>> https://www.geeksforgeeks.org/reading-excel-file-using-python/
>>>
>>> Also, "any DB" is extremely vague. Do you have a database already? Or do
>>> you just want to go for whatever database is the best suited for
>>> whatever you are trying to achieve?
>>>
>>> And what exactly do you want to use Django for? Django is a web
>>> framework and nothing in your question mentions anything about that...
>>>
>>> Kind regards,
>>>
>>> Kasper Laudrup
>>>
>>>
>>>
>>>
>>> --
> 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/4cca72a6-1b5d-4fa8-8c60-c3593cdaca90%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/CAHV4E-e5PRygQvW3Hqs_3yq3FCwPnEnL6x%3DPUH3QP-xzgORhug%40mail.gmail.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Thanks Derek for this. 

On Friday, 8 May 2020 19:20:31 UTC+5:30, Derek wrote:
>
> If you can, use an existing app:
>
> https://github.com/wq/django-data-wizard
>
>
> On Friday, 8 May 2020 14:57:43 UTC+2, Kasper Laudrup wrote:
>>
>> Hi Ratnadeep, 
>>
>> On 08/05/2020 14.03, ratnadeep ray wrote: 
>> > Hi all, 
>> > 
>> > Can anyone let me know how to push the fetched data from an excel to 
>> any 
>> > DB using Django? 
>> > 
>>
>> It's not very clear what you mean by "the fetched data". Have you 
>> fetched some data already? In which format? 
>>
>> If you need to extract data from an excel sheet, this was the first 
>> guide I could find: 
>>
>> https://www.geeksforgeeks.org/reading-excel-file-using-python/ 
>>
>> Also, "any DB" is extremely vague. Do you have a database already? Or do 
>> you just want to go for whatever database is the best suited for 
>> whatever you are trying to achieve? 
>>
>> And what exactly do you want to use Django for? Django is a web 
>> framework and nothing in your question mentions anything about that... 
>>
>> Kind regards, 
>>
>> Kasper Laudrup 
>>
>>
>>
>>
>>

-- 
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/4cca72a6-1b5d-4fa8-8c60-c3593cdaca90%40googlegroups.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Hi Kasper, 

I want to read the data from excel and the retrieved data should be pushed 
to a DB, in my case it's MySQL. 

I believe the steps mentioned in the link 
https://www.geeksforgeeks.org/reading-excel-file-using-python/ , should be 
written in the views.py file. Am I right? 

Please clarify these because I am pretty new to Django. 

Thanks. 

On Friday, 8 May 2020 18:27:43 UTC+5:30, Kasper Laudrup wrote:
>
> Hi Ratnadeep, 
>
> On 08/05/2020 14.03, ratnadeep ray wrote: 
> > Hi all, 
> > 
> > Can anyone let me know how to push the fetched data from an excel to any 
> > DB using Django? 
> > 
>
> It's not very clear what you mean by "the fetched data". Have you 
> fetched some data already? In which format? 
>
> If you need to extract data from an excel sheet, this was the first 
> guide I could find: 
>
> https://www.geeksforgeeks.org/reading-excel-file-using-python/ 
>
> Also, "any DB" is extremely vague. Do you have a database already? Or do 
> you just want to go for whatever database is the best suited for 
> whatever you are trying to achieve? 
>
> And what exactly do you want to use Django for? Django is a web 
> framework and nothing in your question mentions anything about that... 
>
> Kind regards, 
>
> Kasper Laudrup 
>
>
>
>
>

-- 
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/92c1e4f6-35a8-47f2-ab1a-79809fef8b05%40googlegroups.com.


Django and uwsgi and nginx is log error

2020-05-08 Thread Hella Nick
我的uwsig日志显示:
   
   
clock source: unix
detected number of CPU cores: 2
current working directory: /project/work/teacher
writing pidfile to /project/work/teacher/uwsgi.pid
detected binary path: /project/env/online/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to /project/work/teacher/
your processes number limit is 14502
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8042 fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
Python version: 3.7.1 (default, Apr 25 2020, 16:19:43)  [GCC 4.8.5 20150623 
(Red Hat 4.8.5-39)]
*** Python threads support is disabled. You can enable it with 
--enable-threads ***
Python main interpreter initialized at 0x11e7950
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 656136 bytes (640 KB) for 8 cores
*** Operational MODE: preforking ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x11e7950 pid: 
17018 (default app)
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 17018)
spawned uWSGI worker 1 (pid: 17022, cores: 1)
spawned uWSGI worker 2 (pid: 17023, cores: 1)
spawned uWSGI worker 3 (pid: 17024, cores: 1)
spawned uWSGI worker 4 (pid: 17025, cores: 1)
spawned uWSGI worker 5 (pid: 17026, cores: 1)
spawned uWSGI worker 6 (pid: 17027, cores: 1)
spawned uWSGI worker 7 (pid: 17028, cores: 1)
spawned uWSGI worker 8 (pid: 17029, cores: 1)

我想知道 your server socket listen backlog is limited to 100 connections 
这个错误怎么解决掉?

Could someone help me out?


-- 
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/747311a1-4442-4ab7-b5de-a8007df85d2a%40googlegroups.com.


Reg: django.urls.exceptions.NoReverseMatch patterns

2020-05-08 Thread Kishore Kumar Alajangi
Hi,

In templates.html file  if i am defining url pattern like

"{ % url "app_name:app_name_function_name" %}.

I am getting the following error:

"django.urls.exceptions.NoReverseMatch patterns"

in urls.py

app name is : app_name

in views.py file

function name : function_name

if i give hyphen instead of underscore in function name like

"{ % url "app_name:app_name-function-name" %}

working fine without error

what could be the reason? Could someone make me to understand ?

Note: used viewsets to route multiple urls in urls file.
-- 

Thank you,

Sincerely,
Kishore Kumar,

-- 
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/CAOKoL1E6ztp3sRT%3Dp5z1QO%3DRb9nu_gnM2TwfSa_nGHLk9qQ4fw%40mail.gmail.com.


How to handle non-uploaded dynamic images ?

2020-05-08 Thread Dorian LE NET
Let's say I have a django app where users can display images by choosing 
among infinite parameters through a form. These images do not exist before 
the user generate them as they are built accordingly to its selection of 
parameters. Such images are dynamically and internally generated. Then they 
are neither static nor uploaded by users.


How should I store such images ? As *static* images, as *media* images or 
as a customized category ?


As images are internally generated and not uploaded by users, it does not 
seem necessary to use the file storage systems and the /media/ location. 
But it does not seem clever to use the /static/ directory either, as many 
images will be added (and removed) - they are not static by definition.


I would also like to use a model that contains these images and other 
information about them. What model field class should I use to handle them 
? As the images are not uploaded by users models.ImageField does not seem 
appropriate.


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/17300edd-0638-448c-aba6-3fbd12a1198c%40googlegroups.com.


Re: Charts view function suggestions

2020-05-08 Thread Motaz Hejaze
this way you'll query all the 'mail_items' table for each country , which
is a time and resource consuming thing to do ..
i think you need to make a separate model that has 2 columns 'country' ,
'mail_items_count' , then you can make a signal when new item saved to
'mail_items'
the signal will update the 'country+mail_items_count' increase the
'mail_items_count' by one ...

inside the 'country+mail_items_count' model you'll make a function to sum
all counts in the 'mail_item_count' column

in your views make a view that query all countries with their ratio :

make a dictionary ,
loop throw each object in the query , take the country name as the key in
the dictionary , take the counter ( integer ) divided by the output of the
sum function to calculate the ratio of each country , append in dictionary
..
send the response with all countries and ratio dictionary ..

On Sat, May 9, 2020 at 3:46 AM hajar  wrote:

> hello! thank you so much for your advice , I want to try to use this view
> function below ,but  for example if you see my models.py I have the class
> mail_items that contains country_origine , I was thinking to do a pie
> chart contains in the labels the countries names and in the data I want
> to make a count to show "which country send items more than the other one"
> I am stack exactly in the data I am still thinking how to this , could you
> advice me please about the queryset
>
> def pie_chart(request):
> labels = []
> data = []
> q = mail_items.objects.all()
>
> for i in q :
> labels.append()
> data.append()
>
> return render(request, 'dash.html', {
> 'labels': labels,
> 'data': data,
> })
>
>
> Le vendredi 8 mai 2020 23:29:25 UTC+1, _M_A_Y_A_N_K_ a écrit :
>>
>> Hi Hajar,
>>
>> Though you have multiple model, the main thing is to create a queryset.
>> Once you have a queryset (which can be from one model or multiple
>> model).. you should be able to use that queryset for Pie-Charts or any
>> other charts.
>> Also try to use Django-Chart.js, which is much more easier i feel.
>>
>> Hope this helps.
>> Also let know if you face any issue. You can share the queryset for which
>> you need charts.. then probably we can help then.
>>
>> Thanks & Regards,
>> -
>> Mayank Tripathi
>> Mo. +1 615 962 2128
>> "Do what you can, with what you have, where you are -by Theodore
>> Roosevelt"
>> https://datascience.foundation/datascienceawards
>>
>>
>>
>> On Fri, May 8, 2020 at 5:20 PM hajar Benjat  wrote:
>>
>>> Hello everyone how are you doing ?
>>>
>>> I need your suggestions > I have to use a specific models , and I want
>>> to do a  pie_chart view function based on this models , " but I don't know
>>> what to do I saw some view functions examples but they always use one class
>>> but here my classes a bit hard and I am really stack and I need your help "
>>>
>>> this is the models I have to use ,
>>>
>>> from django.db import models
>>>
>>> # Create your models here.
>>> class Country(models.Model):
>>> Country = models.CharField(max_length=100)
>>>
>>> def __str__(self):
>>> return '{} '.format(self.Country)
>>>
>>> class Reason(models.Model):
>>> Reason_cd = models.IntegerField(blank=True)
>>> Reason_NM = models.CharField(max_length=100, blank=True)
>>> def __str__(self):
>>> return '{}'.format(self.Reason_NM)
>>>
>>> class Mesure(models.Model):
>>> Mesure_cd = models.IntegerField(blank=True)
>>> Mesure_NM = models.CharField(max_length=100,blank=True)
>>>
>>> def __str__(self):
>>> return '{}'.format(self.Mesure_NM)
>>>
>>> class Client(models.Model):
>>> last_name = models.CharField(max_length=250)
>>> first_name = models.CharField(max_length=250)
>>> Adresse = models.CharField(max_length=560)
>>> city = models.CharField(max_length=100)
>>> code_postal = models.IntegerField()
>>> phone number = models.IntegerField(blank=True,null=True)
>>> mail = models.CharField(max_length=100)
>>>
>>> def __str__(self):
>>> return '{}, {}'.format(self.last_name,self.first_name)
>>>
>>> class Delivery_Agent(models.Model):
>>> last_name = models.CharField(max_length=250)
>>> first_name = models.CharField(max_length=250)
>>>
>>> def __str__(self):
>>> return '{}, {}  '.format(self.last_name,self.first_name)
>>>
>>> class Office(models.Model):
>>> office_cd = models.CharField(max_length=10)
>>> office_NM = models.CharField(max_length=50)
>>>
>>> def __str__(self):
>>> return '{}, {}  '.format(self.office_cd,self.office_NM)
>>>
>>> class Mail_item_Event(models.Model):
>>> mail_item_fid = models.CharField(max_length=36)
>>> Event_cd = models.IntegerField(auto_created=True,unique=True) 
>>> #Event code
>>> office_Evt_cd 

Re: django celery and mqtt

2020-05-08 Thread Motaz Hejaze
please can you put your question in a more clearer way ?

On Sat, May 9, 2020 at 3:33 AM Riska Kurniyanto Abdullah <
alternative@gmail.com> wrote:

> Dear all django users,
>
> 1. I want to attach my mqtt client script in django apps, where should I
> put the script to launch them so the script can run as long task running.
> 2. In mqtt client i have task to save the message in database? how to make
> this task possible to handle with celery.
>
> Thanks in advance.
>
> This e-mail (including any attachments) is private and confidential and
> may contain privileged material. If you have received this e-mail in error,
> please notify the sender and delete it (including any
> attachments) immediately. You must not copy, distribute, disclose or use
> any of the information in it or any attachments.
>
> --
> 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/CAG7yD2J4KPV9SUO5-p_UwsyaGDb39DnsA56g8D1nXiNzscpc4g%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/CAHV4E-fOtuHvHsu3ergWB2UijR5LPMHgWVqKLF94qCQVYvzuSg%40mail.gmail.com.


Re: Charts view function suggestions

2020-05-08 Thread hajar
hello! thank you so much for your advice , I want to try to use this view 
function below ,but  for example if you see my models.py I have the class 
mail_items that contains country_origine , I was thinking to do a pie chart 
contains in the labels the countries names and in the data I want to make a 
count to show "which country send items more than the other one" I am stack 
exactly in the data I am still thinking how to this , could you advice me 
please about the queryset 

def pie_chart(request):
labels = []
data = []
q = mail_items.objects.all() 

for i in q :
labels.append()
data.append()

return render(request, 'dash.html', {
'labels': labels,
'data': data,
})


Le vendredi 8 mai 2020 23:29:25 UTC+1, _M_A_Y_A_N_K_ a écrit :
>
> Hi Hajar,
>
> Though you have multiple model, the main thing is to create a queryset.
> Once you have a queryset (which can be from one model or multiple model).. 
> you should be able to use that queryset for Pie-Charts or any other charts.
> Also try to use Django-Chart.js, which is much more easier i feel.
>
> Hope this helps.
> Also let know if you face any issue. You can share the queryset for which 
> you need charts.. then probably we can help then.
>
> Thanks & Regards, 
> -
> Mayank Tripathi
> Mo. +1 615 962 2128
> "Do what you can, with what you have, where you are -by Theodore 
> Roosevelt"
> https://datascience.foundation/datascienceawards
>
>
>
> On Fri, May 8, 2020 at 5:20 PM hajar Benjat  > wrote:
>
>> Hello everyone how are you doing ? 
>>
>> I need your suggestions > I have to use a specific models , and I want to 
>> do a  pie_chart view function based on this models , " but I don't know 
>> what to do I saw some view functions examples but they always use one class 
>> but here my classes a bit hard and I am really stack and I need your help "
>>
>> this is the models I have to use , 
>>
>> from django.db import models
>>
>> # Create your models here.
>> class Country(models.Model):
>> Country = models.CharField(max_length=100)
>>
>> def __str__(self):
>> return '{} '.format(self.Country)
>>
>> class Reason(models.Model):
>> Reason_cd = models.IntegerField(blank=True)
>> Reason_NM = models.CharField(max_length=100, blank=True)
>> def __str__(self):
>> return '{}'.format(self.Reason_NM)
>>
>> class Mesure(models.Model):
>> Mesure_cd = models.IntegerField(blank=True)
>> Mesure_NM = models.CharField(max_length=100,blank=True)
>>
>> def __str__(self):
>> return '{}'.format(self.Mesure_NM)
>>
>> class Client(models.Model):
>> last_name = models.CharField(max_length=250)
>> first_name = models.CharField(max_length=250)
>> Adresse = models.CharField(max_length=560)
>> city = models.CharField(max_length=100)
>> code_postal = models.IntegerField()
>> phone number = models.IntegerField(blank=True,null=True)
>> mail = models.CharField(max_length=100)
>>
>> def __str__(self):
>> return '{}, {}'.format(self.last_name,self.first_name)
>>
>> class Delivery_Agent(models.Model):
>> last_name = models.CharField(max_length=250)
>> first_name = models.CharField(max_length=250)
>>
>> def __str__(self):
>> return '{}, {}  '.format(self.last_name,self.first_name)
>>
>> class Office(models.Model):
>> office_cd = models.CharField(max_length=10)
>> office_NM = models.CharField(max_length=50)
>>
>> def __str__(self):
>> return '{}, {}  '.format(self.office_cd,self.office_NM)
>>
>> class Mail_item_Event(models.Model):
>> mail_item_fid = models.CharField(max_length=36)
>> Event_cd = models.IntegerField(auto_created=True,unique=True) #Event 
>> code
>> office_Evt_cd = models.ForeignKey(Office, on_delete=models.CASCADE, 
>> related_name='office_Evt')
>> Date_Evt = models.DateTimeField()
>> Date_Capture = models.DateTimeField()
>> Next_office = models.ForeignKey(Office, on_delete=models.CASCADE, 
>> related_name='Next_office')
>> def __str__(self):
>> return '{}'.format(self.Event_cd)
>>
>> class Delivery_info(models.Model):
>> mail_item_fid = models.OneToOneField(Mail_item_Event 
>> ,on_delete=models.CASCADE)
>> Event_cd = 
>> models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE,related_name="delivery_infor_event_cd")
>> office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, 
>> related_name='office_Evt2')
>> Date_Evt = models.DateTimeField()
>> Agent_delivery_cd = 
>> models.ForeignKey(Delivery_Agent,on_delete=models.CASCADE,related_name='agentDelivery')
>> Signatory_NM = models.OneToOneField(Delivery_Agent, 
>> on_delete=models.CASCADE, 

django celery and mqtt

2020-05-08 Thread Riska Kurniyanto Abdullah
Dear all django users,

1. I want to attach my mqtt client script in django apps, where should I
put the script to launch them so the script can run as long task running.
2. In mqtt client i have task to save the message in database? how to make
this task possible to handle with celery.

Thanks in advance.

This e-mail (including any attachments) is private and confidential and may
contain privileged material. If you have received this e-mail in error,
please notify the sender and delete it (including any
attachments) immediately. You must not copy, distribute, disclose or use
any of the information in it or any attachments.

-- 
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/CAG7yD2J4KPV9SUO5-p_UwsyaGDb39DnsA56g8D1nXiNzscpc4g%40mail.gmail.com.


Re: ModuleNotFoundError:

2020-05-08 Thread Jorge Gimeno
On Fri, May 8, 2020 at 5:12 PM nor sairi  wrote:

> AttributeError: module 'django.contrib' has no attribute 'gisproperty'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py",
> line 225, in wrapper
> fn(*args, **kwargs)
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/core/management/commands/runserver.py",
> line 109, in inner_run
> autoreload.raise_last_exception()
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py",
> line 248, in raise_last_exception
> raise _exception[1]
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/core/management/__init__.py",
> line 337, in execute
> autoreload.check_errors(django.setup)()
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py",
> line 225, in wrapper
> fn(*args, **kwargs)
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/__init__.py",
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/apps/registry.py",
> line 89, in populate
> app_config = AppConfig.create(entry)
>   File
> "/home/sairi/anaconda3/lib/python3.7/site-packages/django/apps/config.py",
> line 123, in create
> import_module(entry)
>   File "/home/sairi/anaconda3/lib/python3.7/importlib/__init__.py", line
> 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 965, in
> _find_and_load_unlocked
> ModuleNotFoundError: No module named 'django.contrib.gisproperty'
>
> Hello guys , what this meaning ..
>
> --
> 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/3e8a7709-985a-4fdf-8209-f9d3fe4c9809%40googlegroups.com
> 
> .
>

It means there is nothing named gisproperty at django.contrib.  If you want
an intro to GIS in Django, see here:
https://docs.djangoproject.com/en/3.0/ref/contrib/gis/tutorial/

-Jorge

-- 
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/CANfN%3DK-gX20GHGtrd6gqdu_E4tGK2%3Dt_fncWihfuDX0tvMoRhw%40mail.gmail.com.


Re: Tutorial Part 1

2020-05-08 Thread Luqman Jr
Hello
Did you create urls.py under polls app?
You should have urls.py under polls app which will list all urls fall under 
this app.
Then share with us polls/urls.py and polls/views.py so that we can help more on 
this.
On 9 May 2020, 03:11 +0300, Randy Zeitvogel , wrote:
> I just started working with Django in the last couple of days.
> First environment is Ubuntu 19.10, python 3.7.5 and Django 3.1.  Second 
> environment is Fedora 31, python 3.7.5, and Django 3.0.6.
> In both cases after I create the polls app and try it out, I get this:
>
> Page not found (404)
> Request Method:
> GET
> Request URL:
> http://localhost:8000/polls/
> Using the URLconf defined in mysite.urls, Django tried these URL patterns, in 
> this order:
>
> 1. admin/
>
> The current path, polls/, didn't match any of these.
> You're seeing this error because you have DEBUG = True in your Django 
> settings file. Change that to False, and Django will display a standard 404 
> page.
>
> The feedback from the development web server (python manage.py runserver) is:
>
> jango version 3.0.6, using settings 'mysite.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
> Not Found: /polls/
> [08/May/2020 17:28:16] "GET /polls/ HTTP/1.1" 404 1957
>
> My mysite/urls.py looks like this:
>
> from django.contrib import admin
> from django.urls import include, path
>
> urlpatterns = [
>path('polls/', include('polls.urls')),
>path('admin/', admin.site.urls),
> ]
>
> 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/b7b3b071-7255-4fc1-84c8-db7d1766e5dd%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/3baac878-0c7c-4bec-8788-5d04b21b%40Spark.


Re: Help Desk Ticketing system

2020-05-08 Thread Motaz Hejaze
What do you need help with?

On Sat, 9 May 2020, 2:11 am Duah Sylvester, 
wrote:

> Hello Fellow Django developers,
> I am starting a new project on my own, below is the information, I would
> like you guys to help me tackle this, and get it done.
> Create Helpdesk ticketing system in Django
> The goal is to create help desk ticketing system System should be built in
> Python Django You should have an Admin panel where we can add the employees
> or persons will be working on the tickets Also in the admin panel we should
> be able to list all the tickets and see their status and progress The
> tickets in the helpless system should be created by an email A particular
> email should be registered with the help this system when a mail is sent to
> this email it automatically triggers the system and creates the ticket For
> email you can mostly use the exchangelib library When a ticket is created
> it should automatically find the employees who can work on the ticket and
> based on the number of tickets each employee has to decide the ticket to
> the one having least number of tickets An employee should be able to move
> the ticket from open state to in progress or will not do a blocked or
> resolved Employee should be also able to add comments to a ticket please
> comments will be saved in the admin portal and for the one who created
> ticket it would be reply to the same email that he sent
> 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/CAFQyJBg0%3DeiEqZ%2BsZGevQ4S%2BxLCq7HD1Gc-gO0ZZNU19GkpSTw%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/CAHV4E-cpnwUJ1G9WO_uJH3aFEGkD_9_g%3DnzEZe-S62Jw-kDBoQ%40mail.gmail.com.


Re: Deploying Django Project on heroku

2020-05-08 Thread Sunday Iyanu Ajayi
Hi Motaz,
Thank you so much.
Is today cool?
What time (in GMT+1) will be cool for you?

*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *



On Sun, May 3, 2020 at 11:05 PM Motaz Hejaze  wrote:

> Let us have a zoom meeting to fix it
>
> On Sun, 3 May 2020, 11:45 pm Sunday Iyanu Ajayi, 
> wrote:
>
>> I have but it keeps telling  that it is misconfigured
>> *AJAYI Sunday *
>> (+234) 806 771 5394
>> *sunnexaj...@gmail.com *
>>
>>
>>
>> On Sat, Apr 25, 2020 at 3:17 PM sagar ninave 
>> wrote:
>>
>>> Do you installed whitenoise package
>>> If not then run this command
>>> Pip insatll whitenoise
>>>
>>> On Sat, 25 Apr 2020 at 7:43 PM, Sunday Iyanu Ajayi <
>>> sunnexaj...@gmail.com> wrote:
>>>
 I have spent over 2weeks on deploying a django project to heroku but I
 keep getting error messages such as :

 My WhiteNoise is not configured  and I have followed all the tutorials
 recommended  and yet same thing.

 Please who has a guide I can follow that is very updated.
 Thank you.
 *AJAYI Sunday *
 (+234) 806 771 5394
 *sunnexaj...@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/CAKYSAw2PsC452Sk5_1e_sMy3HuZ3zWrFh5p6CVn6K-KsVF1Rqg%40mail.gmail.com
 
 .

>>> --
>>>
>>> 
>>> sagar ninave
>>> about.me/sagarninave
>>> 
>>>
>>> --
>>> 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/CAA6pdZ9fsGj3y%3DNVVQ_oCX9hY5DbLHtPVLM-nPhWYxpE4Qsi7w%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/CAKYSAw2hYQGRYYZRB%3D7ZNJJJ-1OY2ykShsPam9xiRc-8M4BQJg%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/CAHV4E-dLr30ycFTo9tccTmKW74rvDA%3D0Oks8NqAVez0Tiyzocg%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/CAKYSAw2PWEmow%3DbA3wAZ6MnTKkRdMAbq7SN%3D6L4gAcSS0gw1eA%40mail.gmail.com.


Tutorial Part 1

2020-05-08 Thread Randy Zeitvogel
I just started working with Django in the last couple of days. 
First environment is Ubuntu 19.10, python 3.7.5 and Django 3.1.  Second 
environment is Fedora 31, python 3.7.5, and Django 3.0.6.
In both cases after I create the polls app and try it out, I get this:

Page not found (404) 
Request Method: GET 
Request URL: http://localhost:8000/polls/ 

Using the URLconf defined in mysite.urls, Django tried these URL patterns, 
in this order: 

   1. admin/ 

The current path, polls/, didn't match any of these. 

You're seeing this error because you have DEBUG = True in your Django 
settings file. Change that to False, and Django will display a standard 404 
page. 


The feedback from the development web server (python manage.py runserver) 
is:


jango version 3.0.6, using settings 'mysite.settings' 
Starting development server at http://127.0.0.1:8000/ 
Quit the server with CONTROL-C. 
Not Found: /polls/ 
[08/May/2020 17:28:16] "GET /polls/ HTTP/1.1" 404 1957 

My mysite/urls.py looks like this:


from django.contrib import admin
from django.urls import include, path

urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]


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/b7b3b071-7255-4fc1-84c8-db7d1766e5dd%40googlegroups.com.


ModuleNotFoundError:

2020-05-08 Thread nor sairi
AttributeError: module 'django.contrib' has no attribute 'gisproperty'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", 
line 225, in wrapper
fn(*args, **kwargs)
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/core/management/commands/runserver.py",
 
line 109, in inner_run
autoreload.raise_last_exception()
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", 
line 248, in raise_last_exception
raise _exception[1]
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/core/management/__init__.py",
 
line 337, in execute
autoreload.check_errors(django.setup)()
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", 
line 225, in wrapper
fn(*args, **kwargs)
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/__init__.py", 
line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/apps/registry.py", 
line 89, in populate
app_config = AppConfig.create(entry)
  File 
"/home/sairi/anaconda3/lib/python3.7/site-packages/django/apps/config.py", 
line 123, in create
import_module(entry)
  File "/home/sairi/anaconda3/lib/python3.7/importlib/__init__.py", line 
127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.contrib.gisproperty'

Hello guys , what this meaning ..

-- 
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/3e8a7709-985a-4fdf-8209-f9d3fe4c9809%40googlegroups.com.


Help Desk Ticketing system

2020-05-08 Thread Duah Sylvester
Hello Fellow Django developers,
I am starting a new project on my own, below is the information, I would
like you guys to help me tackle this, and get it done.
Create Helpdesk ticketing system in Django
The goal is to create help desk ticketing system System should be built in
Python Django You should have an Admin panel where we can add the employees
or persons will be working on the tickets Also in the admin panel we should
be able to list all the tickets and see their status and progress The
tickets in the helpless system should be created by an email A particular
email should be registered with the help this system when a mail is sent to
this email it automatically triggers the system and creates the ticket For
email you can mostly use the exchangelib library When a ticket is created
it should automatically find the employees who can work on the ticket and
based on the number of tickets each employee has to decide the ticket to
the one having least number of tickets An employee should be able to move
the ticket from open state to in progress or will not do a blocked or
resolved Employee should be also able to add comments to a ticket please
comments will be saved in the admin portal and for the one who created
ticket it would be reply to the same email that he sent
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/CAFQyJBg0%3DeiEqZ%2BsZGevQ4S%2BxLCq7HD1Gc-gO0ZZNU19GkpSTw%40mail.gmail.com.


Re: Charts view function suggestions

2020-05-08 Thread _M_A_Y_A_N_K_
Hi Hajar,

Though you have multiple model, the main thing is to create a queryset.
Once you have a queryset (which can be from one model or multiple model)..
you should be able to use that queryset for Pie-Charts or any other charts.
Also try to use Django-Chart.js, which is much more easier i feel.

Hope this helps.
Also let know if you face any issue. You can share the queryset for which
you need charts.. then probably we can help then.

Thanks & Regards,
-
Mayank Tripathi
Mo. +1 615 962 2128
"Do what you can, with what you have, where you are -by Theodore Roosevelt"
https://datascience.foundation/datascienceawards



On Fri, May 8, 2020 at 5:20 PM hajar Benjat  wrote:

> Hello everyone how are you doing ?
>
> I need your suggestions > I have to use a specific models , and I want to
> do a  pie_chart view function based on this models , " but I don't know
> what to do I saw some view functions examples but they always use one class
> but here my classes a bit hard and I am really stack and I need your help "
>
> this is the models I have to use ,
>
> from django.db import models
>
> # Create your models here.
> class Country(models.Model):
> Country = models.CharField(max_length=100)
>
> def __str__(self):
> return '{} '.format(self.Country)
>
> class Reason(models.Model):
> Reason_cd = models.IntegerField(blank=True)
> Reason_NM = models.CharField(max_length=100, blank=True)
> def __str__(self):
> return '{}'.format(self.Reason_NM)
>
> class Mesure(models.Model):
> Mesure_cd = models.IntegerField(blank=True)
> Mesure_NM = models.CharField(max_length=100,blank=True)
>
> def __str__(self):
> return '{}'.format(self.Mesure_NM)
>
> class Client(models.Model):
> last_name = models.CharField(max_length=250)
> first_name = models.CharField(max_length=250)
> Adresse = models.CharField(max_length=560)
> city = models.CharField(max_length=100)
> code_postal = models.IntegerField()
> phone number = models.IntegerField(blank=True,null=True)
> mail = models.CharField(max_length=100)
>
> def __str__(self):
> return '{}, {}'.format(self.last_name,self.first_name)
>
> class Delivery_Agent(models.Model):
> last_name = models.CharField(max_length=250)
> first_name = models.CharField(max_length=250)
>
> def __str__(self):
> return '{}, {}  '.format(self.last_name,self.first_name)
>
> class Office(models.Model):
> office_cd = models.CharField(max_length=10)
> office_NM = models.CharField(max_length=50)
>
> def __str__(self):
> return '{}, {}  '.format(self.office_cd,self.office_NM)
>
> class Mail_item_Event(models.Model):
> mail_item_fid = models.CharField(max_length=36)
> Event_cd = models.IntegerField(auto_created=True,unique=True) #Event 
> code
> office_Evt_cd = models.ForeignKey(Office, on_delete=models.CASCADE, 
> related_name='office_Evt')
> Date_Evt = models.DateTimeField()
> Date_Capture = models.DateTimeField()
> Next_office = models.ForeignKey(Office, on_delete=models.CASCADE, 
> related_name='Next_office')
> def __str__(self):
> return '{}'.format(self.Event_cd)
>
> class Delivery_info(models.Model):
> mail_item_fid = models.OneToOneField(Mail_item_Event 
> ,on_delete=models.CASCADE)
> Event_cd = 
> models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE,related_name="delivery_infor_event_cd")
> office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, 
> related_name='office_Evt2')
> Date_Evt = models.DateTimeField()
> Agent_delivery_cd = 
> models.ForeignKey(Delivery_Agent,on_delete=models.CASCADE,related_name='agentDelivery')
> Signatory_NM = models.OneToOneField(Delivery_Agent, 
> on_delete=models.CASCADE, related_name='signatory')
> Raison_Non_Delivery_cd = 
> models.ForeignKey(Reason,on_delete=models.CASCADE, 
> related_name='raisonNonDelivery', blank=True)
> def __str__(self):
> return '{}, {} '.format(self.Signatory_NM,self.mail_item_fid)
>
> class mail_items(models.Model):
> mail_item_fid = 
> models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE)
> Event_cd = 
> models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE,related_name="mail_item_event_cd")
> office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, 
> related_name='office_Ev')
> Date_Evt = models.DateTimeField()
> Country_origine = models.ForeignKey(Country, on_delete=models.CASCADE 
> ,related_name='paysOrigine')
> Country_destination = 
> models.ForeignKey(Country,on_delete=models.CASCADE,related_name='paysDestination')
> Expediteur = 
> 

Charts view function suggestions

2020-05-08 Thread hajar Benjat
Hello everyone how are you doing ? 

I need your suggestions > I have to use a specific models , and I want to 
do a  pie_chart view function based on this models , " but I don't know 
what to do I saw some view functions examples but they always use one class 
but here my classes a bit hard and I am really stack and I need your help "

this is the models I have to use , 

from django.db import models

# Create your models here.
class Country(models.Model):
Country = models.CharField(max_length=100)

def __str__(self):
return '{} '.format(self.Country)

class Reason(models.Model):
Reason_cd = models.IntegerField(blank=True)
Reason_NM = models.CharField(max_length=100, blank=True)
def __str__(self):
return '{}'.format(self.Reason_NM)

class Mesure(models.Model):
Mesure_cd = models.IntegerField(blank=True)
Mesure_NM = models.CharField(max_length=100,blank=True)

def __str__(self):
return '{}'.format(self.Mesure_NM)

class Client(models.Model):
last_name = models.CharField(max_length=250)
first_name = models.CharField(max_length=250)
Adresse = models.CharField(max_length=560)
city = models.CharField(max_length=100)
code_postal = models.IntegerField()
phone number = models.IntegerField(blank=True,null=True)
mail = models.CharField(max_length=100)

def __str__(self):
return '{}, {}'.format(self.last_name,self.first_name)

class Delivery_Agent(models.Model):
last_name = models.CharField(max_length=250)
first_name = models.CharField(max_length=250)

def __str__(self):
return '{}, {}  '.format(self.last_name,self.first_name)

class Office(models.Model):
office_cd = models.CharField(max_length=10)
office_NM = models.CharField(max_length=50)

def __str__(self):
return '{}, {}  '.format(self.office_cd,self.office_NM)

class Mail_item_Event(models.Model):
mail_item_fid = models.CharField(max_length=36)
Event_cd = models.IntegerField(auto_created=True,unique=True) #Event 
code
office_Evt_cd = models.ForeignKey(Office, on_delete=models.CASCADE, 
related_name='office_Evt')
Date_Evt = models.DateTimeField()
Date_Capture = models.DateTimeField()
Next_office = models.ForeignKey(Office, on_delete=models.CASCADE, 
related_name='Next_office')
def __str__(self):
return '{}'.format(self.Event_cd)

class Delivery_info(models.Model):
mail_item_fid = models.OneToOneField(Mail_item_Event 
,on_delete=models.CASCADE)
Event_cd = 
models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE,related_name="delivery_infor_event_cd")
office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, 
related_name='office_Evt2')
Date_Evt = models.DateTimeField()
Agent_delivery_cd = 
models.ForeignKey(Delivery_Agent,on_delete=models.CASCADE,related_name='agentDelivery')
Signatory_NM = models.OneToOneField(Delivery_Agent, 
on_delete=models.CASCADE, related_name='signatory')
Raison_Non_Delivery_cd = 
models.ForeignKey(Reason,on_delete=models.CASCADE, 
related_name='raisonNonDelivery', blank=True)
def __str__(self):
return '{}, {} '.format(self.Signatory_NM,self.mail_item_fid)

class mail_items(models.Model):
mail_item_fid = 
models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE)
Event_cd = 
models.OneToOneField(Mail_item_Event,on_delete=models.CASCADE,related_name="mail_item_event_cd")
office_Evt_cd = models.ForeignKey(Office,on_delete=models.CASCADE, 
related_name='office_Ev')
Date_Evt = models.DateTimeField()
Country_origine = models.ForeignKey(Country, on_delete=models.CASCADE 
,related_name='paysOrigine')
Country_destination = 
models.ForeignKey(Country,on_delete=models.CASCADE,related_name='paysDestination')
Expediteur = 
models.ForeignKey(Client,on_delete=models.CASCADE,related_name='expedi')
Destinateur = 
models.ForeignKey(Client,on_delete=models.CASCADE,related_name='destin')



-- 
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/a88e8341-f6d9-4523-ad87-5a7e17ebb040%40googlegroups.com.


Re: Domain Names and Web Servers

2020-05-08 Thread Kasper Laudrup

Hi David,

On 08/05/2020 23.18, David Merrick wrote:
Hi, I am interested in what web servers can be used for Django Web Apps 
and whether the Domain Name Servers are Static or Dynamic. Static Domain 
Name Servers (DNS) the IP Address doesn't change and Dynamic (DNS) IP 
Address does change.




That is really two completely unrelated questions.

For deployment you can use quite a few different web servers, but it 
really depends on your requirements:


https://docs.djangoproject.com/en/3.0/howto/deployment/

Django doesn't know anything about domain servers, that's not really 
related at all.


To be a bit pedantic, there really isn't any difference between a 
dynamic and a static DNS server. DNS just resolves host names to IP 
addresses (and more, but that's not relevant). Some DNS records just 
have a low TTL meaning that the information provided changes more often 
making them more "dynamic".


How you decide to handle that also depends on your requirements and most 
likely how you decide to host your Django application.


Hope that helps.

Kind regards,

Kaspr Laudrup

--
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/c94d816f-b88b-feab-0a61-cd08718bc70f%40stacktrace.dk.


Domain Names and Web Servers

2020-05-08 Thread David Merrick
Hi, I am interested in what web servers can be used for Django Web Apps and 
whether the Domain Name Servers are Static or Dynamic. Static Domain Name 
Servers (DNS) the IP Address doesn't change and Dynamic (DNS) IP Address 
does change.

-- 
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/0453cae2-7f58-4459-b03f-aa84969bd422%40googlegroups.com.


Re: I am building an open source School Management System

2020-05-08 Thread Kasper Laudrup

An may Heiðrún provide a constant flow of mead

On 08/05/2020 22.45, Sherif Adigun wrote:

May Allah make it easy.
Jazaakumullahu khayran

On Fri, May 8, 2020, 8:24 PM Motaz Hejaze > wrote:


I will contribute too insha Allah

On Fri, 8 May 2020, 5:54 pm Hedrick Godson's,
mailto:hedrickgod...@gmail.com>> wrote:

Successful cloned it. Looking forward to build this with you guys

On Fri, 8 May 2020, 18:28 Duah Sylvester
mailto:duahsylveste...@gmail.com>>
wrote:

Thank you very much! I will get it done

On Fri, May 8, 2020, 15:04 Sherif Adigun
mailto:adigunshe...@gmail.com>> wrote:

Thank you. Let's build on this and improve it.

On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji
mailto:luqmans...@gmail.com>> wrote:

Hi,

I've just forked the repository on your github account.

On Wed, May 6, 2020 at 4:21 PM Sherif Adigun
mailto:adigunshe...@gmail.com>> wrote:

Thanks. Checked. Good job. I think I've got more
features than you.

Latest commits now have authentications

On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1,
Sherif Adigun wrote:

I am currently building an open source
school Management System on django and it's
currently available on GitHub.


https://github.com/adigunsherif/Django-School-Management-System

I need contributors and collaboration.

Feel free to fork me on GitHub, send a
message and let's build a solution

-- 
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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe.
To unsubscribe from this group and all its topics,
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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%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/CAFQyJBgHpQKsVuvXfhLUZL0eoCt%2B%2BdSorMVuvas1Q5i%2BRgZmSg%40mail.gmail.com


Re: I am building an open source School Management System

2020-05-08 Thread Sherif Adigun
May Allah make it easy.
Jazaakumullahu khayran

On Fri, May 8, 2020, 8:24 PM Motaz Hejaze  wrote:

> I will contribute too insha Allah
>
> On Fri, 8 May 2020, 5:54 pm Hedrick Godson's, 
> wrote:
>
>> Successful cloned it. Looking forward to build this with you guys
>>
>> On Fri, 8 May 2020, 18:28 Duah Sylvester 
>> wrote:
>>
>>> Thank you very much! I will get it done
>>>
>>> On Fri, May 8, 2020, 15:04 Sherif Adigun  wrote:
>>>
 Thank you. Let's build on this and improve it.

 On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji 
 wrote:

> Hi,
>
> I've just forked the repository on your github account.
>
> On Wed, May 6, 2020 at 4:21 PM Sherif Adigun 
> wrote:
>
>> Thanks. Checked. Good job. I think I've got more features than you.
>>
>> Latest commits now have authentications
>>
>> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
>>>
>>> I am currently building an open source school Management System on
>>> django and it's currently available on GitHub.
>>>
>>> https://github.com/adigunsherif/Django-School-Management-System
>>>
>>> I need contributors and collaboration.
>>>
>>> Feel free to fork me on GitHub, send a message and let's build a
>>> solution
>>>
>>> --
>> 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%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/CAFQyJBgHpQKsVuvXfhLUZL0eoCt%2B%2BdSorMVuvas1Q5i%2BRgZmSg%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/CAJAxQD%3D5gm_Dq7dKp5ubq6L3hDTJYLWXJEKT7C1KQLqQdgWVwg%40mail.gmail.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/JGKrFx5sFuM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAHV4E-cbT%2BASHy%3DU5vbqPdUnEonLL5FnKh%3DHXrggRz387detQA%40mail.gmail.com
> 

Re: Getting a error

2020-05-08 Thread Kasper Laudrup

Hi

I'm the biggest so let that be your guide

On 08/05/2020 13.49, Ravi Prakash wrote:

Hi

I'm fully bigger so we can not install the pip and Django.
  anyone can guide how we can install.



--
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/db6ff001-6889-718d-0a26-52ef5db63d8b%40stacktrace.dk.


Re: I am building an open source School Management System

2020-05-08 Thread Motaz Hejaze
I will contribute too insha Allah

On Fri, 8 May 2020, 5:54 pm Hedrick Godson's, 
wrote:

> Successful cloned it. Looking forward to build this with you guys
>
> On Fri, 8 May 2020, 18:28 Duah Sylvester 
> wrote:
>
>> Thank you very much! I will get it done
>>
>> On Fri, May 8, 2020, 15:04 Sherif Adigun  wrote:
>>
>>> Thank you. Let's build on this and improve it.
>>>
>>> On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji 
>>> wrote:
>>>
 Hi,

 I've just forked the repository on your github account.

 On Wed, May 6, 2020 at 4:21 PM Sherif Adigun 
 wrote:

> Thanks. Checked. Good job. I think I've got more features than you.
>
> Latest commits now have authentications
>
> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
>>
>> I am currently building an open source school Management System on
>> django and it's currently available on GitHub.
>>
>> https://github.com/adigunsherif/Django-School-Management-System
>>
>> I need contributors and collaboration.
>>
>> Feel free to fork me on GitHub, send a message and let's build a
>> solution
>>
>> --
> 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe.
 To unsubscribe from this group and all its topics, 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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%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/CAFQyJBgHpQKsVuvXfhLUZL0eoCt%2B%2BdSorMVuvas1Q5i%2BRgZmSg%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/CAJAxQD%3D5gm_Dq7dKp5ubq6L3hDTJYLWXJEKT7C1KQLqQdgWVwg%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/CAHV4E-cbT%2BASHy%3DU5vbqPdUnEonLL5FnKh%3DHXrggRz387detQA%40mail.gmail.com.


Re: I am facing this issue

2020-05-08 Thread sahil khan
Plz show our video on youtube and got your sollution on our youtube
community errormania.
Like,comment and subscribe

https://youtu.be/QDk3rI_H3ks

Ty broo

On Fri, 8 May 2020, 5:58 pm Shubhanshu Arya, 
wrote:

> May be your URL pattern is incorrect.
>
> On Friday, May 8, 2020 at 4:10:47 PM UTC+5:30, Gaurav Shrivastava wrote:
>>
>> RelatedObjectDoesNotExist at /account/edit/
>>
>> User has no profile.
>>
>> Request Method: GET
>> Request URL: http://localhost:8000/account/edit/
>> Django Version: 2.0.5
>> Exception Type: RelatedObjectDoesNotExist
>> Exception Value:
>>
>> User has no profile.
>>
>> Exception Location: 
>> D:\python\projects\env\bookmarks\lib\site-packages\django\db\models\fields\related_descriptors.py
>> in __get__, line 386
>> Python Executable: D:\python\projects\env\bookmarks\Scripts\python.exe
>> Python Version: 3.8.1
>> Python Path:
>>
>> ['D:\\python\\projects\\env\\social_site',
>>  'D:\\python\\projects\\env\\bookmarks\\Scripts\\python38.zip',
>>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\DLLs',
>>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\lib',
>>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32',
>>  'D:\\python\\projects\\env\\bookmarks',
>>  'D:\\python\\projects\\env\\bookmarks\\lib\\site-packages']
>>
>> Server time: Fri, 8 May 2020 05:19:23 +
>>
> --
> 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/79c8a26c-e766-4983-9da1-8210161154b6%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/CAM8veW8PujtuhTjgNSRoindiZ4o3L%2BBF5m-jeCCY74nLiqdXEA%40mail.gmail.com.


Watch "How to use domain email with gmail account - connect send and receive emails in few steps" on YouTube

2020-05-08 Thread Anonymous Patel
https://youtu.be/-_MYP6m37SA

Connect your company domain email with a gmail.

-- 
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/CAF_9Ciur2i1Ktw8Wmx9RhU-4g1E%3DLc1O5_zwDrK_1TDMZ0172A%40mail.gmail.com.


Re: I am building an open source School Management System

2020-05-08 Thread Hedrick Godson's
Successful cloned it. Looking forward to build this with you guys

On Fri, 8 May 2020, 18:28 Duah Sylvester  wrote:

> Thank you very much! I will get it done
>
> On Fri, May 8, 2020, 15:04 Sherif Adigun  wrote:
>
>> Thank you. Let's build on this and improve it.
>>
>> On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji 
>> wrote:
>>
>>> Hi,
>>>
>>> I've just forked the repository on your github account.
>>>
>>> On Wed, May 6, 2020 at 4:21 PM Sherif Adigun 
>>> wrote:
>>>
 Thanks. Checked. Good job. I think I've got more features than you.

 Latest commits now have authentications

 On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
>
> I am currently building an open source school Management System on
> django and it's currently available on GitHub.
>
> https://github.com/adigunsherif/Django-School-Management-System
>
> I need contributors and collaboration.
>
> Feel free to fork me on GitHub, send a message and let's build a
> solution
>
> --
 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%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/CAFQyJBgHpQKsVuvXfhLUZL0eoCt%2B%2BdSorMVuvas1Q5i%2BRgZmSg%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/CAJAxQD%3D5gm_Dq7dKp5ubq6L3hDTJYLWXJEKT7C1KQLqQdgWVwg%40mail.gmail.com.


Re: I am building an open source School Management System

2020-05-08 Thread Duah Sylvester
Thank you very much! I will get it done

On Fri, May 8, 2020, 15:04 Sherif Adigun  wrote:

> Thank you. Let's build on this and improve it.
>
> On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji 
> wrote:
>
>> Hi,
>>
>> I've just forked the repository on your github account.
>>
>> On Wed, May 6, 2020 at 4:21 PM Sherif Adigun 
>> wrote:
>>
>>> Thanks. Checked. Good job. I think I've got more features than you.
>>>
>>> Latest commits now have authentications
>>>
>>> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:

 I am currently building an open source school Management System on
 django and it's currently available on GitHub.

 https://github.com/adigunsherif/Django-School-Management-System

 I need contributors and collaboration.

 Feel free to fork me on GitHub, send a message and let's build a
 solution

 --
>>> 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%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/CAFQyJBgHpQKsVuvXfhLUZL0eoCt%2B%2BdSorMVuvas1Q5i%2BRgZmSg%40mail.gmail.com.


Re: I am building an open source School Management System

2020-05-08 Thread Sherif Adigun
Thank you. Let's build on this and improve it.

On Fri, May 8, 2020, 1:02 PM Luqman Shofuleji  wrote:

> Hi,
>
> I've just forked the repository on your github account.
>
> On Wed, May 6, 2020 at 4:21 PM Sherif Adigun 
> wrote:
>
>> Thanks. Checked. Good job. I think I've got more features than you.
>>
>> Latest commits now have authentications
>>
>> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
>>>
>>> I am currently building an open source school Management System on
>>> django and it's currently available on GitHub.
>>>
>>> https://github.com/adigunsherif/Django-School-Management-System
>>>
>>> I need contributors and collaboration.
>>>
>>> Feel free to fork me on GitHub, send a message and let's build a solution
>>>
>>> --
>> 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/JGKrFx5sFuM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%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/CACP0aXighwO6SB3Qdh7mZJQmV7hNGcp52hH04c8vm6E4h_cPZQ%40mail.gmail.com.


Re: Project Ideas

2020-05-08 Thread Deepti sharma
Hi,

Well I did one of the course from PluralSight. It was creating a meeting
planner project.
Second was from Linkedin learninng: Portfolio using Django.

On Fri, May 8, 2020 at 2:59 AM jill patel  wrote:

> Which two courses you did
> Even I am a beginner and searching for sources
>
> On Fri, 8 May 2020 at 4:37 AM, Deepti sharma 
> wrote:
>
>> Hi everyone,
>> I have recently finished two courses in which I made a Meeting planner
>> project, and second was a portfolio using Django.
>> Now I want to start one of my own, I know I will get stuck but that's how
>> I will get better.
>> Do you have any ideas? It would be helpful :)
>> I want to create a simple project with database sql or postgresql, django
>> and will use bootstrap or other stuff for frontend.
>>
>> --
>> 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/97ae270f-591f-4672-bb8a-e87c914d53c5%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/CAAHcmGJJEN%2Bmak2zR9Tj8ApjF_ONcreAaeMc17YB5BFfMh9RcA%40mail.gmail.com
> 
> .
>
-- 
Regards
Deepti Sharma
Blog: https://deepti96.wordpress.com/
Github: https://github.com/dsdeeptisharma
Gitlab: https://gitlab.com/u/dsdeepti
"Great works are not performed by strength but by perseverance"

-- 
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/CAJOjMFfSqWichXY4ZkHdjU3GaQKM4vBc6qnURvdjXaBBojvCQQ%40mail.gmail.com.


Re: django.core.exceptions.ImproperlyConfigured: error is coming

2020-05-08 Thread Jorge Gimeno
On Fri, May 8, 2020 at 2:00 AM ratnadeep ray  wrote:

> I am new to Django and hence don't have much idea about it. I am trying to
> create an app having the following contents in my view.py file:
>
> from django.shortcuts import render
>> from fusioncharts.models import City
>> def pie_chart(request):
>> labels = []
>> data = []
>> queryset = City.objects.order_by('-population')[:3]
>> for city in queryset:
>> labels.append(city.name)
>> data.append(city.population)
>> return render(request, 'pie_chart.html', {
>> 'labels': labels,
>> 'data': data,
>> })
>
>
> The content of my urls.py file inside the app is as follows:
>
> from django.urls import path
>> from fusioncharts import views
>> urlpatterns = [
>> path('pie-chart/', views.pie_chart, name='pie-chart'),
>> ]
>
>
> and the content of my urls.py file inside the main project folder is as
> follows:
>
> from django.contrib import admin
>> from django.urls import path
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('', include('fusioncharts.urls'))
>> ]
>
>
> In the settings.py file, I have added the following:
>
> ROOT_URLCONF = 'Piechart.urls'
>
>
> and under the TEMPLATES, added the following:
>
> 'DIRS': ['Piechart/fusioncharts/templates'],
>
>
> Now while running my app, I am getting the following error:
>
> *django.core.exceptions.ImproperlyConfigured: The included URLconf
>> 'Piechart.urls' does not appear to have any patterns in it. If you see
>> valid patterns in the file then the issue is probably caused by a circular
>> import.*
>
>
> Can anyone please say what's going wrong?
>
> --
> 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/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com
> 
> .
>

ROOT_URLCONF is meant to tell Django where the root urls.py is.  It is
generated by manage.py startproject to point to the urls.py it creates in
settings.py.  In your case, it should point to '.urls', where
 is your main project folder.

Then, I would use an include in the root urls.py to add the pie-chart
route, similar to what you did for fusioncharts.

-Jore

-- 
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/CANfN%3DK8ca%3DNPXowoODi%2B35zgCA2DxgwhWcvMCT6XxLM-axo%2B8g%40mail.gmail.com.


Re: Getting a error

2020-05-08 Thread Derek
Hi Ravi

You have typed:

$pip --version

It should be:

pip --version

When blogs or manuals use the $ sign, its usually to indicate the last 
character of the command prompt often seen on  a Linux machine e.g.

user@machine:/path/to/current/directory$

(so for a shortcut people just write $)


HTH


On Friday, 8 May 2020 13:50:37 UTC+2, Ravi wrote:
>
> Hi
>
> I'm fully bigger so we can not install the pip and Django.
>  anyone can guide how we can install. 
>
> On Fri, May 8, 2020 at 5:04 PM Kasper Laudrup  > wrote:
>
>> Hi Ravi,
>>
>> Why are you posting the same screenshot again without any context?
>>
>> If you want someone to help you, at least try to read what you're being 
>> told and if you don't understand, feel free to ask more questions.
>>
>> Consider reading this:
>>
>> https://stackoverflow.com/help/how-to-ask
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/60004869-a5fc-462d-d579-69504775f422%40stacktrace.dk
>> .
>>
>
>
> -- 
> Many Thanks,
>
> *Ravi Prakash Tamrakar*
> Developer
>
> VirtualTech Outsourcing Services Pvt Ltd 
>
> 59/B, Plot No. 4, 5 and 6, Nehru Nagar (West)
>
> Bhilai, Chhattisgarh - 490 020, India
>
> www.virtualclone.in
>
>

-- 
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/e1438389-bf07-43bd-94d9-0fee64739930%40googlegroups.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread Derek
If you can, use an existing app:

https://github.com/wq/django-data-wizard


On Friday, 8 May 2020 14:57:43 UTC+2, Kasper Laudrup wrote:
>
> Hi Ratnadeep, 
>
> On 08/05/2020 14.03, ratnadeep ray wrote: 
> > Hi all, 
> > 
> > Can anyone let me know how to push the fetched data from an excel to any 
> > DB using Django? 
> > 
>
> It's not very clear what you mean by "the fetched data". Have you 
> fetched some data already? In which format? 
>
> If you need to extract data from an excel sheet, this was the first 
> guide I could find: 
>
> https://www.geeksforgeeks.org/reading-excel-file-using-python/ 
>
> Also, "any DB" is extremely vague. Do you have a database already? Or do 
> you just want to go for whatever database is the best suited for 
> whatever you are trying to achieve? 
>
> And what exactly do you want to use Django for? Django is a web 
> framework and nothing in your question mentions anything about that... 
>
> Kind regards, 
>
> Kasper Laudrup 
>
>
>
> > -- 
> > 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...@googlegroups.com  
> > . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
>

-- 
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/f764f81a-38aa-4a0d-a226-b4988ddf2f54%40googlegroups.com.


Re: timezone doesn't change

2020-05-08 Thread Andréas Kühne
Hi,

That is actually the expected behaviour - django.utils.timezone.now()
should always return a UTC time.

You should always communicate in the backend with UTC time - saving
everything to the database and so on - it should always be in UTC.

When you want to present a time in a template or to the user you need to do
this according to the documentation:
https://docs.djangoproject.com/en/3.0/topics/i18n/timezones/

There is a lot of information there regarding handling timezones - but
now() will always return a UTC (if timezone support is on :))

Regards,

Andréas


Den fre 8 maj 2020 kl 14:28 skrev mehrad nayeri :

> Hi,
> I'm using django 1.11.17 and I've changed TIME_ZONE in settings.py to
> 'Asia/Tehran'
> 
>  but
> django.utils.timezone.now() returns UTC time.
> How I have to fix it? Why it doesn't work? Does it work on newer release?
> Please answer
>
> --
> 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/27fd5fd2-b6dc-4ed2-997b-3a07f061427b%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/CAK4qSCeqLd1azYdyn%3DhM4%3Db%3DtxcjO_aPQsXE%3DQGX67na3oJfQg%40mail.gmail.com.


Re: How to push data fetched from excel to DB using Django?

2020-05-08 Thread Kasper Laudrup

Hi Ratnadeep,

On 08/05/2020 14.03, ratnadeep ray wrote:

Hi all,

Can anyone let me know how to push the fetched data from an excel to any 
DB using Django?




It's not very clear what you mean by "the fetched data". Have you 
fetched some data already? In which format?


If you need to extract data from an excel sheet, this was the first 
guide I could find:


https://www.geeksforgeeks.org/reading-excel-file-using-python/

Also, "any DB" is extremely vague. Do you have a database already? Or do 
you just want to go for whatever database is the best suited for 
whatever you are trying to achieve?


And what exactly do you want to use Django for? Django is a web 
framework and nothing in your question mentions anything about that...


Kind regards,

Kasper Laudrup




--
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/1e970207-0c86-4925-b4c8-dbce7c7c069d%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/6b078fde-fe3d-f24f-f1c5-42a12a337c20%40stacktrace.dk.


Re: I am facing this issue

2020-05-08 Thread Shubhanshu Arya
May be your URL pattern is incorrect.

On Friday, May 8, 2020 at 4:10:47 PM UTC+5:30, Gaurav Shrivastava wrote:
>
> RelatedObjectDoesNotExist at /account/edit/
>
> User has no profile.
>
> Request Method: GET
> Request URL: http://localhost:8000/account/edit/
> Django Version: 2.0.5
> Exception Type: RelatedObjectDoesNotExist
> Exception Value: 
>
> User has no profile.
>
> Exception Location: 
> D:\python\projects\env\bookmarks\lib\site-packages\django\db\models\fields\related_descriptors.py
>  
> in __get__, line 386
> Python Executable: D:\python\projects\env\bookmarks\Scripts\python.exe
> Python Version: 3.8.1
> Python Path: 
>
> ['D:\\python\\projects\\env\\social_site',
>  'D:\\python\\projects\\env\\bookmarks\\Scripts\\python38.zip',
>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\DLLs',
>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\lib',
>  'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32',
>  'D:\\python\\projects\\env\\bookmarks',
>  'D:\\python\\projects\\env\\bookmarks\\lib\\site-packages']
>
> Server time: Fri, 8 May 2020 05:19:23 +
>

-- 
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/79c8a26c-e766-4983-9da1-8210161154b6%40googlegroups.com.


timezone doesn't change

2020-05-08 Thread mehrad nayeri
Hi,
I'm using django 1.11.17 and I've changed TIME_ZONE in settings.py to 
'Asia/Tehran' 

 but 
django.utils.timezone.now() returns UTC time.
How I have to fix it? Why it doesn't work? Does it work on newer release?
Please answer

-- 
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/27fd5fd2-b6dc-4ed2-997b-3a07f061427b%40googlegroups.com.


Re: hai everyone, i am getting error in sending email portion, after submitting i got nothing in my mail. if anyone please help me

2020-05-08 Thread Kasper Laudrup

Hi Yammuna,

On 08/05/2020 13.59, yammuna pari wrote:

Dear Kasper Laudrup ,

I am not using any error handling functions,  only sending email was not 
working


I created a Contact form on my website built in Django but emails sent 
from the form do not seem to actually send. please check the codding below

image.png
image.png
image.png
image.png
If any other code is needed to help debug please let me know and I will 
include it.




It seems like you need to read a bit up on how to handle forms in Django:

https://docs.djangoproject.com/en/3.0/topics/forms/

But considering your specific problem and lack of reported errors, have 
you considering what will happen if the form is *not* valid, ie. the 
following statement returns false:


if form.is_valid():

That might explain it.

Kind regards,

Kasper Laudrup

--
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/01b7ab1f-f02b-7882-dec9-ef2901eba093%40stacktrace.dk.


How to push data fetched from excel to DB using Django?

2020-05-08 Thread ratnadeep ray
Hi all, 

Can anyone let me know how to push the fetched data from an excel to any DB 
using Django? 

-- 
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/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com.


Re: I am building an open source School Management System

2020-05-08 Thread Luqman Shofuleji
Hi,

I've just forked the repository on your github account.

On Wed, May 6, 2020 at 4:21 PM Sherif Adigun  wrote:

> Thanks. Checked. Good job. I think I've got more features than you.
>
> Latest commits now have authentications
>
> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
>>
>> I am currently building an open source school Management System on django
>> and it's currently available on GitHub.
>>
>> https://github.com/adigunsherif/Django-School-Management-System
>>
>> I need contributors and collaboration.
>>
>> Feel free to fork me on GitHub, send a message and let's build a solution
>>
>> --
> 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/06798eec-0e61-4149-9315-9d95cf7aec65%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/CAHyB84ps0YCQz72SYbXKHcj_BYQiuOXQVHGNQpag8vHT4FA2dA%40mail.gmail.com.


Re: Getting a error

2020-05-08 Thread Ravi Prakash
Hi

I'm fully bigger so we can not install the pip and Django.
 anyone can guide how we can install.

On Fri, May 8, 2020 at 5:04 PM Kasper Laudrup  wrote:

> Hi Ravi,
>
> Why are you posting the same screenshot again without any context?
>
> If you want someone to help you, at least try to read what you're being
> told and if you don't understand, feel free to ask more questions.
>
> Consider reading this:
>
> https://stackoverflow.com/help/how-to-ask
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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/60004869-a5fc-462d-d579-69504775f422%40stacktrace.dk
> .
>


-- 
Many Thanks,

*Ravi Prakash Tamrakar*
Developer

-- 




VirtualTech Outsourcing Services Pvt Ltd 

59/B, Plot No. 4, 5 and 6, 
Nehru Nagar (West)

Bhilai, Chhattisgarh - 490 020, India


www.virtualclone.in 


-- 
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/CAJoW92WSAjN%3DHCFiJMpe2ZR6faZi7KeGYUP_jAJpHJf8KYMCkA%40mail.gmail.com.


Re: Getting a error

2020-05-08 Thread Kasper Laudrup

Hi Ravi,

Why are you posting the same screenshot again without any context?

If you want someone to help you, at least try to read what you're being 
told and if you don't understand, feel free to ask more questions.


Consider reading this:

https://stackoverflow.com/help/how-to-ask

Kind regards,

Kasper Laudrup

--
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/60004869-a5fc-462d-d579-69504775f422%40stacktrace.dk.


Re: hai everyone, i am getting error in sending email portion, after submitting i got nothing in my mail. if anyone please help me

2020-05-08 Thread Kasper Laudrup

Hi Yammuna,

On 08/05/2020 08.40, yammuna pari wrote:

Dear Kasper,

Thanks for reply.

I am not getting any error message even form also working well  but 
after submitting the fields are not going to email.




You did write that you were getting an error, did you get an error 
without an error message? What is the error output?


How does your form code look? How are you handling any errors/exceptions 
when handling the form submission and sending the mail?


Kind regards,

Kasper Laudrup

--
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/2c36ef46-9223-57a0-3c12-1fcde7f74f39%40stacktrace.dk.


Re: Getting a error

2020-05-08 Thread Kasper Laudrup

Hi Ravi,

On 08/05/2020 12.41, Ravi Prakash wrote:

Hi
When I'm trying to install the pip at that time there is getting an error.
Any buddy can help me.



Try to look at exception message. That will most likely give you a hint 
to what is the cause of the error.


You haven't included that in your screenshot, so it's hard for anyone to 
guess.


Kind regards,

Kasper Laudrup

--
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/cebf2597-ad9e-b830-8926-32b199b2ca21%40stacktrace.dk.


Re: No module named 'blog'

2020-05-08 Thread Mukesh Badgujar
First... I... created Project at my machine... then... uploaded to
github then from  git i import it to my namecheap shared hosting
server, i created python app in that folder, then i run migrations cmds...
but apps are not detected by django

On Thu, 7 May, 2020, 6:09 pm Mohsen Pahlevanzadeh, <
m.pahlevanza...@gmail.com> wrote:

> Where did you import your module?
>
> On Thu, May 7, 2020 at 3:09 PM Mukesh Badgujar <
> mukesh.badgujar...@gmail.com> wrote:
>
>> already added
>>
>> 'home.apps.HomeConfig',
>> 'blog.apps.BlogConfig',
>> 'shop.apps.shopConfig',
>>
>> one thing is that, i copied this app folder frm my other project, this is
>> not created here
>>
>>
>> On Sunday, 9 August 2015 22:43:38 UTC+5:30, Robin Lery wrote:
>>>
>>> Did you add your 'blog' app in the installed apps in settings.py?
>>>
>>> On Sun, Aug 9, 2015 at 10:35 PM, Maggie Chang 
>>> wrote:
>>>
 hi all,
 would like to seek for everyone's help.
 I am following the django girls instruction =>
 http://tutorial.djangogirls.org/en/django_urls/index.html#your-first-django-url,
 but encounter the problem.
 when I connect to 127.0.0.1:8000, I got the No module named 'blog'
 response.
 Here's the message on browser.
 **
 ImportError at /

 No module named 'blog'

 Request Method: GET
 Request URL: http://127.0.0.1:8000/
 Django Version: 1.8
 Exception Type: ImportError
 Exception Value:

 No module named 'blog'

 Exception Location: /usr/lib/python3.4/importlib/__init__.py in
 import_module, line 109
 Python Executable: /home/maggie/djangoanywhere/venv/bin/python
 Python Version: 3.4.0
 Python Path:

 ['/home/maggie/djangoanywhere',
  '/usr/lib/python3.4',
  '/usr/lib/python3.4/plat-x86_64-linux-gnu',
  '/usr/lib/python3.4/lib-dynload',
  '/home/maggie/djangoanywhere/venv/lib/python3.4/site-packages']

 Server time: Mon, 10 Aug 2015 00:47:53 +0800
 **

 This issue occurred when I add *url(r'', include('blog.urls')), *into
 *magsite/url.py*
 **
 *url.py*
 **
 from django.conf.urls import include, url
 from django.contrib import admin


 urlpatterns = [
 url(r'^admin/', include(admin.site.urls)),
 url(r'', include('blog.urls')),
 ]
 **
 Any idea about the root cause? :(
 and any response will be appreciate.

 --
 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...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/0c3ba90d-97d3-448c-8656-0b2ad6becca7%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>> 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/4a25e83a-0f62-4f60-8401-618252682a22%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/CAJFFGZLyEOZBqbdVULzD8xR6abjfvy8VoMaO4War133B3FeDXQ%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/CAMSZPCPdqGUdgZbQ3RVvz7XRBsf2JL9qu2xFSy6ehyVm3Q0BCw%40mail.gmail.com.


Re: App Dev wanted

2020-05-08 Thread ekong, emmanuel
I am available to work with you guys

On Fri, 8 May 2020 at 11:40 AM, Kola Badmus 
wrote:

> Hey I’m interested
> Reach out +2347036497792
>
>
> On Tuesday, April 28, 2020, Arne Bollinger 
> wrote:
>
>> Hey,
>> We came with a project out of a Covid-19 Hackathon that we could not
>> finish. Now we want to launch as fast as possible as long as people are
>> still in need of social contact.
>> https://devpost.com/software/corona-circles
>>
>> We want to develop an Open-Source Django App that creates Jitsi Meet
>> Sessions and sends out Emails to participants. Pretty simple. 3 volunteer
>> backend devs have left us with unfinished code, so now we want to pay
>> somebody from our pockets, to get it online asap!
>>
>> Here is a head start, the frontend is almost ready:
>> https://github.com/CoronaCircles/coronacircles-django
>> I estimate roughly maximum 10 hours needed. We have a Budget of at least
>> 1000€.
>> Anybody wants to help us?
>>
>> Cheers,
>> Arne
>>
>>
>> --
>> 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/81f7a052-7366-45b7-b2dc-ffe23a6c5050%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/CANWU12NmW2fgUz7Ser4qZO8ejnBkt8LZ_uK2wv9EaqjGAT64UQ%40mail.gmail.com
> 
> .
>

-- 
**Disclaimer**
This e-mail is intended solely for the named recipient. The 
information contained in this message is strictly confidential. 


  * If 
you are not the named recipient, you are hereby notified that any use, 
dissemination or reproduction of this document and or its content is 
prohibited and may be deemed unlawful.
  * If you are not the named 
recipient of this e-mail, please notify the sender by a return e-mail and 
delete all copies of it from your computer and mail.Any views expressed in 
this e-mail are those of the individual sender, except where the sender 
specifically states them to be those of Landmark University 
, to whom no liability shall be attached whatsoever.


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/CAAP9wcxBGtpUtzL1yMfRqYcnO8DeANumULUOr%2BtJwru90wQ_cw%40mail.gmail.com.


I am facing this issue

2020-05-08 Thread Gaurav Shrivastava
RelatedObjectDoesNotExist at /account/edit/

User has no profile.

Request Method: GET
Request URL: http://localhost:8000/account/edit/
Django Version: 2.0.5
Exception Type: RelatedObjectDoesNotExist
Exception Value: 

User has no profile.

Exception Location: 
D:\python\projects\env\bookmarks\lib\site-packages\django\db\models\fields\related_descriptors.py
 
in __get__, line 386
Python Executable: D:\python\projects\env\bookmarks\Scripts\python.exe
Python Version: 3.8.1
Python Path: 

['D:\\python\\projects\\env\\social_site',
 'D:\\python\\projects\\env\\bookmarks\\Scripts\\python38.zip',
 'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\DLLs',
 'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32\\lib',
 'c:\\users\\lenovo\\appdata\\local\\programs\\python\\python38-32',
 'D:\\python\\projects\\env\\bookmarks',
 'D:\\python\\projects\\env\\bookmarks\\lib\\site-packages']

Server time: Fri, 8 May 2020 05:19:23 +

-- 
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/03c702b0-6001-4cfe-9424-f5e8bd65e6ce%40googlegroups.com.


Re: App Dev wanted

2020-05-08 Thread Kola Badmus
Hey I’m interested
Reach out +2347036497792

On Tuesday, April 28, 2020, Arne Bollinger  wrote:

> Hey,
> We came with a project out of a Covid-19 Hackathon that we could not
> finish. Now we want to launch as fast as possible as long as people are
> still in need of social contact.
> https://devpost.com/software/corona-circles
>
> We want to develop an Open-Source Django App that creates Jitsi Meet
> Sessions and sends out Emails to participants. Pretty simple. 3 volunteer
> backend devs have left us with unfinished code, so now we want to pay
> somebody from our pockets, to get it online asap!
>
> Here is a head start, the frontend is almost ready:
> https://github.com/CoronaCircles/coronacircles-django
> I estimate roughly maximum 10 hours needed. We have a Budget of at least
> 1000€.
> Anybody wants to help us?
>
> Cheers,
> Arne
>
>
> --
> 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/81f7a052-7366-45b7-b2dc-ffe23a6c5050%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/CANWU12NmW2fgUz7Ser4qZO8ejnBkt8LZ_uK2wv9EaqjGAT64UQ%40mail.gmail.com.


Getting error while importing xls file from django admin panel to csv for storing in database mysql gating error like

2020-05-08 Thread Chirag Patel
Imported file has a wrong encoding: 'charmap' codec can't decode byte 0x8d 
in position 1774: character maps to

-- 
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/7c8f8d81-1109-4395-95ab-0d90b99e6a1b%40googlegroups.com.


Re: Django Lessons

2020-05-08 Thread David Merrick
I am asking  about web hosting and appropriate Domain Name Servers

On Fri, May 8, 2020 at 9:18 PM David Merrick  wrote:

> Same Domain Name Servers can only handle
> static DNS server
> https://ticket.cdmon.com/en/support/solutions/articles/706124-what-is-a-static-dns-server-and-where-to-modify-dns-records
>
> Some can Domain Name Servers can only handle
> https://en.wikipedia.org/wiki/Dynamic_DNS
>
> So do  Apache (mod_wsgi), Gunicorn, and uWSGI  use Static or Dynamic
> Domain Name Servers?
>
>
>
>
> On Fri, May 8, 2020 at 6:49 PM Eugen Ciur  wrote:
>
>> For first part of the question: Apache (mod_wsgi), Gunicorn, and uWSGI
>> are most popular choices
>> I don't second part of question though - what you mean with "and what
>> domain names / types" ?
>>
>> On Friday, May 8, 2020 at 8:33:43 AM UTC+2, David Merrick wrote:
>>>
>>> Sounds like a very good idea.
>>> I have one immediate question. What web servers can host Django and what
>>> Domain Names / types?
>>> I was using Rails for a bit but got unstuck when Rails need Dynamic
>>> Domain Names, not Static ones.
>>>
>>> Cheers Dave
>>>
>>> On Fri, May 8, 2020 at 6:11 PM Eugen Ciur  wrote:
>>>
 Hi,

 on https://django-lessons.com I release weekly screencasts about
 Django Web Framework. Lessons are usually very short, around 10 minutes.
 Each of them focuses on a single practical topic so that you can
 immediately apply learned skills in your projects.
 50% of all content always will be free.

 I would love your feedback!

 Regards,
 Eugen / Django Lessons

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/784e88d9-9a3d-45ea-b43d-6d22b54469b2%40googlegroups.com
 
 .

>>>
>>>
>>> --
>>> Dave Merrick
>>>
>>> TutorInvercargill
>>>
>>> http://tutorinvercargill.co.nz
>>>
>>> Daves Web Designs
>>>
>>> Website http://www.daveswebdesigns.co.nz
>>>
>>> Email merri...@gmail.com
>>>
>>> Ph   03 216 2053
>>>
>>> Cell 027 3089 169
>>>
>> --
>> 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/360c1be4-e868-42b1-a22a-a0246a3b2791%40googlegroups.com
>> 
>> .
>>
>
>
> --
> Dave Merrick
>
> TutorInvercargill
>
> http://tutorinvercargill.co.nz
>
> Daves Web Designs
>
> Website http://www.daveswebdesigns.co.nz
>
> Email merrick...@gmail.com
>
> Ph   03 216 2053
>
> Cell 027 3089 169
>


-- 
Dave Merrick

TutorInvercargill

http://tutorinvercargill.co.nz

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merrick...@gmail.com

Ph   03 216 2053

Cell 027 3089 169

-- 
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/CA%2B%3DMcKZfnhJuG4wytiEzMuPp%3D5UN4FjMreafwBRUmv1qUVw8Og%40mail.gmail.com.


Re: Django Lessons

2020-05-08 Thread David Merrick
Same Domain Name Servers can only handle
static DNS server
https://ticket.cdmon.com/en/support/solutions/articles/706124-what-is-a-static-dns-server-and-where-to-modify-dns-records

Some can Domain Name Servers can only handle
https://en.wikipedia.org/wiki/Dynamic_DNS

So do  Apache (mod_wsgi), Gunicorn, and uWSGI  use Static or Dynamic Domain
Name Servers?




On Fri, May 8, 2020 at 6:49 PM Eugen Ciur  wrote:

> For first part of the question: Apache (mod_wsgi), Gunicorn, and uWSGI are
> most popular choices
> I don't second part of question though - what you mean with "and what
> domain names / types" ?
>
> On Friday, May 8, 2020 at 8:33:43 AM UTC+2, David Merrick wrote:
>>
>> Sounds like a very good idea.
>> I have one immediate question. What web servers can host Django and what
>> Domain Names / types?
>> I was using Rails for a bit but got unstuck when Rails need Dynamic
>> Domain Names, not Static ones.
>>
>> Cheers Dave
>>
>> On Fri, May 8, 2020 at 6:11 PM Eugen Ciur  wrote:
>>
>>> Hi,
>>>
>>> on https://django-lessons.com I release weekly screencasts about Django
>>> Web Framework. Lessons are usually very short, around 10 minutes.
>>> Each of them focuses on a single practical topic so that you can
>>> immediately apply learned skills in your projects.
>>> 50% of all content always will be free.
>>>
>>> I would love your feedback!
>>>
>>> Regards,
>>> Eugen / Django Lessons
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/784e88d9-9a3d-45ea-b43d-6d22b54469b2%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Dave Merrick
>>
>> TutorInvercargill
>>
>> http://tutorinvercargill.co.nz
>>
>> Daves Web Designs
>>
>> Website http://www.daveswebdesigns.co.nz
>>
>> Email merri...@gmail.com
>>
>> Ph   03 216 2053
>>
>> Cell 027 3089 169
>>
> --
> 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/360c1be4-e868-42b1-a22a-a0246a3b2791%40googlegroups.com
> 
> .
>


-- 
Dave Merrick

TutorInvercargill

http://tutorinvercargill.co.nz

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merrick...@gmail.com

Ph   03 216 2053

Cell 027 3089 169

-- 
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/CA%2B%3DMcKZfH4L4Eg5k1M_40x9oS_rZ8iYfuC_2TfWOFV3%2By9Tivg%40mail.gmail.com.


django.core.exceptions.ImproperlyConfigured: error is coming

2020-05-08 Thread ratnadeep ray
I am new to Django and hence don't have much idea about it. I am trying to 
create an app having the following contents in my view.py file:

from django.shortcuts import render
> from fusioncharts.models import City
> def pie_chart(request):
> labels = []
> data = []
> queryset = City.objects.order_by('-population')[:3]
> for city in queryset:
> labels.append(city.name)
> data.append(city.population)
> return render(request, 'pie_chart.html', {
> 'labels': labels,
> 'data': data,
> })


The content of my urls.py file inside the app is as follows:

from django.urls import path
> from fusioncharts import views
> urlpatterns = [
> path('pie-chart/', views.pie_chart, name='pie-chart'),
> ]


and the content of my urls.py file inside the main project folder is as 
follows:

from django.contrib import admin
> from django.urls import path
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('fusioncharts.urls'))
> ]


In the settings.py file, I have added the following:

ROOT_URLCONF = 'Piechart.urls'


and under the TEMPLATES, added the following:

'DIRS': ['Piechart/fusioncharts/templates'], 


Now while running my app, I am getting the following error:

*django.core.exceptions.ImproperlyConfigured: The included URLconf 
> 'Piechart.urls' does not appear to have any patterns in it. If you see 
> valid patterns in the file then the issue is probably caused by a circular 
> import.*


Can anyone please say what's going wrong?

-- 
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/8afd3990-d71b-4783-a478-0b18bf05389f%40googlegroups.com.


Access filefield's/imagefield's url in template

2020-05-08 Thread 'MH' via Django users
Hi

I just saw that when I pass not an object, but a queryset with values_list 
to a template, I cannot access a filefield like object.field_name.url, as 
url is a property. 

Can you give me advice how to get from the values_list to the url property?

Best regards
MH

-- 
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/ed532302-5c1a-4225-be9f-44a8bdb4cb8d%40googlegroups.com.


Re: didn't return an HttpResponse

2020-05-08 Thread cosmos multi
I didn't know that view existed thank you very much, and the error is due
to the misuse of the form, I understand thanks

El vie., 8 may. 2020, 3:11 a. m., Andréas Kühne 
escribió:

> Hi,
>
> A couple of pointers:
>
> 1. If you are using class based views and want a Form, try using the
> FormView - you don't need to write that much code yourself (regarding
> validation of form and so on).
> 2. When you populate your context - you use a form class and not a form
> instance - you should be instantiating the form instance itself in the
> context (or change to a FormView, that will do it automatically).
>
> Now to the program that you are having - the reason you are getting it is
> because you are sending an invalid form to the post method. And the
> method then doesn't return anything,
>
> I would write it as follows:
> def post(self, request, *args, **kwargs):
> list_product = self.form_class(request.POST)
> if list_product.is_valid():
> list_product.save()
> return redirect('products:product')# <- Shouldn't there be an
> ID here for going to the newly created product page?
>
> messages.error(request, "There was an error in the form, please
> correct it below")
> return self.get(request, *args, **kwargs)
>
> Now this is only an example - you will need to handle the fact the the
> form need so be added to returned request as well.
>
> Regards,
>
> Andréas
>
>
> Den fre 8 maj 2020 kl 09:54 skrev cosmos multi :
>
>> I am trying to populate a database, but when I send it it gives me the
>> following error didn't return an HttpResponse
>>
>> this is the form
>> class ProductForm(forms.ModelForm):
>> name_product = forms.CharField(
>> max_length=25,
>> widget=forms.TextInput(
>> attrs={
>> 'class': 'form-control',
>> 'id': 'name_product',
>> }
>> )
>> )
>>
>> def clean_name_product(self):
>> name_product = self.cleaned_data.get('name_product')
>> if Product.objects.filter(name_product=name_product).exists():
>> raise forms.ValidationError('El nombre del producto ya existe')
>> return name_product
>>
>> class Meta:
>> model = Product
>> fields = (
>> 'name_product', 'description', 'price', 'category', 'state', 'image'
>> )
>> labels = {
>> 'name_product': 'Nombre del Producto',
>> 'description': 'Descripcion',
>> 'price': 'Precio',
>> 'category': 'Categoria',
>> 'state': 'Estado',
>> 'image': 'Imagen del Producto',
>> }
>> widgets = {
>> 'name_product': forms.TextInput(
>> attrs={
>> 'class': 'form-control',
>> 'id': 'name_product',
>> }
>> ),
>> 'description': forms.TextInput(
>> attrs={
>> 'class': 'form-control',
>> 'id': 'description',
>> }
>> ),
>> 'price': forms.NumberInput(
>> attrs={
>> 'class': 'form-control',
>> 'id': 'price',
>> }
>> ),
>> 'category': forms.SelectMultiple(
>> attrs={
>> 'class': 'custom-select',
>> 'id': 'category',
>> }
>> ),
>> 'state': forms.CheckboxInput(),
>> }
>> and this is the model
>>
>> class Product(models.Model):
>> name_product = models.CharField(max_length=25)
>> description = models.CharField(max_length=250)
>> price = models.IntegerField()
>> category = models.ForeignKey(Category, on_delete=models.CASCADE)
>> state = models.BooleanField(default=True)
>> image = models.ImageField(upload_to='products/')
>> created_at = models.DateField(auto_now=True)
>>
>> def __str__(self):
>> return self.name_product
>>
>> this is the view
>>
>> class ProductView(View):
>> template_name = 'products/product.html'
>> model = Product
>> form_class = ProductForm
>>
>> def get_queryset(self):
>> return self.model.objects.filter(state=True)
>>
>> def get_context_data(self, **kwargs):
>> context = {}
>> context['product'] = self.get_queryset()
>> context['list_product'] = self.form_class
>> return context
>>
>> def get(self, request, *args, **kwargs):
>> return render(request, self.template_name, self.get_context_data())
>>
>> def post(self, request, *args, **kwargs):
>> list_product = self.form_class(request.POST)
>> if list_product.is_valid():
>> list_product.save()
>> return redirect('products:product')
>>
>> the error is. The views products.views.ProductView didn't return an
>> httpresponse object. it returned none instead
>>
>>
>> --
>> 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/211be261-f187-4ac4-a374-261480dd2696%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
> 

Re: didn't return an HttpResponse

2020-05-08 Thread Andréas Kühne
Hi,

A couple of pointers:

1. If you are using class based views and want a Form, try using the
FormView - you don't need to write that much code yourself (regarding
validation of form and so on).
2. When you populate your context - you use a form class and not a form
instance - you should be instantiating the form instance itself in the
context (or change to a FormView, that will do it automatically).

Now to the program that you are having - the reason you are getting it is
because you are sending an invalid form to the post method. And the
method then doesn't return anything,

I would write it as follows:
def post(self, request, *args, **kwargs):
list_product = self.form_class(request.POST)
if list_product.is_valid():
list_product.save()
return redirect('products:product')# <- Shouldn't there be an
ID here for going to the newly created product page?

messages.error(request, "There was an error in the form, please correct
it below")
return self.get(request, *args, **kwargs)

Now this is only an example - you will need to handle the fact the the form
need so be added to returned request as well.

Regards,

Andréas


Den fre 8 maj 2020 kl 09:54 skrev cosmos multi :

> I am trying to populate a database, but when I send it it gives me the
> following error didn't return an HttpResponse
>
> this is the form
> class ProductForm(forms.ModelForm):
> name_product = forms.CharField(
> max_length=25,
> widget=forms.TextInput(
> attrs={
> 'class': 'form-control',
> 'id': 'name_product',
> }
> )
> )
>
> def clean_name_product(self):
> name_product = self.cleaned_data.get('name_product')
> if Product.objects.filter(name_product=name_product).exists():
> raise forms.ValidationError('El nombre del producto ya existe')
> return name_product
>
> class Meta:
> model = Product
> fields = (
> 'name_product', 'description', 'price', 'category', 'state', 'image'
> )
> labels = {
> 'name_product': 'Nombre del Producto',
> 'description': 'Descripcion',
> 'price': 'Precio',
> 'category': 'Categoria',
> 'state': 'Estado',
> 'image': 'Imagen del Producto',
> }
> widgets = {
> 'name_product': forms.TextInput(
> attrs={
> 'class': 'form-control',
> 'id': 'name_product',
> }
> ),
> 'description': forms.TextInput(
> attrs={
> 'class': 'form-control',
> 'id': 'description',
> }
> ),
> 'price': forms.NumberInput(
> attrs={
> 'class': 'form-control',
> 'id': 'price',
> }
> ),
> 'category': forms.SelectMultiple(
> attrs={
> 'class': 'custom-select',
> 'id': 'category',
> }
> ),
> 'state': forms.CheckboxInput(),
> }
> and this is the model
>
> class Product(models.Model):
> name_product = models.CharField(max_length=25)
> description = models.CharField(max_length=250)
> price = models.IntegerField()
> category = models.ForeignKey(Category, on_delete=models.CASCADE)
> state = models.BooleanField(default=True)
> image = models.ImageField(upload_to='products/')
> created_at = models.DateField(auto_now=True)
>
> def __str__(self):
> return self.name_product
>
> this is the view
>
> class ProductView(View):
> template_name = 'products/product.html'
> model = Product
> form_class = ProductForm
>
> def get_queryset(self):
> return self.model.objects.filter(state=True)
>
> def get_context_data(self, **kwargs):
> context = {}
> context['product'] = self.get_queryset()
> context['list_product'] = self.form_class
> return context
>
> def get(self, request, *args, **kwargs):
> return render(request, self.template_name, self.get_context_data())
>
> def post(self, request, *args, **kwargs):
> list_product = self.form_class(request.POST)
> if list_product.is_valid():
> list_product.save()
> return redirect('products:product')
>
> the error is. The views products.views.ProductView didn't return an
> httpresponse object. it returned none instead
>
>
> --
> 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/211be261-f187-4ac4-a374-261480dd2696%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/CAK4qSCdAs6%2BNiHHPuqZ6K51LDTvuTFY65Tqg7CS1dg-1DD96XA%40mail.gmail.com.


didn't return an HttpResponse

2020-05-08 Thread cosmos multi
I am trying to populate a database, but when I send it it gives me the 
following error didn't return an HttpResponse

this is the form
class ProductForm(forms.ModelForm):
name_product = forms.CharField(
max_length=25,
widget=forms.TextInput(
attrs={
'class': 'form-control',
'id': 'name_product',
}
)
)

def clean_name_product(self):
name_product = self.cleaned_data.get('name_product')
if Product.objects.filter(name_product=name_product).exists():
raise forms.ValidationError('El nombre del producto ya existe')
return name_product

class Meta:
model = Product
fields = (
'name_product', 'description', 'price', 'category', 'state', 'image'
)
labels = {
'name_product': 'Nombre del Producto',
'description': 'Descripcion',
'price': 'Precio',
'category': 'Categoria',
'state': 'Estado',
'image': 'Imagen del Producto',
}
widgets = {
'name_product': forms.TextInput(
attrs={
'class': 'form-control',
'id': 'name_product',
}
),
'description': forms.TextInput(
attrs={
'class': 'form-control',
'id': 'description',
}
),
'price': forms.NumberInput(
attrs={
'class': 'form-control',
'id': 'price',
}
),
'category': forms.SelectMultiple(
attrs={
'class': 'custom-select',
'id': 'category',
}
),
'state': forms.CheckboxInput(),
}
and this is the model

class Product(models.Model):
name_product = models.CharField(max_length=25)
description = models.CharField(max_length=250)
price = models.IntegerField()
category = models.ForeignKey(Category, on_delete=models.CASCADE)
state = models.BooleanField(default=True)
image = models.ImageField(upload_to='products/')
created_at = models.DateField(auto_now=True)

def __str__(self):
return self.name_product

this is the view

class ProductView(View):
template_name = 'products/product.html'
model = Product
form_class = ProductForm

def get_queryset(self):
return self.model.objects.filter(state=True)

def get_context_data(self, **kwargs):
context = {}
context['product'] = self.get_queryset()
context['list_product'] = self.form_class
return context

def get(self, request, *args, **kwargs):
return render(request, self.template_name, self.get_context_data())

def post(self, request, *args, **kwargs):
list_product = self.form_class(request.POST)
if list_product.is_valid():
list_product.save()
return redirect('products:product')

the error is. The views products.views.ProductView didn't return an 
httpresponse object. it returned none instead


-- 
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/211be261-f187-4ac4-a374-261480dd2696%40googlegroups.com.


Re: hai everyone, i am getting error in sending email portion, after submitting i got nothing in my mail. if anyone please help me

2020-05-08 Thread yammuna pari
Dear Varun,

This error was in home page only but In other page i got the output so i
think email settings and port number was correct

On Fri, May 8, 2020 at 3:43 PM Varun krishna <90.varunkris...@gmail.com>
wrote:

> Hi Yammuna pari,
>
> The issue you are experiencing might be because of the email settings.
> Check if the port numbers are correct. Also specify more details about how
> you are trying to send email( like gmail). They to recheck the smtp
> settings and that should resolve the issue.
>
> Regards,
> Varun.
>
> On Fri, May 8, 2020 at 12:10 PM yammuna pari 
> wrote:
>
>> Dear Kasper,
>>
>> Thanks for reply.
>>
>> I am not getting any error message even form also working well  but after
>> submitting the fields are not going to email.
>>
>> On Fri, May 8, 2020 at 2:49 AM Kasper Laudrup 
>> wrote:
>>
>>> Hi Yammuna,
>>>
>>> It is very likely that the error is the reason why you're not getting
>>> any mail.
>>>
>>> Hard to tell without knowing what kind of error you are getting though.
>>>
>>> I would suggest you try to fix the error and then see if your mail gets
>>> through.
>>>
>>> Kind regards,
>>>
>>> Kasper Laudrup
>>>
>>> --
>>> 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/154d75d3-c957-8ac2-79a7-a14dfb84766c%40stacktrace.dk
>>> .
>>>
>> --
>> 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/CAKTtA5Y1hvXXQTBUTUFRbwmNC51A8ys4AzyrZM%2Bv4eNVv1TUXA%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/CADz3YqS%3DoVRm8%3DrX9MhLydQu2TaCF4yr%3DTrD3nUpM0TMpWg4cQ%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/CAKTtA5YywhTs9i1RoQxUhqxspsmC2RLQ1_BEW%2BwfL59hULpihQ%40mail.gmail.com.


Re: Django tutorial, HttpResponseRedirect, sending multiple arguments

2020-05-08 Thread Andréas Kühne
Cool!

Keep learning - I think that django is probably one of the best COMPLETE
frameworks there is - And now shortly with async support, it will be even
better :)

The way you can quickly prototype something that later on can continue into
production is one of Pythons and Djangos strengths.

Regards,

Andréas


Den tors 7 maj 2020 kl 23:05 skrev Ekberg Peter :

>
> Thank you for the feedback and advices. I will sure check out Django girls.
> The mix of parameters was no problem, I figured that out. I was not sure
> though how to write the path. But now, at least I know how to send
> arguments and that's bothered me for a while. Now I am on the right track
> again. :-)
>
> Peter
>
>
>
>
> --
> 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/CAAkB%2Bwm4up-SgOZ_p%3DYDq%2BrDwxnd0ZH-7qaSb4BZcTH64QoKnA%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/CAK4qSCcC0yFKF3RMAoSLhce7yoUfZgrqbbd6esX-8HXRbEeMdA%40mail.gmail.com.


Re: hai everyone, i am getting error in sending email portion, after submitting i got nothing in my mail. if anyone please help me

2020-05-08 Thread Varun krishna
Hi Yammuna pari,

The issue you are experiencing might be because of the email settings.
Check if the port numbers are correct. Also specify more details about how
you are trying to send email( like gmail). They to recheck the smtp
settings and that should resolve the issue.

Regards,
Varun.

On Fri, May 8, 2020 at 12:10 PM yammuna pari  wrote:

> Dear Kasper,
>
> Thanks for reply.
>
> I am not getting any error message even form also working well  but after
> submitting the fields are not going to email.
>
> On Fri, May 8, 2020 at 2:49 AM Kasper Laudrup 
> wrote:
>
>> Hi Yammuna,
>>
>> It is very likely that the error is the reason why you're not getting
>> any mail.
>>
>> Hard to tell without knowing what kind of error you are getting though.
>>
>> I would suggest you try to fix the error and then see if your mail gets
>> through.
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> 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/154d75d3-c957-8ac2-79a7-a14dfb84766c%40stacktrace.dk
>> .
>>
> --
> 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/CAKTtA5Y1hvXXQTBUTUFRbwmNC51A8ys4AzyrZM%2Bv4eNVv1TUXA%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/CADz3YqS%3DoVRm8%3DrX9MhLydQu2TaCF4yr%3DTrD3nUpM0TMpWg4cQ%40mail.gmail.com.


Re: Project Ideas

2020-05-08 Thread jill patel
Which two courses you did
Even I am a beginner and searching for sources

On Fri, 8 May 2020 at 4:37 AM, Deepti sharma 
wrote:

> Hi everyone,
> I have recently finished two courses in which I made a Meeting planner
> project, and second was a portfolio using Django.
> Now I want to start one of my own, I know I will get stuck but that's how
> I will get better.
> Do you have any ideas? It would be helpful :)
> I want to create a simple project with database sql or postgresql, django
> and will use bootstrap or other stuff for frontend.
>
> --
> 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/97ae270f-591f-4672-bb8a-e87c914d53c5%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/CAAHcmGJJEN%2Bmak2zR9Tj8ApjF_ONcreAaeMc17YB5BFfMh9RcA%40mail.gmail.com.


Re: Django Lessons

2020-05-08 Thread Eugen Ciur
For first part of the question: Apache (mod_wsgi), Gunicorn, and uWSGI are 
most popular choices
I don't second part of question though - what you mean with "and what 
domain names / types" ? 

On Friday, May 8, 2020 at 8:33:43 AM UTC+2, David Merrick wrote:
>
> Sounds like a very good idea.
> I have one immediate question. What web servers can host Django and what 
> Domain Names / types?
> I was using Rails for a bit but got unstuck when Rails need Dynamic Domain 
> Names, not Static ones.
>
> Cheers Dave
>
> On Fri, May 8, 2020 at 6:11 PM Eugen Ciur > 
> wrote:
>
>> Hi, 
>>
>> on https://django-lessons.com I release weekly screencasts about Django 
>> Web Framework. Lessons are usually very short, around 10 minutes.
>> Each of them focuses on a single practical topic so that you can 
>> immediately apply learned skills in your projects.
>> 50% of all content always will be free.
>>
>> I would love your feedback!
>>
>> Regards,
>> Eugen / Django Lessons
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/784e88d9-9a3d-45ea-b43d-6d22b54469b2%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Dave Merrick
>
> TutorInvercargill
>
> http://tutorinvercargill.co.nz
>
> Daves Web Designs
>
> Website http://www.daveswebdesigns.co.nz
>
> Email merri...@gmail.com 
>
> Ph   03 216 2053
>
> Cell 027 3089 169
>

-- 
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/360c1be4-e868-42b1-a22a-a0246a3b2791%40googlegroups.com.


Re: hai everyone, i am getting error in sending email portion, after submitting i got nothing in my mail. if anyone please help me

2020-05-08 Thread yammuna pari
Dear Kasper,

Thanks for reply.

I am not getting any error message even form also working well  but after
submitting the fields are not going to email.

On Fri, May 8, 2020 at 2:49 AM Kasper Laudrup  wrote:

> Hi Yammuna,
>
> It is very likely that the error is the reason why you're not getting
> any mail.
>
> Hard to tell without knowing what kind of error you are getting though.
>
> I would suggest you try to fix the error and then see if your mail gets
> through.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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/154d75d3-c957-8ac2-79a7-a14dfb84766c%40stacktrace.dk
> .
>

-- 
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/CAKTtA5Y1hvXXQTBUTUFRbwmNC51A8ys4AzyrZM%2Bv4eNVv1TUXA%40mail.gmail.com.


Re: Django Lessons

2020-05-08 Thread David Merrick
Sounds like a very good idea.
I have one immediate question. What web servers can host Django and what
Domain Names / types?
I was using Rails for a bit but got unstuck when Rails need Dynamic Domain
Names, not Static ones.

Cheers Dave

On Fri, May 8, 2020 at 6:11 PM Eugen Ciur  wrote:

> Hi,
>
> on https://django-lessons.com I release weekly screencasts about Django
> Web Framework. Lessons are usually very short, around 10 minutes.
> Each of them focuses on a single practical topic so that you can
> immediately apply learned skills in your projects.
> 50% of all content always will be free.
>
> I would love your feedback!
>
> Regards,
> Eugen / Django Lessons
>
> --
> 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/784e88d9-9a3d-45ea-b43d-6d22b54469b2%40googlegroups.com
> 
> .
>


-- 
Dave Merrick

TutorInvercargill

http://tutorinvercargill.co.nz

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merrick...@gmail.com

Ph   03 216 2053

Cell 027 3089 169

-- 
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/CA%2B%3DMcKZnGhvB8U3VtmakNBRdEjNdORbP16h6Ux2JmD3WaF0jCg%40mail.gmail.com.


Django Lessons

2020-05-08 Thread Eugen Ciur
Hi, 

on https://django-lessons.com I release weekly screencasts about Django Web 
Framework. Lessons are usually very short, around 10 minutes.
Each of them focuses on a single practical topic so that you can 
immediately apply learned skills in your projects.
50% of all content always will be free.

I would love your feedback!

Regards,
Eugen / Django Lessons

-- 
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/784e88d9-9a3d-45ea-b43d-6d22b54469b2%40googlegroups.com.