Re: django 2.0 to django 2.2 migration

2019-10-17 Thread Sijoy Chirayath
Thank you very much for your quick support.

-- 
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/9c37b62c-2ddb-4fb5-8887-97cf9bd1b56d%40googlegroups.com.


Re: django server not runing

2019-10-17 Thread Mohammad yunus
Seperate your URL file with "," or remove "name"

On Fri, 18 Oct 2019, 7:52 am wd,  wrote:

> The error is pretty clear ...
>
> [image: image.png]
>
> May be it should be path('', views.first_view, name='first_view') ?
>
> On Fri, Oct 18, 2019 at 4:41 AM Muhamed Bešić 
> wrote:
>
>>
>> --
>> 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/9b0b6621-9cfd-4c4e-9f4e-86a0ac903b58%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/CABexzmj8aAZuCAy1%3DDoVMa0eYA_4OSpzYAt0sO9kNNLYRL%3Dw4Q%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/CAEQiGcMqfQAPpX7ZT-j4KiY6KQSoT43YgWqFLrxSJFku1Gskfg%40mail.gmail.com.


Re: a variable is not defined

2019-10-17 Thread Jorge Gimeno
I saw this that may be relevant:

https://stackoverflow.com/questions/7576202/how-can-i-pass-two-models-to-a-class-based-generic-view

-Jorge

On Thu, Oct 17, 2019 at 8:14 PM sotiris moustogiannis 
wrote:

> I want to make custom function because i want to take one result from 2
> different models (inner join), and i dont find a way to use 2 models in my
> listview class (generic)
>
> On Friday, October 18, 2019 at 6:03:18 AM UTC+3, sotiris moustogiannis
> wrote:
>>
>> I read that you can't use the def get_queryset into a function but only
>> in a generic class view, so maybe the def get_queryset function does not
>> run. I want to  make my own custom function and i want to find a way to get
>> self parameter in my function. Thanks a lot.
>>
>> On Friday, October 18, 2019 at 5:49:48 AM UTC+3, jlgimeno71 wrote:
>>>
>>> wd,
>>>
>>> The problem here is that when you're creating the context, the name
>>> 'result' is not defined. When the get_queryset() method returns, the result
>>> name goes out of scope.  My guess that's why you're getting a NameError.
>>>
>>> If that's not it, I would suggest cutting and pasting the traceback and
>>> showing us the actual code (with line numbers if you have them). It will
>>> help us diagnose the problem.
>>>
>>> -Jorge
>>>
>>> On Thu, Oct 17, 2019 at 7:25 PM wd  wrote:
>>>
 oh ,sorry my mistake. But I think the error is pretty clear ...

 On Fri, Oct 18, 2019 at 10:23 AM wd  wrote:

> Dude, you need to indent at the line include 'context' ... it's a
> beginners  problem...
>
> On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis <
> soto...@outlook.com> wrote:
>
>> I have an error: name 'result' is not defined
>>
>>
>>
>> def search(request):
>>
>> def get_queryset(self):
>> query = self.request.GET.get('q')
>> result = Shops.objects.filter(Q(city=query))
>>
>> return result
>>
>> context={
>> 'shops' : result,
>> }
>>
>> return render(request, 'booking/search.html',context)
>>
>>
>>
>>
>>
>> --
>> 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CABexzmhZtCXQRWB7S%3DL8S3B2rzmnbi3Raan1MFKW1asbSoShqg%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/dcd65a19-628b-4ac9-9f60-d8d4b726d945%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/CANfN%3DK8jvtCjxRvirOmgT7p_GQdr9Lm23B40NJ6QkO_kaGTNYA%40mail.gmail.com.


Re: a variable is not defined

2019-10-17 Thread sotiris moustogiannis
I want to make custom function because i want to take one result from 2 
different models (inner join), and i dont find a way to use 2 models in my 
listview class (generic)

On Friday, October 18, 2019 at 6:03:18 AM UTC+3, sotiris moustogiannis 
wrote:
>
> I read that you can't use the def get_queryset into a function but only in 
> a generic class view, so maybe the def get_queryset function does not run. 
> I want to  make my own custom function and i want to find a way to get self 
> parameter in my function. Thanks a lot.
>
> On Friday, October 18, 2019 at 5:49:48 AM UTC+3, jlgimeno71 wrote:
>>
>> wd,
>>
>> The problem here is that when you're creating the context, the name 
>> 'result' is not defined. When the get_queryset() method returns, the result 
>> name goes out of scope.  My guess that's why you're getting a NameError.
>>
>> If that's not it, I would suggest cutting and pasting the traceback and 
>> showing us the actual code (with line numbers if you have them). It will 
>> help us diagnose the problem.
>>
>> -Jorge
>>
>> On Thu, Oct 17, 2019 at 7:25 PM wd  wrote:
>>
>>> oh ,sorry my mistake. But I think the error is pretty clear ...
>>>
>>> On Fri, Oct 18, 2019 at 10:23 AM wd  wrote:
>>>
 Dude, you need to indent at the line include 'context' ... it's a 
 beginners  problem...

 On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis <
 soto...@outlook.com> wrote:

> I have an error: name 'result' is not defined
>
>
>
> def search(request):
>
> def get_queryset(self):
> query = self.request.GET.get('q')
> result = Shops.objects.filter(Q(city=query))
>
> return result
>
> context={
> 'shops' : result,
> }
>
> return render(request, 'booking/search.html',context)
>
>
>
>
>
> -- 
> 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CABexzmhZtCXQRWB7S%3DL8S3B2rzmnbi3Raan1MFKW1asbSoShqg%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/dcd65a19-628b-4ac9-9f60-d8d4b726d945%40googlegroups.com.


Re: a variable is not defined

2019-10-17 Thread sotiris moustogiannis
I read that you can't use the def get_queryset into a function but only in 
a generic class view, so maybe the def get_queryset function does not run. 
I want to  make my own custom function and i want to find a way to get self 
parameter in my function. Thanks a lot.

On Friday, October 18, 2019 at 5:49:48 AM UTC+3, jlgimeno71 wrote:
>
> wd,
>
> The problem here is that when you're creating the context, the name 
> 'result' is not defined. When the get_queryset() method returns, the result 
> name goes out of scope.  My guess that's why you're getting a NameError.
>
> If that's not it, I would suggest cutting and pasting the traceback and 
> showing us the actual code (with line numbers if you have them). It will 
> help us diagnose the problem.
>
> -Jorge
>
> On Thu, Oct 17, 2019 at 7:25 PM wd > wrote:
>
>> oh ,sorry my mistake. But I think the error is pretty clear ...
>>
>> On Fri, Oct 18, 2019 at 10:23 AM wd > wrote:
>>
>>> Dude, you need to indent at the line include 'context' ... it's a 
>>> beginners  problem...
>>>
>>> On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis <
>>> soto...@outlook.com > wrote:
>>>
 I have an error: name 'result' is not defined



 def search(request):

 def get_queryset(self):
 query = self.request.GET.get('q')
 result = Shops.objects.filter(Q(city=query))

 return result

 context={
 'shops' : result,
 }

 return render(request, 'booking/search.html',context)





 -- 
 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CABexzmhZtCXQRWB7S%3DL8S3B2rzmnbi3Raan1MFKW1asbSoShqg%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/24be404f-1dd8-4532-ab55-52e069e2e2c9%40googlegroups.com.


Re: set school year and change boolean to False when school year is not active

2019-10-17 Thread Rain
Thanks Sir Alot sir ima check for it!

On Fri, Oct 18, 2019 at 9:55 AM Okware Aldo  wrote:

> hello,
> You could use signals pre_save
> https://docs.djangoproject.com/en/2.2/topics/signals/
>
>
> On Fri, Oct 18, 2019 at 4:49 AM Rain  wrote:
>
>> Hello!. thanks for your help..
>> what i want to achieve is ti check if end year is already meet.
>> then if school year already ended. The field would be inactive or the
>> boolean True would be False.
>> if the set year already passed.
>>
>> On Fri, Oct 18, 2019 at 4:41 AM James Gutu  wrote:
>>
>>> It depends what you are trying to achieve.
>>> What do you mean by "then when school year end  this would automatically
>>> in_active"?
>>> Do you need to determine start_date <= self.end_year *only when saving*
>>> or you need to check *everyday* to see if datetime.now() >
>>> self.end_year?
>>>
>>> On Thu, Oct 17, 2019 at 4:27 PM Rain  wrote:
>>>
 Hi Guys!! Hope Fully someone can help me any hint or answer really
 appreaciated..
 ireally stuck here in a couple of days now.
 My Problem is i want to set a school year using
 start_year and end_year field then when school year end  this would
 automatically in_active
 for example
 start_year: 2019-01-01
 end_year: 2020-01-01
 active_year: True

 then when 2020-01-01 ends
 the boolean will automatically change the status to
 active_year:False

 --
 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/e429d5d2-a6fc-4bf1-82b0-1c12e08f3f49%40googlegroups.com
 
 .

>>>
>>>
>>> --
>>>
>>> --
>>> Regards,
>>> James Gutu
>>> Mobile: +447368461508
>>> Skype: jmgutu
>>>
>>> --
>>> 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/CAOnWGOLqLHhZeo9brsWuVNipaOX3yyxuW%2BN22tq7xbe_XEg7hA%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/CAM-q_1cE%2Bpstaxti72smp%3DfEzgGqV0oCbjp14C17x%3DfwnKnhug%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/CAMEZma-bceR0T3GwULj%3DW3ojs1gyu-qVYXaYgEifoZHiDjMuyw%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/CAM-q_1cQUPGxBfY2k2eWNrx4AU_X_yDFECSU4PEv50sZ2fAFLw%40mail.gmail.com.


Re: a variable is not defined

2019-10-17 Thread Jorge Gimeno
wd,

The problem here is that when you're creating the context, the name
'result' is not defined. When the get_queryset() method returns, the result
name goes out of scope.  My guess that's why you're getting a NameError.

If that's not it, I would suggest cutting and pasting the traceback and
showing us the actual code (with line numbers if you have them). It will
help us diagnose the problem.

-Jorge

On Thu, Oct 17, 2019 at 7:25 PM wd  wrote:

> oh ,sorry my mistake. But I think the error is pretty clear ...
>
> On Fri, Oct 18, 2019 at 10:23 AM wd  wrote:
>
>> Dude, you need to indent at the line include 'context' ... it's a
>> beginners  problem...
>>
>> On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis <
>> sotom...@outlook.com> wrote:
>>
>>> I have an error: name 'result' is not defined
>>>
>>>
>>>
>>> def search(request):
>>>
>>> def get_queryset(self):
>>> query = self.request.GET.get('q')
>>> result = Shops.objects.filter(Q(city=query))
>>>
>>> return result
>>>
>>> context={
>>> 'shops' : result,
>>> }
>>>
>>> return render(request, 'booking/search.html',context)
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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/CABexzmhZtCXQRWB7S%3DL8S3B2rzmnbi3Raan1MFKW1asbSoShqg%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/CANfN%3DK_7-xzLEYw%3DR8-NF5De%3D7H79O%3D0NXUkk_u26ZmZm8-iZw%40mail.gmail.com.


Re: a variable is not defined

2019-10-17 Thread wd
oh ,sorry my mistake. But I think the error is pretty clear ...

On Fri, Oct 18, 2019 at 10:23 AM wd  wrote:

> Dude, you need to indent at the line include 'context' ... it's a
> beginners  problem...
>
> On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis <
> sotom...@outlook.com> wrote:
>
>> I have an error: name 'result' is not defined
>>
>>
>>
>> def search(request):
>>
>> def get_queryset(self):
>> query = self.request.GET.get('q')
>> result = Shops.objects.filter(Q(city=query))
>>
>> return result
>>
>> context={
>> 'shops' : result,
>> }
>>
>> return render(request, 'booking/search.html',context)
>>
>>
>>
>>
>>
>> --
>> 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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/CABexzmhZtCXQRWB7S%3DL8S3B2rzmnbi3Raan1MFKW1asbSoShqg%40mail.gmail.com.


Re: a variable is not defined

2019-10-17 Thread wd
Dude, you need to indent at the line include 'context' ... it's a
beginners  problem...

On Fri, Oct 18, 2019 at 10:14 AM sotiris moustogiannis 
wrote:

> I have an error: name 'result' is not defined
>
>
>
> def search(request):
>
> def get_queryset(self):
> query = self.request.GET.get('q')
> result = Shops.objects.filter(Q(city=query))
>
> return result
>
> context={
> 'shops' : result,
> }
>
> return render(request, 'booking/search.html',context)
>
>
>
>
>
> --
> 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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%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/CABexzmgqw2NisRErdRZqXeat9T%3D8FvkBsueybE%2BTvuYEMzkOfw%40mail.gmail.com.


Re: django server not runing

2019-10-17 Thread wd
The error is pretty clear ...

[image: image.png]

May be it should be path('', views.first_view, name='first_view') ?

On Fri, Oct 18, 2019 at 4:41 AM Muhamed Bešić 
wrote:

>
> --
> 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/9b0b6621-9cfd-4c4e-9f4e-86a0ac903b58%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/CABexzmj8aAZuCAy1%3DDoVMa0eYA_4OSpzYAt0sO9kNNLYRL%3Dw4Q%40mail.gmail.com.


a variable is not defined

2019-10-17 Thread sotiris moustogiannis


I have an error: name 'result' is not defined



def search(request):

def get_queryset(self):
query = self.request.GET.get('q')
result = Shops.objects.filter(Q(city=query))

return result
   
context={
'shops' : result,
}

return render(request, 'booking/search.html',context)





-- 
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/543debc7-d517-4a7a-a9b8-f3fc7c7cc60d%40googlegroups.com.


Re: set school year and change boolean to False when school year is not active

2019-10-17 Thread Okware Aldo
hello,
You could use signals pre_save
https://docs.djangoproject.com/en/2.2/topics/signals/


On Fri, Oct 18, 2019 at 4:49 AM Rain  wrote:

> Hello!. thanks for your help..
> what i want to achieve is ti check if end year is already meet.
> then if school year already ended. The field would be inactive or the
> boolean True would be False.
> if the set year already passed.
>
> On Fri, Oct 18, 2019 at 4:41 AM James Gutu  wrote:
>
>> It depends what you are trying to achieve.
>> What do you mean by "then when school year end  this would automatically
>> in_active"?
>> Do you need to determine start_date <= self.end_year *only when saving*
>> or you need to check *everyday* to see if datetime.now() > self.end_year?
>>
>> On Thu, Oct 17, 2019 at 4:27 PM Rain  wrote:
>>
>>> Hi Guys!! Hope Fully someone can help me any hint or answer really
>>> appreaciated..
>>> ireally stuck here in a couple of days now.
>>> My Problem is i want to set a school year using
>>> start_year and end_year field then when school year end  this would
>>> automatically in_active
>>> for example
>>> start_year: 2019-01-01
>>> end_year: 2020-01-01
>>> active_year: True
>>>
>>> then when 2020-01-01 ends
>>> the boolean will automatically change the status to
>>> active_year:False
>>>
>>> --
>>> 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/e429d5d2-a6fc-4bf1-82b0-1c12e08f3f49%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>>
>> --
>> Regards,
>> James Gutu
>> Mobile: +447368461508
>> Skype: jmgutu
>>
>> --
>> 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/CAOnWGOLqLHhZeo9brsWuVNipaOX3yyxuW%2BN22tq7xbe_XEg7hA%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/CAM-q_1cE%2Bpstaxti72smp%3DfEzgGqV0oCbjp14C17x%3DfwnKnhug%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/CAMEZma-bceR0T3GwULj%3DW3ojs1gyu-qVYXaYgEifoZHiDjMuyw%40mail.gmail.com.


Re: set school year and change boolean to False when school year is not active

2019-10-17 Thread Rain
Hello!. thanks for your help..
what i want to achieve is ti check if end year is already meet.
then if school year already ended. The field would be inactive or the
boolean True would be False.
if the set year already passed.

On Fri, Oct 18, 2019 at 4:41 AM James Gutu  wrote:

> It depends what you are trying to achieve.
> What do you mean by "then when school year end  this would automatically
> in_active"?
> Do you need to determine start_date <= self.end_year *only when saving*
> or you need to check *everyday* to see if datetime.now() > self.end_year?
>
> On Thu, Oct 17, 2019 at 4:27 PM Rain  wrote:
>
>> Hi Guys!! Hope Fully someone can help me any hint or answer really
>> appreaciated..
>> ireally stuck here in a couple of days now.
>> My Problem is i want to set a school year using
>> start_year and end_year field then when school year end  this would
>> automatically in_active
>> for example
>> start_year: 2019-01-01
>> end_year: 2020-01-01
>> active_year: True
>>
>> then when 2020-01-01 ends
>> the boolean will automatically change the status to
>> active_year:False
>>
>> --
>> 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/e429d5d2-a6fc-4bf1-82b0-1c12e08f3f49%40googlegroups.com
>> 
>> .
>>
>
>
> --
>
> --
> Regards,
> James Gutu
> Mobile: +447368461508
> Skype: jmgutu
>
> --
> 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/CAOnWGOLqLHhZeo9brsWuVNipaOX3yyxuW%2BN22tq7xbe_XEg7hA%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/CAM-q_1cE%2Bpstaxti72smp%3DfEzgGqV0oCbjp14C17x%3DfwnKnhug%40mail.gmail.com.


Re: django server not runing

2019-10-17 Thread Gabriela Barrera
In your urls.py file, you have a syntax error, change '=' for ','

On Thu, Oct 17, 2019, 17:41 Muhamed Bešić 
wrote:

>
> --
> 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/9b0b6621-9cfd-4c4e-9f4e-86a0ac903b58%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/CA%2Bc-0JH%2BQFPxsTkAoKGxGPG8%3D%3Du5BifHhycH0HqbV5T8%2BV6-%3DQ%40mail.gmail.com.


Re: Creating an app that generates static files

2019-10-17 Thread Jack Sundberg
Thank you, James! This seems like a good fix. From reading through the 
documentation (here 
), this is how 
I understand the workflow -- so correct me if I'm wrong please!

 > First, I can activate Django sessions by 
adding 'django.contrib.sessions' to my installed apps. 
 > Django by-default stores session info in the SQLite database -- 
therefore, each session entry will have an ID assigned to it automatically. 
 > I can use each session_id to create a temporary folder in some directory 
(say /tmp) where the generated files can be made. So folder structure will 
look like:
tmp/
[session_id1]/ 
file1.tlgf
file2.bin
[session_id2]/ 
file1.tlgf
file2.bin

 > when sessions data hits a certain threshold, I can call 
django.contrib.sessions.clearsessions which will delete expired session 
entries in the database
 > pull out which entries were deleted and then delete the corresponding 
tmp/[session_id] directory 

Is that the best way to do it?

-Jack


On Thursday, October 17, 2019 at 4:42:04 PM UTC-4, James Gutu wrote:
>
> Jack,
>
> From what I understand it looks like a conflict of uniquely named files 
> when they are generated simultaneously.
> Could you resolve this by creating a folder named from the session_id, 
> with the file inside of that. So that if two users request the same file, 
> there will never be a conflict, as the unique file will be created in both 
> folders.
>
> [user_1_session_id]/entry123.jpeg
> [user_2_session_id]/entry123.jpeg
>
> Though, this might seem like a fix, but the issue may be more fundamental 
> than file names.
> Let me know what you think.
>
> Regards,
> James
>
> On Thu, Oct 17, 2019 at 4:23 PM Jack Sundberg  > wrote:
>
>> Yes, I tried getting the idea across in layman terms, as I hope this 
>> helps discussion of the issue -- and then I can later translate the 
>> solution into django implementation. 
>>
>> I avoided the full process in my original post for clarity. I used the 
>> *.jpeg file as an illustrative example, when I'm actually generating *.gltf 
>> and *.bin files. These files are typically a couple hundred KB in size, but 
>> I will have thousands of them (millions as I add to my database). These 
>> files are used in coordination with Verge3D  - an app built on top of 
>> Three.js for 3D rendering. Verge3D allows use of Blender for CAD, which is 
>> a python-based program that my scripts are written in. Running of these 
>> scripts are certainly cpu intensive; however I am going to get around this 
>> by using an  of this Verge3D request.
>>
>> So to be more specific, my app does the following:
>>  - the url mapping pulls a database entry
>>  - the app serves the proper html template with an  embedded in 
>> it. It displays a loading screen while the 3D model is created backend.
>>  - the  calls a separate app using the identical data entry
>>  - using the data entry, static files are created from the data (Blender 
>> script creates a *.gltf and *.bin)
>>  - the app serves the html template with the generated static files 
>> embedded inside the 
>>
>> Is this helpful? Also thank you for the quick response. I really 
>> appreciate the help.
>>
>> -Jack
>>
>>
>> On Thursday, October 17, 2019 at 10:56:56 AM UTC-4, vineet daniel wrote:
>>>
>>> This problem can happen with any stack and shouldn't be considered as 
>>> django specific. What you are looking for is a solution in a layman 
>>> terms.which then can be translated to django implementation.
>>>
>>> Before that i would like to know image size and kind of image that you 
>>> create. Is it some qr code or what?
>>>
>>> Please note that working with images on the fly is always a cpu 
>>> intensive operation. Ill can come up with something once you share the 
>>> details with me.
>>>
>>> On Thu, 17 Oct 2019, 20:00 Jack Sundberg,  wrote:
>>>
 Hi all,

 I am currently writing an app that generates static files before 
 serving them, and I could use some input! Here's a step-by-step example of 
 how the app is setup:

  - the url mapping pulls a database entry
  - using the data entry, static files are created from the data (for 
 example, a *.jpeg or a *.gltf)
  - the app serves the html template with the generated static files 
 embedded (for example, via an  tag)

 The issue comes with the creation of the unique static files. I can 
 have the app create a file in the static folder, send it off, then delete 
 the file to ready for the next request -- but the webpage will run into 
 issues if multiple requests are made at the same time. If two people 
 request the same url at the same time, the app will fail because both 
 requests are trying to create/serve/delete an identical file (i.e. 
 entry123.jpeg) at the same 

Re: Creating an app that generates static files

2019-10-17 Thread James Gutu
Jack,

>From what I understand it looks like a conflict of uniquely named files
when they are generated simultaneously.
Could you resolve this by creating a folder named from the session_id, with
the file inside of that. So that if two users request the same file, there
will never be a conflict, as the unique file will be created in both
folders.

[user_1_session_id]/entry123.jpeg
[user_2_session_id]/entry123.jpeg

Though, this might seem like a fix, but the issue may be more fundamental
than file names.
Let me know what you think.

Regards,
James

On Thu, Oct 17, 2019 at 4:23 PM Jack Sundberg 
wrote:

> Yes, I tried getting the idea across in layman terms, as I hope this helps
> discussion of the issue -- and then I can later translate the solution into
> django implementation.
>
> I avoided the full process in my original post for clarity. I used the
> *.jpeg file as an illustrative example, when I'm actually generating *.gltf
> and *.bin files. These files are typically a couple hundred KB in size, but
> I will have thousands of them (millions as I add to my database). These
> files are used in coordination with Verge3D  - an app built on top of
> Three.js for 3D rendering. Verge3D allows use of Blender for CAD, which is
> a python-based program that my scripts are written in. Running of these
> scripts are certainly cpu intensive; however I am going to get around this
> by using an  of this Verge3D request.
>
> So to be more specific, my app does the following:
>  - the url mapping pulls a database entry
>  - the app serves the proper html template with an  embedded in
> it. It displays a loading screen while the 3D model is created backend.
>  - the  calls a separate app using the identical data entry
>  - using the data entry, static files are created from the data (Blender
> script creates a *.gltf and *.bin)
>  - the app serves the html template with the generated static files
> embedded inside the 
>
> Is this helpful? Also thank you for the quick response. I really
> appreciate the help.
>
> -Jack
>
>
> On Thursday, October 17, 2019 at 10:56:56 AM UTC-4, vineet daniel wrote:
>>
>> This problem can happen with any stack and shouldn't be considered as
>> django specific. What you are looking for is a solution in a layman
>> terms.which then can be translated to django implementation.
>>
>> Before that i would like to know image size and kind of image that you
>> create. Is it some qr code or what?
>>
>> Please note that working with images on the fly is always a cpu intensive
>> operation. Ill can come up with something once you share the details with
>> me.
>>
>> On Thu, 17 Oct 2019, 20:00 Jack Sundberg,  wrote:
>>
>>> Hi all,
>>>
>>> I am currently writing an app that generates static files before serving
>>> them, and I could use some input! Here's a step-by-step example of how the
>>> app is setup:
>>>
>>>  - the url mapping pulls a database entry
>>>  - using the data entry, static files are created from the data (for
>>> example, a *.jpeg or a *.gltf)
>>>  - the app serves the html template with the generated static files
>>> embedded (for example, via an  tag)
>>>
>>> The issue comes with the creation of the unique static files. I can have
>>> the app create a file in the static folder, send it off, then delete the
>>> file to ready for the next request -- but the webpage will run into issues
>>> if multiple requests are made at the same time. If two people request the
>>> same url at the same time, the app will fail because both requests are
>>> trying to create/serve/delete an identical file (i.e. entry123.jpeg) at the
>>> same time. Trying to mess with the filename to avoid this won't work here
>>> either (i.e. naming entry123.01.jpeg, entry123.02.jpeg, entry123.03.jpeg,
>>> ...).
>>>
>>> I can think of two solutions, but they both are things I'd like to avoid:
>>>  1. have the files premade and stored -- I want to avoid this because of
>>> the massive filesize required for all these files
>>>  2. have the static files generated in a user-specific directory -- I
>>> want to avoid this because I'd rather not have registered users on my
>>> website
>>>
>>> Is there another solution to this? I'm still relatively new with Django,
>>> so there might be something simple I'm missing.
>>>
>>> -Jack
>>>
>>> --
>>> 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/190637d2-bd9b-499a-a122-1dc7adf2aca5%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, 

multiplate table inheritance subclass with extra OneToOneField relationship to parent class

2019-10-17 Thread Brian Maissy
I have a model which essentially boils down to this:

class Person(models.Model):
name = models.TextField()


class MarriedMan(Person):
wife = models.OneToOneField(Person, on_delete=models.CASCADE,
related_name='husband')


But when I try to make the migration, I get the following error:

django.core.exceptions.ImproperlyConfigured: Add parent_link=True to 
> webapp.MarriedMan.wife.


It seems like Django is automatically promoting my OneToOneField to be the 
one which holds the reference to the parent class. But that's not what I 
intended. I want there to be an extra wife relationship in addition to the 
implicit automatic OneToOneField.

As far as I could tell from the documentation, that's exactly what NOT 
passing parent_link=True is supposed to signify:

If you want to control the name of the attribute linking back to the 
> parent, you can create your own OneToOneField and set parent_link=True to 
> indicate that your field is the link back to the parent class.


As a workaround I could explicitly define the parent_link relationship plus 
my own wife relationship, but that doesn't seem to be the correct solution.

Am I missing something?

Thanks.

-- 
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/9ce76375-d614-4fb6-a38d-27e28465b687%40googlegroups.com.


[bug] Django 2.2.6 breaks postgres orm querying for list inside a jsonfield

2019-10-17 Thread Mehran Kader
Assuming I have a model Like this:

class Sequence(models.Model):
triggers = JSONField()

Now, all my instances will be of the format:
triggers = {'list1': [], 'list2': []) 

So a query which worked in 2.2.5 
Sequence.objects.filter(triggers__list1__contains=['str']) does not work in 
django 2.2.6.
It raises a TypeError

 {"message": "Traceback (most recent call last):   File 
'/code/webhooks/facebook/views.py', line 318, in post
 handle_messenger_webhook(parsed_obj=parsed_obj, test=if_test)   File 
'/code/webhooks/facebook/views.py', line 277, in handle_messenger_webhook  
   sequence, serial = get_triggered_sequence_and_serial(customer=customer, 
payload=payload)   File '/code/webhooks/facebook/views.py', line 226, in 
get_triggered_sequence_and_serial sequence = 
Sequence.objects.filter(platform=customer.platform, 
triggers__postbacks__contains=[payload]).first()   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/query.py', line 
653, in first for obj in (self if self.ordered else 
self.order_by('pk'))[:1]:   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/query.py', line 
274, in __iter__ self._fetch_all()   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/query.py', line 
1242, in _fetch_all self._result_cache = 
list(self._iterable_class(self))   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/query.py', line 
55, in __iter__ results = 
compiler.execute_sql(chunked_fetch=self.chunked_fetch, 
chunk_size=self.chunk_size)   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py', 
line 1087, in execute_sql sql, params = self.as_sql()   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py', 
line 489, in as_sql where, w_params = self.compile(self.where) if 
self.where is not None else ('', [])   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py', 
line 405, in compile sql, params = node.as_sql(self, self.connection)  
 File 
'/usr/local/lib/python3.6/site-packages/django/db/models/sql/where.py', 
line 81, in as_sql sql, params = compiler.compile(child)   File 
'/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py', 
line 405, in compile sql, params = node.as_sql(self, self.connection)  
 File 
'/usr/local/lib/python3.6/site-packages/django/contrib/postgres/lookups.py', 
line 11, in as_sql params = lhs_params + rhs_params TypeError: can only 
concatenate tuple (not 'list') to tuple "}

Would you bee kind enough to check it? Thanks!

-- 
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/4526fd33-631b-4f7d-b0b3-963856f858f9%40googlegroups.com.


Multiple table inheritance subclass with an additional OneToOneField relationship to the parent class

2019-10-17 Thread Brian Maissy
I have a model which in essence boils down to this:

class Person(models.Model):
name = models.TextField()


class MarriedMan(Person):
wife = models.OneToOneField(Person, on_delete=models.CASCADE,
related_name='husband')


But when I try to generate the migration, I get the following error:

django.core.exceptions.ImproperlyConfigured: Add parent_link=True to 
> webapp.MarriedMan.wife.


It looks like Django is promoting the wife OneToOneField to be the 
parent_link relationship. But that's not what I'm trying to do. I want 
MarriedMan to have the default implicit OneToOneField for its parent class 
Person record, plus an extra OneToOneField for its wife.

As far as I was able to understand from the docs, the way to specify that 
this is not my intention is by not passing parent_link=True.

If you want to control the name of the attribute linking back to the 
> parent, you can create your own OneToOneField 
> 
>  and 
> set parent_link=True 
> 
>  to 
> indicate that your field is the link back to the parent class.


As a workaround I could manually specify the parent_link relationship in 
addition to the wife field, but that doesn't seem like the correct solution.

Am I missing something?

Thanks.

-- 
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/fd82f238-b141-4283-8d14-20969a9855b9%40googlegroups.com.


Re: set school year and change boolean to False when school year is not active

2019-10-17 Thread James Gutu
It depends what you are trying to achieve.
What do you mean by "then when school year end  this would automatically
in_active"?
Do you need to determine start_date <= self.end_year *only when saving* or
you need to check *everyday* to see if datetime.now() > self.end_year?

On Thu, Oct 17, 2019 at 4:27 PM Rain  wrote:

> Hi Guys!! Hope Fully someone can help me any hint or answer really
> appreaciated..
> ireally stuck here in a couple of days now.
> My Problem is i want to set a school year using
> start_year and end_year field then when school year end  this would
> automatically in_active
> for example
> start_year: 2019-01-01
> end_year: 2020-01-01
> active_year: True
>
> then when 2020-01-01 ends
> the boolean will automatically change the status to
> active_year:False
>
> --
> 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/e429d5d2-a6fc-4bf1-82b0-1c12e08f3f49%40googlegroups.com
> 
> .
>


-- 

-- 
Regards,
James Gutu
Mobile: +447368461508
Skype: jmgutu

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


Re: django 2.0 to django 2.2 migration

2019-10-17 Thread Simon Charette
This was tracked in https://code.djangoproject.com/ticket/30673 and fixed 
and 2.2.5[0]

Cheers,
Simon

[0] 
https://github.com/django/django/commit/1265a26b2fa3cbd73a2bccd91b700268bc28bc07

Le jeudi 17 octobre 2019 10:31:50 UTC-4, Sijoy Chirayath a écrit :
>
> I am changing one of my application from djanog 2.0.6 to 2.2.2. I have 2 
> model files in two different app consists of model classes. Each model file 
> i mapped to two different databases. Some of the model classes in both 
> model files have the same name for dt_table in the meta class. So while 
> doing makemigrations i am getting an error saying that 
> dt_table tbl_activity_log is used by multiple models: usermanagement, 
> master. But the same is working perfectly in django 2.0.6 version. 
> Following are the error details. 
> Please help.
>
> tbl_activity_log: (models.E028) db_table 'tbl_activity_log' is used by 
> multiple models: usermanagement.ActivityLog, master.ActivityLog.
> tbl_audit_log: (models.E028) db_table 'tbl_audit_log' is used by multiple 
> models: usermanagement.AuditLog, master.AuditLog.
> tbl_business_groups: (models.E028) db_table 'tbl_business_groups' is used 
> by multiple models: usermanagement.BusinessGroups, master.BusinessGroups.
> tbl_categories: (models.E028) db_table 'tbl_categories' is used by 
> multiple models: usermanagement.Categories, master.Categories.
> tbl_client_configuration: (models.E028) db_table 
> 'tbl_client_configuration' is used by multiple models: 
> usermanagement.ClientConfiguration, master.ClientConfiguration.
> tbl_client_groups: (models.E028) db_table 'tbl_client_groups' is used by 
> multiple models: usermanagement.ClientGroups, master.ClientGroups.
> tbl_countries: (models.E028) db_table 'tbl_countries' is used by multiple 
> models: usermanagement.Countries, master.Countries.
> tbl_divisions: (models.E028) db_table 'tbl_divisions' is used by multiple 
> models: usermanagement.Divisions, master.Divisions.
> tbl_domain_countries: (models.E028) db_table 'tbl_domain_countries' is 
> used by multiple models: usermanagement.DomainCountries, 
> master.DomainCountries.
> tbl_domains: (models.E028) db_table 'tbl_domains' is used by multiple 
> models: usermanagement.Domains, master.Domains.
> tbl_form_type: (models.E028) db_table 'tbl_form_type' is used by multiple 
> models: usermanagement.FormType, master.FormType.
> tbl_forms: (models.E028) db_table 'tbl_forms' is used by multiple models: 
> usermanagement.Forms, master.Forms.
> tbl_legal_entities: (models.E028) db_table 'tbl_legal_entities' is used by 
> multiple models: usermanagement.LegalEntities, master.LegalEntities.
> tbl_organisation: (models.E028) db_table 'tbl_organisation' is used by 
> multiple models: usermanagement.Organisation, master.Organisation.
> tbl_reminder_settings: (models.E028) db_table 'tbl_reminder_settings' is 
> used by multiple models: usermanagement.ReminderSettings, 
> master.ReminderSettings.
> tbl_service_providers: (models.E028) db_table 'tbl_service_providers' is 
> used by multiple models: usermanagement.ServiceProviders, 
> master.ServiceProviders.
> tbl_timezones: (models.E028) db_table 'tbl_timezones' is used by multiple 
> models: usermanagement.TimeZones, master.TimeZones.
> tbl_units: (models.E028) db_table 'tbl_units' is used by multiple models: 
> usermanagement.Units, master.Units.
> tbl_user_category: (models.E028) db_table 'tbl_user_category' is used by 
> multiple models: usermanagement.UserCategory, master.UserCategory.
> tbl_users: (models.E028) db_table 'tbl_users' is used by multiple models: 
> usermanagement.Users, master.Users.
> tbl_verification_type: (models.E028) db_table 'tbl_verification_type' is 
> used by multiple models: usermanagement.VerificationType, 
> master.VerificationType.
>

-- 
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/159ab704-3af4-4b6e-b2e9-55ca7e67a660%40googlegroups.com.


set school year and change boolean to False when school year is not active

2019-10-17 Thread Rain
Hi Guys!! Hope Fully someone can help me any hint or answer really 
appreaciated..
ireally stuck here in a couple of days now.
My Problem is i want to set a school year using
start_year and end_year field then when school year end  this would 
automatically in_active
for example
start_year: 2019-01-01
end_year: 2020-01-01
active_year: True

then when 2020-01-01 ends 
the boolean will automatically change the status to
active_year:False

-- 
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/e429d5d2-a6fc-4bf1-82b0-1c12e08f3f49%40googlegroups.com.


Re: Creating an app that generates static files

2019-10-17 Thread Jack Sundberg
Yes, I tried getting the idea across in layman terms, as I hope this helps 
discussion of the issue -- and then I can later translate the solution into 
django implementation. 

I avoided the full process in my original post for clarity. I used the 
*.jpeg file as an illustrative example, when I'm actually generating *.gltf 
and *.bin files. These files are typically a couple hundred KB in size, but 
I will have thousands of them (millions as I add to my database). These 
files are used in coordination with Verge3D  - an app built on top of 
Three.js for 3D rendering. Verge3D allows use of Blender for CAD, which is 
a python-based program that my scripts are written in. Running of these 
scripts are certainly cpu intensive; however I am going to get around this 
by using an  of this Verge3D request.

So to be more specific, my app does the following:
 - the url mapping pulls a database entry
 - the app serves the proper html template with an  embedded in it. 
It displays a loading screen while the 3D model is created backend.
 - the  calls a separate app using the identical data entry
 - using the data entry, static files are created from the data (Blender 
script creates a *.gltf and *.bin)
 - the app serves the html template with the generated static files 
embedded inside the 

Is this helpful? Also thank you for the quick response. I really appreciate 
the help.

-Jack


On Thursday, October 17, 2019 at 10:56:56 AM UTC-4, vineet daniel wrote:
>
> This problem can happen with any stack and shouldn't be considered as 
> django specific. What you are looking for is a solution in a layman 
> terms.which then can be translated to django implementation.
>
> Before that i would like to know image size and kind of image that you 
> create. Is it some qr code or what?
>
> Please note that working with images on the fly is always a cpu intensive 
> operation. Ill can come up with something once you share the details with 
> me.
>
> On Thu, 17 Oct 2019, 20:00 Jack Sundberg,  > wrote:
>
>> Hi all,
>>
>> I am currently writing an app that generates static files before serving 
>> them, and I could use some input! Here's a step-by-step example of how the 
>> app is setup:
>>
>>  - the url mapping pulls a database entry
>>  - using the data entry, static files are created from the data (for 
>> example, a *.jpeg or a *.gltf)
>>  - the app serves the html template with the generated static files 
>> embedded (for example, via an  tag)
>>
>> The issue comes with the creation of the unique static files. I can have 
>> the app create a file in the static folder, send it off, then delete the 
>> file to ready for the next request -- but the webpage will run into issues 
>> if multiple requests are made at the same time. If two people request the 
>> same url at the same time, the app will fail because both requests are 
>> trying to create/serve/delete an identical file (i.e. entry123.jpeg) at the 
>> same time. Trying to mess with the filename to avoid this won't work here 
>> either (i.e. naming entry123.01.jpeg, entry123.02.jpeg, entry123.03.jpeg, 
>> ...).
>>
>> I can think of two solutions, but they both are things I'd like to avoid:
>>  1. have the files premade and stored -- I want to avoid this because of 
>> the massive filesize required for all these files
>>  2. have the static files generated in a user-specific directory -- I 
>> want to avoid this because I'd rather not have registered users on my 
>> website
>>
>> Is there another solution to this? I'm still relatively new with Django, 
>> so there might be something simple I'm missing.
>>
>> -Jack
>>
>> -- 
>> 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/190637d2-bd9b-499a-a122-1dc7adf2aca5%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/317c4ce6-5378-4e59-920e-c0fdcacd453a%40googlegroups.com.


form_add with pre-filled fields

2019-10-17 Thread Jérôme Le Carrou
Hi,

I have a models with 3 classes: Visite, Inclusion, BilanBiologique and 
ExamenBiologique

- Inclusion is linked to Visite (OneToOne)
- BilanBiologique is linked to Visite (ForeignKey)
- ExamenBiologique is linked to BilanBiologique (ForeignKey)
- ExamenBiologique is a subform of BilanBiologique

I use Django admin form
I try to customize my Inclusion admin form to

- have a link that redirect user to BilanBiologique
AND 
- I would like the "vis" field (which is the ForeignKey) to be pre-filled 
with the corresponding value (I can retrieve this value from Inclusion)

I manage to display a link from Inclusion to BilanBiologique using a method 
"examen" in Inclusion class
I have think about using GET method but to be honest I am lost... I have no 
idea how to proceed...

models.py

class Visite(models.Model):
vis_ide = models.AutoField(primary_key=True)
pat = models.ForeignKey(Participante, verbose_name='Participante', 
related_name='visites', on_delete=models.CASCADE)
vis_dat = models.DateField("Date de consultation")

def __str__(self):
return f"{self.pat.pat_ide_prn_cse} / {self.vis_dat}"

class BilanBiologique(models.Model):
bio_ide = models.AutoField(primary_key=True)
vis = models.ForeignKey(Visite, verbose_name='Visite', 
on_delete=models.CASCADE)
bio_dat = models.DateField("Date de prélèvement")

def __str__(self):
return f"{self.bio_ide}"

@property
def date_visite(self):
return self.vis.vis_dat

date_visite.fget.short_description = 'Date de la visite'

@property
def participante(self):
return self.vis.pat.pat_ide_prn_cse

participante.fget.short_description = 'Participante'

class ExamenBiologique(models.Model):
bio_exa_ide = models.AutoField(primary_key=True)
bio = models.ForeignKey(BilanBiologique, verbose_name='Bilans', 
related_name='examens',on_delete=models.CASCADE)
bio_exa_cod = models.IntegerField("Type d'examen")
bio_exa_res_num = models.FloatField("Résultat numérique", 
null=True, blank=True)
bio_exa_res_mod = models.IntegerField("Résultat modalité", 
null=True, blank=True)
bio_exa_uni = models.IntegerField("Unité", null=True, blank=True)
bio_exa_val_inf = models.FloatField("Limite inférieure", null=True, 
blank=True)
bio_exa_val_sup = models.FloatField("Limite supérieure", null=True, 
blank=True)

def __str__(self):
return f"{self.bio_exa_ide}"

class Inclusion(models.Model):
readonly_fields = ('examen',)

inc_ide = models.AutoField(primary_key=True)
vis = models.ForeignKey(Visite, verbose_name='Visite', 
related_name='inclusions', on_delete=models.CASCADE)
inc_tdr = models.IntegerField("Test rapide Determine® VHB (AgHBs)")

def examen(self):
changeform_url = reverse('admin:ecrf_bilanbiologique_add')
return mark_safe('Ajouter un 
bilan'.format(u=changeform_url))
examen.short_description =''
examen.allow_tags = True

def __str__(self):

return f"{self.vis} / {self.inc_ide}"

admin.py

from django.contrib import admin
from .models import Participante, Visite, Inclusion, BilanBiologique, 
ExamenBiologique
from .forms import InclusionFormAdmin, BilanBiologiqueFormAdmin

class ExamenBiologiqueInline(admin.TabularInline):
model = ExamenBiologique
extra = 0

class BilanBiologiqueAdmin(admin.ModelAdmin):
inlines = [ExamenBiologiqueInline,]

class BilanBiologiqueLinkInline(admin.TabularInline):
readonly_fields = ('examen', )
model = BilanBiologique
extra = 0
fields = ('bio_ide', 'vis', 'bio_dat','examen')
form = BilanBiologiqueFormAdmin

class VisiteAdmin(admin.ModelAdmin):
inlines = [BilanBiologiqueLinkInline,]

class InclusionAdmin(admin.ModelAdmin):
readonly_fields = ('examen',)
model = Inclusion
fields = ('vis',('inc_tdr','examen'),)
form = InclusionFormAdmin


admin.site.register(Participante)
admin.site.register(Visite, VisiteAdmin)
admin.site.register(BilanBiologique, BilanBiologiqueAdmin)
admin.site.register(Inclusion, InclusionAdmin)


-- 
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/fee18697-d98d-40be-b7ed-18322bfc3652%40googlegroups.com.


Re: Django URL not working on my windows 10

2019-10-17 Thread vineet daniel
Scrernshot5 there should.be a comma before name.


On Thu, 17 Oct 2019, 20:26 vineet daniel,  wrote:

> Typo in include in urls.py file instead of incliude it should be include.
> Thats something that i could see immediately.
>
> On Thu, 17 Oct 2019, 20:22 Muhamed Bešić, 
> wrote:
>
>> wtf i have done wrong, i'm getting bored, URL mapping not working anyway,
>> anyone please, review the files and give 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/478ca311-9b23-4a36-a6e2-018aef44d99d%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/CAJPbAW8RF7hcWxZDO6C7xGpoy1iCsWQXxCXuGUMF1ryAEzrVOg%40mail.gmail.com.


Re: Django URL not working on my windows 10

2019-10-17 Thread vineet daniel
Typo in include in urls.py file instead of incliude it should be include.
Thats something that i could see immediately.

On Thu, 17 Oct 2019, 20:22 Muhamed Bešić, 
wrote:

> wtf i have done wrong, i'm getting bored, URL mapping not working anyway,
> anyone please, review the files and give 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/478ca311-9b23-4a36-a6e2-018aef44d99d%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/CAJPbAW_1VOcYP5MvHNN7i4WD_RuDyBEQ%3DF9naH0sOSRYiD0vAA%40mail.gmail.com.


Re: Creating an app that generates static files

2019-10-17 Thread vineet daniel
This problem can happen with any stack and shouldn't be considered as
django specific. What you are looking for is a solution in a layman
terms.which then can be translated to django implementation.

Before that i would like to know image size and kind of image that you
create. Is it some qr code or what?

Please note that working with images on the fly is always a cpu intensive
operation. Ill can come up with something once you share the details with
me.

On Thu, 17 Oct 2019, 20:00 Jack Sundberg,  wrote:

> Hi all,
>
> I am currently writing an app that generates static files before serving
> them, and I could use some input! Here's a step-by-step example of how the
> app is setup:
>
>  - the url mapping pulls a database entry
>  - using the data entry, static files are created from the data (for
> example, a *.jpeg or a *.gltf)
>  - the app serves the html template with the generated static files
> embedded (for example, via an  tag)
>
> The issue comes with the creation of the unique static files. I can have
> the app create a file in the static folder, send it off, then delete the
> file to ready for the next request -- but the webpage will run into issues
> if multiple requests are made at the same time. If two people request the
> same url at the same time, the app will fail because both requests are
> trying to create/serve/delete an identical file (i.e. entry123.jpeg) at the
> same time. Trying to mess with the filename to avoid this won't work here
> either (i.e. naming entry123.01.jpeg, entry123.02.jpeg, entry123.03.jpeg,
> ...).
>
> I can think of two solutions, but they both are things I'd like to avoid:
>  1. have the files premade and stored -- I want to avoid this because of
> the massive filesize required for all these files
>  2. have the static files generated in a user-specific directory -- I want
> to avoid this because I'd rather not have registered users on my website
>
> Is there another solution to this? I'm still relatively new with Django,
> so there might be something simple I'm missing.
>
> -Jack
>
> --
> 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/190637d2-bd9b-499a-a122-1dc7adf2aca5%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/CAJPbAW-4yXAVTNnTpHt6WJj88iNxres7xUGCVaqeLMVX7D_k4g%40mail.gmail.com.


django 2.0 to django 2.2 migration

2019-10-17 Thread Sijoy Chirayath
I am changing one of my application from djanog 2.0.6 to 2.2.2. I have 2 
model files in two different app consists of model classes. Each model file 
i mapped to two different databases. Some of the model classes in both 
model files have the same name for dt_table in the meta class. So while 
doing makemigrations i am getting an error saying that 
dt_table tbl_activity_log is used by multiple models: usermanagement, 
master. But the same is working perfectly in django 2.0.6 version. 
Following are the error details. 
Please help.

tbl_activity_log: (models.E028) db_table 'tbl_activity_log' is used by 
multiple models: usermanagement.ActivityLog, master.ActivityLog.
tbl_audit_log: (models.E028) db_table 'tbl_audit_log' is used by multiple 
models: usermanagement.AuditLog, master.AuditLog.
tbl_business_groups: (models.E028) db_table 'tbl_business_groups' is used 
by multiple models: usermanagement.BusinessGroups, master.BusinessGroups.
tbl_categories: (models.E028) db_table 'tbl_categories' is used by multiple 
models: usermanagement.Categories, master.Categories.
tbl_client_configuration: (models.E028) db_table 'tbl_client_configuration' 
is used by multiple models: usermanagement.ClientConfiguration, 
master.ClientConfiguration.
tbl_client_groups: (models.E028) db_table 'tbl_client_groups' is used by 
multiple models: usermanagement.ClientGroups, master.ClientGroups.
tbl_countries: (models.E028) db_table 'tbl_countries' is used by multiple 
models: usermanagement.Countries, master.Countries.
tbl_divisions: (models.E028) db_table 'tbl_divisions' is used by multiple 
models: usermanagement.Divisions, master.Divisions.
tbl_domain_countries: (models.E028) db_table 'tbl_domain_countries' is used 
by multiple models: usermanagement.DomainCountries, master.DomainCountries.
tbl_domains: (models.E028) db_table 'tbl_domains' is used by multiple 
models: usermanagement.Domains, master.Domains.
tbl_form_type: (models.E028) db_table 'tbl_form_type' is used by multiple 
models: usermanagement.FormType, master.FormType.
tbl_forms: (models.E028) db_table 'tbl_forms' is used by multiple models: 
usermanagement.Forms, master.Forms.
tbl_legal_entities: (models.E028) db_table 'tbl_legal_entities' is used by 
multiple models: usermanagement.LegalEntities, master.LegalEntities.
tbl_organisation: (models.E028) db_table 'tbl_organisation' is used by 
multiple models: usermanagement.Organisation, master.Organisation.
tbl_reminder_settings: (models.E028) db_table 'tbl_reminder_settings' is 
used by multiple models: usermanagement.ReminderSettings, 
master.ReminderSettings.
tbl_service_providers: (models.E028) db_table 'tbl_service_providers' is 
used by multiple models: usermanagement.ServiceProviders, 
master.ServiceProviders.
tbl_timezones: (models.E028) db_table 'tbl_timezones' is used by multiple 
models: usermanagement.TimeZones, master.TimeZones.
tbl_units: (models.E028) db_table 'tbl_units' is used by multiple models: 
usermanagement.Units, master.Units.
tbl_user_category: (models.E028) db_table 'tbl_user_category' is used by 
multiple models: usermanagement.UserCategory, master.UserCategory.
tbl_users: (models.E028) db_table 'tbl_users' is used by multiple models: 
usermanagement.Users, master.Users.
tbl_verification_type: (models.E028) db_table 'tbl_verification_type' is 
used by multiple models: usermanagement.VerificationType, 
master.VerificationType.

-- 
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/bfb26ad5-fbfd-46fb-be52-55d4c8b138c1%40googlegroups.com.


Creating an app that generates static files

2019-10-17 Thread Jack Sundberg
Hi all,

I am currently writing an app that generates static files before serving 
them, and I could use some input! Here's a step-by-step example of how the 
app is setup:

 - the url mapping pulls a database entry
 - using the data entry, static files are created from the data (for 
example, a *.jpeg or a *.gltf)
 - the app serves the html template with the generated static files 
embedded (for example, via an  tag)

The issue comes with the creation of the unique static files. I can have 
the app create a file in the static folder, send it off, then delete the 
file to ready for the next request -- but the webpage will run into issues 
if multiple requests are made at the same time. If two people request the 
same url at the same time, the app will fail because both requests are 
trying to create/serve/delete an identical file (i.e. entry123.jpeg) at the 
same time. Trying to mess with the filename to avoid this won't work here 
either (i.e. naming entry123.01.jpeg, entry123.02.jpeg, entry123.03.jpeg, 
...).

I can think of two solutions, but they both are things I'd like to avoid:
 1. have the files premade and stored -- I want to avoid this because of 
the massive filesize required for all these files
 2. have the static files generated in a user-specific directory -- I want 
to avoid this because I'd rather not have registered users on my website

Is there another solution to this? I'm still relatively new with Django, so 
there might be something simple I'm missing.

-Jack

-- 
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/190637d2-bd9b-499a-a122-1dc7adf2aca5%40googlegroups.com.


Django Middleware vs. DRF Permission Classes for Validations

2019-10-17 Thread Dinesh Dass Subramanian
I am going to develop a web application with front-end being angular and 
backend being Django REST Framework. There is a need to do several 
validations from HTTP request including access token and api key 
validations. The key point is that some validations will be applicable for 
all APIs and some will be applicable to APIs on a need basis. I need to 
know the best approach on whether I could have a custom middleware for 
validations based on API endpoints or should I use Permission classes of 
DRF for validations based on API endpoints?

-- 
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/e20d37d0-73c8-4cf4-874d-bf78f44f93eb%40googlegroups.com.


Overriding change_list_results template per ModelAdmin

2019-10-17 Thread Luka Jančin
I have a model which is registered to two different admin sites with two 
ModelAdmins. 
I would like to override the template for change_list_results for each 
ModelAdmin independently. Currently it's not possible the same way you can 
do it for add_form_template, change_form_template etc. by overriding the 
appropriate member.
Is it possible to achieve this some other way?

-- 
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/d2dcfd18-9fc2-4789-9ab3-28754fc144dd%40googlegroups.com.


Re: Working with static files

2019-10-17 Thread Gaddafi adamu
Go an add 
{% load static %} 

Then use {% static “link.css” %} in your static urls 
Sent from my iPhone

> On 17 Oct 2019, at 12:25 PM, ISAAC NELSON S.B. KARGBO 
>  wrote:
> 
> 
> Hello everyone, i am new to Django and i am learning to develop a "todo_list 
> app", but i have a problem with my css static files.
> Please help me on how to do about it.
> 
> Thanks!
> -- 
> 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/d85a4531-bca7-4912-8cba-e01620c8769a%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/F597D943-54DB-4F42-9CA7-A9E8DFE6A2AE%40gmail.com.


Re: Working with static files

2019-10-17 Thread N'BE SORO
Hello use this tutorial
https://docs.djangoproject.com/fr/2.2/howto/static-files/

Le jeu. 17 oct. 2019 à 09:25, ISAAC NELSON S.B. KARGBO <
insbkar...@njala.edu.sl> a écrit :

> Hello everyone, i am new to Django and i am learning to develop a
> "todo_list app", but i have a problem with my css static files.
> Please help me on how to do about it.
>
> Thanks!
>
> --
> 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/d85a4531-bca7-4912-8cba-e01620c8769a%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/CAOtSHp-25NcEq%2BJ5-WuUPzqE74PEunEG2O_qRj%3DMd0CG0qDRjg%40mail.gmail.com.


Re: Django server not working on my windows pc

2019-10-17 Thread Integr@te System
Try to check PATH/enviroment variable and permission of project folders

-- 
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/3ccb3c59-9f5f-4ea4-a9fd-0cd699ec9ca6%40googlegroups.com.


Working with static files

2019-10-17 Thread ISAAC NELSON S.B. KARGBO
Hello everyone, i am new to Django and i am learning to develop a 
"todo_list app", but i have a problem with my css static files.
Please help me on how to do about it.

Thanks!

-- 
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/d85a4531-bca7-4912-8cba-e01620c8769a%40googlegroups.com.