Re: Contributing to Django

2018-09-06 Thread Andréas Kühne
That's good if you think you have that experience. Contributing back is
always good :-)

However - if you want to discuss this, I think you should change to the
developers mailing list instead. They can probably help you. Or just go and
check the issues on the django project and see if you can help there?

Regards,

Andréas


Den fre 7 sep. 2018 kl 07:24 skrev Sanjeev Singh <
sanjeevsinghdevi...@gmail.com>:

> Hello Sir,
> I've already done some projects in django but now I want to contribute. I
> want to start this by solving some easy bugs, If you suggest some.
> Thank you.
>
> On Fri, Sep 7, 2018 at 10:37 AM Andréas Kühne 
> wrote:
>
>> Hi,
>>
>> I think you really should get some experience with writing applications
>> in django before you start contributing to the project itself. The django
>> project is rather complex and it takes a while to understand the concepts
>> behind it. I have been working with django for 5 years now and haven't
>> found anything that I would feel comfortable with changing in the project
>> itself yet.
>>
>> Regards,
>>
>> Andréas
>>
>>
>> Den fre 7 sep. 2018 kl 04:35 skrev Sanjeev Singh <
>> sanjeevsinghdevi...@gmail.com>:
>>
>>> Hello,
>>>
>>> I’m a beginner want to contribute please help me in
>>> solving some easy bugs so that I can get started.
>>>
>>>
>>>
>>> Thank you.
>>>
>>>
>>>
>>> Sent from Mail  for
>>> Windows 10
>>>
>>>
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/5b91518c.1c69fb81.6db14.affc%40mx.google.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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAK4qSCeYBZOP9axZF10YnjJtChNT_oQyu1jAtw4KhTM66sS6mw%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Btz_ABAiGGubYQyLJeu5bJbADi%3D9QZ4Zj2Tf%2BQy22eyk5NLLQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCdosQ6DuVuLk4sXYdEk9fCGNWppts1pptnhTpDrQ0nndQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating a single page app

2018-09-06 Thread Andréas Kühne
Sorry - that's a preference - more than a definitive answer.

Personally I like Angular, but people will say Vue or React just as much.
That's up to what you prefer yourself.

Regards,

Andréas


Den fre 7 sep. 2018 kl 07:20 skrev Md.iftequar iqbal :

> Which is the best best frontend js for django
>
>
> On Fri, 7 Sep 2018, 10:34 am Andréas Kühne, 
> wrote:
>
>> Short answer - yes it's possible, but not optimal.
>>
>> Long answer:
>> A single page app isn't really dependent that much on the view that you
>> use but rather some sort of javascript frontend. You will need to use a js
>> frontend like Vue, React or Angular. The backend should probably then be
>> based on a rest framework (django rest framework for example). That way the
>> frontend will be able to easily communicate with the backend.
>>
>> Regards,,
>>
>> Andréas
>>
>>
>> Den fre 7 sep. 2018 kl 04:35 skrev Md.iftequar iqbal <
>> iftequa...@gmail.com>:
>>
>>> Can we create a single page app that performs CRUD(Create, Read, Update,
>>> Delete) operations by using class-based views
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/439a3906-bf68-42c3-92c8-9e46023e0858%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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAK4qSCebhTmRj2c1AkhxToVKVAE-M-Qm2AqNbtLXFtYZNYZAtQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHAmP3ScwKgEpoZv3nbK%3DRbXHAOnhCWCd4Scch7otaT5Vx8atw%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCcjK9ZV2cg_E5WQoujpd2PE62hBKXyNuSb-9gqWAXbgfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Contributing to Django

2018-09-06 Thread Sanjeev Singh
Hello Sir,
I've already done some projects in django but now I want to contribute. I
want to start this by solving some easy bugs, If you suggest some.
Thank you.

On Fri, Sep 7, 2018 at 10:37 AM Andréas Kühne 
wrote:

> Hi,
>
> I think you really should get some experience with writing applications in
> django before you start contributing to the project itself. The django
> project is rather complex and it takes a while to understand the concepts
> behind it. I have been working with django for 5 years now and haven't
> found anything that I would feel comfortable with changing in the project
> itself yet.
>
> Regards,
>
> Andréas
>
>
> Den fre 7 sep. 2018 kl 04:35 skrev Sanjeev Singh <
> sanjeevsinghdevi...@gmail.com>:
>
>> Hello,
>>
>> I’m a beginner want to contribute please help me in
>> solving some easy bugs so that I can get started.
>>
>>
>>
>> Thank you.
>>
>>
>>
>> Sent from Mail  for
>> Windows 10
>>
>>
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/5b91518c.1c69fb81.6db14.affc%40mx.google.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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCeYBZOP9axZF10YnjJtChNT_oQyu1jAtw4KhTM66sS6mw%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Btz_ABAiGGubYQyLJeu5bJbADi%3D9QZ4Zj2Tf%2BQy22eyk5NLLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating a single page app

2018-09-06 Thread Md.iftequar iqbal
Which is the best best frontend js for django


On Fri, 7 Sep 2018, 10:34 am Andréas Kühne, 
wrote:

> Short answer - yes it's possible, but not optimal.
>
> Long answer:
> A single page app isn't really dependent that much on the view that you
> use but rather some sort of javascript frontend. You will need to use a js
> frontend like Vue, React or Angular. The backend should probably then be
> based on a rest framework (django rest framework for example). That way the
> frontend will be able to easily communicate with the backend.
>
> Regards,,
>
> Andréas
>
>
> Den fre 7 sep. 2018 kl 04:35 skrev Md.iftequar iqbal  >:
>
>> Can we create a single page app that performs CRUD(Create, Read, Update,
>> Delete) operations by using class-based views
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/439a3906-bf68-42c3-92c8-9e46023e0858%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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCebhTmRj2c1AkhxToVKVAE-M-Qm2AqNbtLXFtYZNYZAtQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHAmP3ScwKgEpoZv3nbK%3DRbXHAOnhCWCd4Scch7otaT5Vx8atw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Contributing to Django

2018-09-06 Thread Andréas Kühne
Hi,

I think you really should get some experience with writing applications in
django before you start contributing to the project itself. The django
project is rather complex and it takes a while to understand the concepts
behind it. I have been working with django for 5 years now and haven't
found anything that I would feel comfortable with changing in the project
itself yet.

Regards,

Andréas


Den fre 7 sep. 2018 kl 04:35 skrev Sanjeev Singh <
sanjeevsinghdevi...@gmail.com>:

> Hello,
>
> I’m a beginner want to contribute please help me in
> solving some easy bugs so that I can get started.
>
>
>
> Thank you.
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b91518c.1c69fb81.6db14.affc%40mx.google.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCeYBZOP9axZF10YnjJtChNT_oQyu1jAtw4KhTM66sS6mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating a single page app

2018-09-06 Thread Andréas Kühne
Short answer - yes it's possible, but not optimal.

Long answer:
A single page app isn't really dependent that much on the view that you use
but rather some sort of javascript frontend. You will need to use a js
frontend like Vue, React or Angular. The backend should probably then be
based on a rest framework (django rest framework for example). That way the
frontend will be able to easily communicate with the backend.

Regards,,

Andréas


Den fre 7 sep. 2018 kl 04:35 skrev Md.iftequar iqbal :

> Can we create a single page app that performs CRUD(Create, Read, Update,
> Delete) operations by using class-based views
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/439a3906-bf68-42c3-92c8-9e46023e0858%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCebhTmRj2c1AkhxToVKVAE-M-Qm2AqNbtLXFtYZNYZAtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: about createsuperuser

2018-09-06 Thread Ronaldo Mata
Check your urls.py, is it admin registered?

El jue., sept. 6, 2018 10:05 PM,  escribió:

> Check url path in setting.py and restart the server then follow the
> 127.0.0.1/admin/
>
> On Thursday, September 6, 2018 at 4:51:16 AM UTC-7, VIPIN VIPIN wrote:
>>
>> I had already used admin/
>>
>> On Thu, 6 Sep 2018, 5:13 pm ireoluwa fakeye,  wrote:
>>
>>> Put  /admin after 127.0.0.1
>>>
>>> On Thu, 6 Sep 2018, 12:42 VIPIN VIPIN,  wrote:
>>>
 I had created a superuser successfully, but login webpage doesnot
 appear on chrome.

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/d34dd210-91bb-4fcf-adb0-c9151f7e3ec8%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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAO87g10UjO_mW9Dj_Aa9KqrHcCdJ04MY2t59i5mW%3Dxg581t3gQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5af07783-0381-46b5-824f-d3cbb099689a%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP%3DoziRh6mm6hVTzYuhXWC5T5nhYfmgE7BiskD8qbT5j6hhw1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: about createsuperuser

2018-09-06 Thread mm34019
Check url path in setting.py and restart the server then follow the 
127.0.0.1/admin/

On Thursday, September 6, 2018 at 4:51:16 AM UTC-7, VIPIN VIPIN wrote:
>
> I had already used admin/
>
> On Thu, 6 Sep 2018, 5:13 pm ireoluwa fakeye,  > wrote:
>
>> Put  /admin after 127.0.0.1
>>
>> On Thu, 6 Sep 2018, 12:42 VIPIN VIPIN, > 
>> wrote:
>>
>>> I had created a superuser successfully, but login webpage doesnot appear 
>>> on chrome.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com .
>>> To post to this group, send email to django...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/d34dd210-91bb-4fcf-adb0-c9151f7e3ec8%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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAO87g10UjO_mW9Dj_Aa9KqrHcCdJ04MY2t59i5mW%3Dxg581t3gQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5af07783-0381-46b5-824f-d3cbb099689a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Creating a single page app

2018-09-06 Thread Md.iftequar iqbal
Can we create a single page app that performs CRUD(Create, Read, Update, 
Delete) operations by using class-based views

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/439a3906-bf68-42c3-92c8-9e46023e0858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Contributing to Django

2018-09-06 Thread Sanjeev Singh
Hello,
I’m a beginner want to contribute please help me in solving some easy 
bugs so that I can get started.

Thank you.

Sent from Mail for Windows 10

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5b91518c.1c69fb81.6db14.affc%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I display the human readable name of a choice?

2018-09-06 Thread Joel
This is clearly described in the polls application tutorial.
https://docs.djangoproject.com/en/2.1/intro/tutorial01/

On Thu 6 Sep, 2018, 9:38 PM Ousseynou Diop,  wrote:

> Hi friend ,
>
> use this function to display the choices field.
>
> models.py
>
>
> class Article(models.Model):
>
> ARTICLE_CHOICES = (
>
> )
>
>
> status = models.CharField(max_length=120, choices=ARTICLE_CHOICES, )
>
> in your templates
>
> {% article in articles %}
>
> {{artcile.get_status_display}}
>
>
> {% endfor %}
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c308257a-1140-41a8-9ea9-9a051963a242%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA%3Diw__rWAjNixS8VbsLtHQaddmfgLRgmCx73b4uTwYbeg1DaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Subgroups Implementation (from LDAP)

2018-09-06 Thread Mike Dewhirst

On 7/09/2018 12:49 AM, Benjamin SOULAS wrote:

Hi Mike !

The problem is our app have to be able to retrieve a Customer LDAP 
server. So we won't be able to know groups will be into the LDAP server.


To be concise, when we'll set up the app, we'll have to retrieve the 
LDAP groups, insert them in django ORM, then make the link (with a 
table, so a model) between LDAP groups extracted and our App groups


Are you using django-auth with auth-groups and auth-group-permissions?

If it was me, I'd set up all the ldap groups as Django auth-groups and 
preset their permissions. Then all the login backend has to do is check 
that a user's ldap groups haven't changed. If they have changed then I 
would have to adjust the auth-groups accordingly.


If you have ldap subgroups I would flatten them into the smallest 
denominator and make equivalent auth-groups.


If you choose a strategic naming convention you could work it out on the 
fly without needing a mapping table between ldap groups/sub-groups and 
Django auth-groups.





The App permissions will follow the same principle, stored in the 
Django ORM (which is the regular case) and thanks to the app 
(something django admin-like) we will link the permissions to the App 
groups


I don't know how clear I am ...

Kind regards

Benjamin

Le mercredi 5 septembre 2018 23:51:49 UTC+2, Mike Dewhirst a écrit :

On 5/09/2018 11:25 PM, Benjamin SOULAS wrote:
> Hi everyone,
>
> I m not expert at all in Django so it can be a silly question but I
> take the risk:

I'm an expert in nothing!

What about simplifying things by making your groups have smaller
sets of
permisssions and putting users into multiple groups to suit their
roles.


>
> I have to implement *LDAP server* (which work perfectly with
> *django-auth-ldap*, but my question is not related to this
library). I
> was wondering what happens if groups possesses subgroups? Even
if it
> is not handled in the lib, I assume I can override a recursive
> mechanism in order to populate the subgroup in the *auth_group*
table.
>
> BUT my problem is "*How can link subgroups to parent groups*" ?
> Because through */admin* page, If you create a group, you can only
> define its permission and nothing else (which make sens if the
aim is
> to have One level group handling), but if I want to implement
> subgroups, how do you suggest to do it? I found the module
django MPTT
> but does it corresponds to the need? Bur because I already use
DRF +
> Django + Django-auth-LDAP, does its implementation worth it?
>
> I though it was possible, thanks to *custom models* which could
have
> as fields *parent-group* and *subgroup* (and maybe more, still
> thinking about it). Once the model is implemented, should I link my
> *overriden django-auth-ldap code* to map this Django model in
order to
> make the links? Or should I think differently?
>
> Just to be more precise, in my app I will have permissions and
groups
> defined, the aim is, programmatically or through admin interface
make
> also the links between the LDAP groups and my app groups (LDAP
server
> could have every possible trees)
>
> I don't know if it is clear enough, if not, do not hesitate to
ask me
> questions, I really need help actually
>
> Kind regards,
>
> Benjamin.
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from
it, send
> an email to django-users...@googlegroups.com 
> .
> To post to this group, send email to django...@googlegroups.com

> .
> Visit this group at https://groups.google.com/group/django-users
.
> To view this discussion on the web visit
>

https://groups.google.com/d/msgid/django-users/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%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 post to this group, send 

Getting no such table: django_session error after enabling social_django in a project

2018-09-06 Thread Ajat Prabha
Hi,

After adding social_django to this 
 project, in some of the 
pages, the server is throwing OperationalError no such table: 
django_session, which is kind of weird because it is there.
Most of the functionality is working fine but some things like adding an 
object to a model via admin are throwing the error.

There is a middleware 

 
which checks if a User object has an associated UserProfile object, if not 
then it redirects to a page for creating one.
The exception is usually thrown at condition check in the middleware, I 
tried skipping the middleware but the error persists.

I've not been able to identify the cause. Maybe it's the order of 
middleware or something, I can't say. Can someone help regarding this?
Here is the settings.py 

 file 
with the order of middlewares.

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e0cd20c6-aa27-47dd-a983-ff3eda293ae5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get datetime from server

2018-09-06 Thread ireoluwa fakeye
It's better you import from django.util

On Thu, 6 Sep 2018, 17:08 Thiago Luiz Parolin, 
wrote:

> Hi,
> I am building a django system that prevent user from upload a file after a
> date.
> This date is setting using:
> today = datetime.date.today()
>
> but if the user alters his computer date, he can upload file normally
> after the end date.
> how can i assing to 'today', the date from server and not client computer?
>
> Thanks
> --
> Thiago
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANbmKys-Yfc0JeZNaa3uG0hribKrUBN3PDGA-HAegxN2%2BBM69Q%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO87g12zCGsvJDATiJqEayVjNLhfh%2BmG6cKbb4qKE7dBTjdu%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to get datetime from server

2018-09-06 Thread Thiago Luiz Parolin
Hi,
I am building a django system that prevent user from upload a file after a
date.
This date is setting using:
today = datetime.date.today()

but if the user alters his computer date, he can upload file normally after
the end date.
how can i assing to 'today', the date from server and not client computer?

Thanks
-- 
Thiago

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKys-Yfc0JeZNaa3uG0hribKrUBN3PDGA-HAegxN2%2BBM69Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I display the human readable name of a choice?

2018-09-06 Thread Ousseynou Diop
Hi friend ,

use this function to display the choices field.

models.py


class Article(models.Model):
   
ARTICLE_CHOICES = (

)


status = models.CharField(max_length=120, choices=ARTICLE_CHOICES, )

in your templates

{% article in articles %}

{{artcile.get_status_display}}


{% endfor %}

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c308257a-1140-41a8-9ea9-9a051963a242%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get datetime from server

2018-09-06 Thread Thiago Luiz Parolin
Sorry, my mistake!
In manage.py runserver, the server is my computer and the time displayed is
my computer time.
Putting the code in production server all work as expected!


Em qui, 6 de set de 2018 às 10:29, Thiago Luiz Parolin <
thiago.paro...@unesp.br> escreveu:

> Hi,
> I am building a django system that prevent user from upload a file after a
> date.
> This date is setting using:
> today = datetime.date.today()
>
> but if the user alters his computer date, he can upload file normally
> after the end date.
> how can i assing to 'today', the date from server and not client computer?
>
> Thanks
> --
> Thiago
>
>

-- 
Thiago Luiz Parolin

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKysgDgv8URLTL_yXGbcxDSsSKGDh__dHOr5z0pZF4OwxnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Subgroups Implementation (from LDAP)

2018-09-06 Thread Benjamin SOULAS
Hi Mike !

The problem is our app have to be able to retrieve a Customer LDAP server. 
So we won't be able to know groups will be into the LDAP server.

To be concise, when we'll set up the app, we'll have to retrieve the LDAP 
groups, insert them in django ORM, then make the link (with a table, so a 
model) between LDAP groups extracted and our App groups

The App permissions will follow the same principle, stored in the Django 
ORM (which is the regular case) and thanks to the app (something django 
admin-like) we will link the permissions to the App groups

I don't know how clear I am ...

Kind regards

Benjamin

Le mercredi 5 septembre 2018 23:51:49 UTC+2, Mike Dewhirst a écrit :
>
> On 5/09/2018 11:25 PM, Benjamin SOULAS wrote: 
> > Hi everyone, 
> > 
> > I m not expert at all in Django so it can be a silly question but I 
> > take the risk: 
>
> I'm an expert in nothing! 
>
> What about simplifying things by making your groups have smaller sets of 
> permisssions and putting users into multiple groups to suit their roles. 
>
>
> > 
> > I have to implement *LDAP server* (which work perfectly with 
> > *django-auth-ldap*, but my question is not related to this library). I 
> > was wondering what happens if groups possesses subgroups? Even if it 
> > is not handled in the lib, I assume I can override a recursive 
> > mechanism in order to populate the subgroup in the *auth_group* table. 
> > 
> > BUT my problem is "*How can link subgroups to parent groups*" ? 
> > Because through */admin* page, If you create a group, you can only 
> > define its permission and nothing else (which make sens if the aim is 
> > to have One level group handling), but if I want to implement 
> > subgroups, how do you suggest to do it? I found the module django MPTT 
> > but does it corresponds to the need? Bur because I already use DRF + 
> > Django + Django-auth-LDAP, does its implementation worth it? 
> > 
> > I though it was possible, thanks to *custom models* which could have 
> > as fields *parent-group* and *subgroup* (and maybe more, still 
> > thinking about it). Once the model is implemented, should I link my 
> > *overriden django-auth-ldap code* to map this Django model in order to 
> > make the links? Or should I think differently? 
> > 
> > Just to be more precise, in my app I will have permissions and groups 
> > defined, the aim is, programmatically or through admin interface make 
> > also the links between the LDAP groups and my app groups (LDAP server 
> > could have every possible trees) 
> > 
> > I don't know if it is clear enough, if not, do not hesitate to ask me 
> > questions, I really need help actually 
> > 
> > Kind regards, 
> > 
> > Benjamin. 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to django-users...@googlegroups.com  
> > . 
> > To post to this group, send email to django...@googlegroups.com 
>  
> > . 
> > Visit this group at https://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
> > 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c3f81532-95c8-4152-a36e-97eeb68ccb22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Nested Query with Aggregate.Sum()

2018-09-06 Thread Simon Charette
Hello there,

You should be able to achieve what you're after by using annotations[0].

In your case you'll want to declare your Event and Reservation relationship 
explicitly by using
a ForeignKey

class Event(models.Model):
...
seating = models.PositiveIntegerField(default=0)

class Reservation(models.Model):
...
event = models.ForeignKey(Event, related_name='reservations')
seats = models.PositiveIntegerField(default=0)

And perform the following query

Event.objects.annotate(
seats_remaining=F('seating') - Sum('reservations__seats').
)

Cheers,
Simon

[0] 
https://docs.djangoproject.com/en/2.1/topics/db/aggregation/#generating-aggregates-for-each-item-in-a-queryset

Le jeudi 6 septembre 2018 07:42:36 UTC-4, mab.mo...@gmail.com a écrit :
>
>
> QUESTION
>
> I have an application that will make on-line reservations for a series of 
> weekly events. I would like to display the list of upcoming events in an 
> html template with the number of remaining seats available in a single html 
> page. I was able to create views to display the list of upcoming events and 
> another view to display the number of remaining seats available but I am 
> unable to figure out how to nest the two into a single view. Example 
> below...
>
> HTML OUTPUT
>
> Event Title Week 1 - x amount of seats remaining for this event
>
> Event Title Week 2 - x amount of seats remainign for this event
>
> Event Title Week 3 - x amount of seats remaining for this event
>
> and so on 
>
> MODELS
>
> class Events(models.Model):
>event_date = models.DateField(auto_now_add=False)
>event_time = models.TimeField(auto_now_add=False)
>event_type = models.CharField(max_length=20, choices=EVENT_TYPE)
>seating = models.IntegerField(default=0)
>title = models.CharField(max_length=200)
>description = models.TextField()
>menu = models.TextField()
>price = models.DecimalField(max_digits=6, decimal_places=2)
>publish = models.CharField(max_length=1, choices=PUBLISH_CHOICE)
>
>def __int__(self):
>   return self.title
>
> class Reservations(models.Model):
>user_id = models.IntegerField(default=0)
>event_id = models.IntegerField(default=0)
>reservations = models.IntegerField(default=0)
>
>def __int__(self):
>   return self.event
>
>
> VIEWS
>
> def events_view(request):
> 
> events=Events.objects.filter(publish='Y').filter(event_date__gte=datetime.now()).order_by('event_date')
>  
> reservation_count = Reservations.objects.aggregate(Sum('reservations'))
>  
> return render(request, 'restaurant/events.html',{"events":events, 
> "reservation_count":reservation_count, })
>
> def make_reservation_view(request, pk):
>event = Events.objects.get(id=pk)
>seating_available = Events.objects.get(id=pk)
>seating_available = seating_available.seating
>reservation_count = 
> Reservations.objects.filter(event_id=pk).aggregate(res_sum=Sum('reservations'))
>res = reservation_count['res_sum']
>seats_remaining = seating_available - res
>
>return render(request, 'restaurant/make_reservation.html', 
> {"event":event, \
>   
>  "seats_remaining":seats_remaining,})
>
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a2f159c-af8a-4d1d-932d-13bbe40cd1c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to install mysql for pyhton.

2018-09-06 Thread Sunil Kothiyal
Thanks my dear you save my JOB..  pip install --only-binary :all:
mysqlclient  Work for me

On Thu, Sep 6, 2018 at 5:38 PM Rodrigo Zayit  wrote:

> Try:
>
> pip install mysqlclient==1.3.4
>
> and if this command does not work, try it:
>
> pip install --only-binary :all: mysqlclient
>
> Att.,
> Rodrigo de Oliveira
>
>
> On Thu, 6 Sep 2018 at 09:04, Rodrigo Zayit  wrote:
>
>> Have you installed MySQL?
>>
>> Att.,
>> Rodrigo de Oliveira
>>
>>
>> On Thu, 6 Sep 2018 at 09:01, Django Lover 
>> wrote:
>>
>>> *I am getting following error when i am running pip install
>>> mysql-python Comand . Please help??*
>>>
>>>
>>>
>>> [image: asd.png]
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/422f7d21-3414-42d6-a51f-ade57bdc3b4d%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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/ouFLbhk1kio/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL6GM4Joow6dee26P7hACHXfpC28JV8%3D5kvExPz08RZS22axmg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Thanks & Regards,*

*Sunil Kothiyal*

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB%3DWnGfSBdgewXEM_s7fZ2H9Gc5o3YaCwXtTCV3M2zR4_5DoZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to install mysql for pyhton.

2018-09-06 Thread Rodrigo Zayit
Try:

pip install mysqlclient==1.3.4

and if this command does not work, try it:

pip install --only-binary :all: mysqlclient

Att.,
Rodrigo de Oliveira


On Thu, 6 Sep 2018 at 09:04, Rodrigo Zayit  wrote:

> Have you installed MySQL?
>
> Att.,
> Rodrigo de Oliveira
>
>
> On Thu, 6 Sep 2018 at 09:01, Django Lover  wrote:
>
>> *I am getting following error when i am running pip install
>> mysql-python Comand . Please help??*
>>
>>
>>
>> [image: asd.png]
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/422f7d21-3414-42d6-a51f-ade57bdc3b4d%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL6GM4Joow6dee26P7hACHXfpC28JV8%3D5kvExPz08RZS22axmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to install mysql for pyhton.

2018-09-06 Thread Rodrigo Zayit
Have you installed MySQL?

Att.,
Rodrigo de Oliveira


On Thu, 6 Sep 2018 at 09:01, Django Lover  wrote:

> *I am getting following error when i am running pip install
> mysql-python Comand . Please help??*
>
>
>
> [image: asd.png]
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/422f7d21-3414-42d6-a51f-ade57bdc3b4d%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL6GM4Kh6_dFMRzHAZaFtSY3wjGVNWmwqWsKC5gFPz3L69wBSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Not able to install mysql for pyhton.

2018-09-06 Thread Django Lover
*I am getting following error when i am running pip install 
mysql-python Comand . Please help??*



[image: asd.png] 

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/422f7d21-3414-42d6-a51f-ade57bdc3b4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I am not able to install mysql for python.

2018-09-06 Thread Django Lover


*I am getting following error when i am running pip install mysql-python
 Comand . Please help??*



[image: asd.png] 

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bacaac61-3f35-4f2b-bf01-058fcd5a8eb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: about createsuperuser

2018-09-06 Thread VIPIN VIPIN
I had already used admin/

On Thu, 6 Sep 2018, 5:13 pm ireoluwa fakeye,  wrote:

> Put  /admin after 127.0.0.1
>
> On Thu, 6 Sep 2018, 12:42 VIPIN VIPIN,  wrote:
>
>> I had created a superuser successfully, but login webpage doesnot appear
>> on chrome.
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d34dd210-91bb-4fcf-adb0-c9151f7e3ec8%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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAO87g10UjO_mW9Dj_Aa9KqrHcCdJ04MY2t59i5mW%3Dxg581t3gQ%40mail.gmail.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACAC_cCzHqxQPMBdgY5nLEy5qkRYK%2BZniM6hUdDTkg6JVmq3hA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: about createsuperuser

2018-09-06 Thread ireoluwa fakeye
Put  /admin after 127.0.0.1

On Thu, 6 Sep 2018, 12:42 VIPIN VIPIN,  wrote:

> I had created a superuser successfully, but login webpage doesnot appear
> on chrome.
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d34dd210-91bb-4fcf-adb0-c9151f7e3ec8%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO87g10UjO_mW9Dj_Aa9KqrHcCdJ04MY2t59i5mW%3Dxg581t3gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Nested Query with Aggregate.Sum()

2018-09-06 Thread mab . mobile . 01

QUESTION

I have an application that will make on-line reservations for a series of 
weekly events. I would like to display the list of upcoming events in an 
html template with the number of remaining seats available in a single html 
page. I was able to create views to display the list of upcoming events and 
another view to display the number of remaining seats available but I am 
unable to figure out how to nest the two into a single view. Example 
below...

HTML OUTPUT

Event Title Week 1 - x amount of seats remaining for this event

Event Title Week 2 - x amount of seats remainign for this event

Event Title Week 3 - x amount of seats remaining for this event

and so on 

MODELS

class Events(models.Model):
   event_date = models.DateField(auto_now_add=False)
   event_time = models.TimeField(auto_now_add=False)
   event_type = models.CharField(max_length=20, choices=EVENT_TYPE)
   seating = models.IntegerField(default=0)
   title = models.CharField(max_length=200)
   description = models.TextField()
   menu = models.TextField()
   price = models.DecimalField(max_digits=6, decimal_places=2)
   publish = models.CharField(max_length=1, choices=PUBLISH_CHOICE)

   def __int__(self):
  return self.title

class Reservations(models.Model):
   user_id = models.IntegerField(default=0)
   event_id = models.IntegerField(default=0)
   reservations = models.IntegerField(default=0)

   def __int__(self):
  return self.event


VIEWS

def events_view(request):

events=Events.objects.filter(publish='Y').filter(event_date__gte=datetime.now()).order_by('event_date')
 
reservation_count = Reservations.objects.aggregate(Sum('reservations'))
 
return render(request, 'restaurant/events.html',{"events":events, 
"reservation_count":reservation_count, })

def make_reservation_view(request, pk):
   event = Events.objects.get(id=pk)
   seating_available = Events.objects.get(id=pk)
   seating_available = seating_available.seating
   reservation_count = 
Reservations.objects.filter(event_id=pk).aggregate(res_sum=Sum('reservations'))
   res = reservation_count['res_sum']
   seats_remaining = seating_available - res

   return render(request, 'restaurant/make_reservation.html', 
{"event":event, \
  
 "seats_remaining":seats_remaining,})


-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/735e8874-e41b-40c1-859d-263077ce6c9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Online Judge.

2018-09-06 Thread satheesh
You can use third_party api's for compiling the code, instead of spending 
time on this.

https://www.hackerearth.com/docs/wiki/developers/v3/

On Thursday, September 6, 2018 at 12:19:07 PM UTC+5:30, Md. Razibul Hasan 
Mithu wrote:
>
> I want to make an *Online Judge System*. That system runs* C/C++* code 
> and Take output using some inputs. But Problem is how can I run a code *Using 
> Python* Language and take all output especially runtime and memory for 
> making all verdict like *Wrong answer, TLE, MLE. *
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2bc5dff2-5fe0-4ac4-9fbe-41243c199dce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Issue after WAR deployment in Apache Tomcat server

2018-09-06 Thread hari . krishnan


I am using Django 1.8 on Jython in Windows 10. Have created a simple Django 
project following the tutorial 
https://docs.djangoproject.com/en/1.8/intro/tutorial01. After packaging 
using buildwar(including jars), when I deploy the mysite.war archive in 
tomcat, I get an error.
My project name is *mysite*, I have referenced the Jython path in web.xml. 
My project structure is

-mysite
 -WEB-INF
  -lib
   -jruby-extras-fileservlet.jar
   -jython.jar
  -lib-python
   -django
   -doj
   -polls
   -application_settingspy.class
   -application_settings.py
   -eggs.pth
  -web.xml
 -wsgi

Error is

Traceback (most recent call last):
  File "D:\jython27\Lib\modjy\modjy.py", line 80, in service
self.exc_handler.handle(req, resp, wsgi_environ, mx, (typ, value, tb) )
  File "D:\jython27\Lib\modjy\modjy.py", line 76, in service
self.dispatch_to_application(req, resp, wsgi_environ)
  File "D:\jython27\Lib\modjy\modjy.py", line 92, in dispatch_to_application
app_callable = self.get_app_object(req, environ)
  File "D:\jython27\Lib\modjy\modjy_publish.py", line 68, in get_app_object
return self.get_app_object_old_style(req, environ)
  File "D:\jython27\Lib\modjy\modjy_publish.py", line 120, in
get_app_object_old_style
return self.load_object(source_filename, callable_name)
  File "D:\jython27\Lib\modjy\modjy_publish.py", line 142, in load_object
self.raise_exc(NoCallable, "Error loading jython callable '%s': %s" %  
(callable_name, str(x)) )
  File "D:\jython27\Lib\modjy\modjy.py", line 121, in raise_exc
raise exc_class(message)
modjy.modjy_exceptions.NoCallable: Error loading jython callable 'application': 
No module named mysite

The application_settings file shows:

from mysite.settings import *
CONTEXT_ROOT = "mysite"


How to solve this issue? 

-- 



**DISCLAIMER**




 



This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION

intended Solely for the use of the addressee(s).If you are not the intended

Recipient, Please notify the sender by e-mail and delete the original 
message.
Further , you are not to copy, disclose, or distribute this e-mail 
or its
contents to any other person and any such actions are unlawful. This 
e-mail may
contain Viruses. Tekplay Systems Limited has taken every 
reasonable precaution
to minimize the risk, but is not liable for any 
damage you may sustain as a
result of any virus in this e-mail. You should 
carry out your own virus checks
before opening the e-mail or attachment. 




 



Tekplay systems Limited reserves the right to monitor and
review the 
content of all messages sent to or from this e-mail address.
Messages sent 
to or from this e-mail address may be stored on the Tekplay
systems Limited 
e-mail system. 



 




*End
of 
Disclaimer

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/37fd04b7-4794-4dea-8413-f695a327b4bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


about createsuperuser

2018-09-06 Thread VIPIN VIPIN
I had created a superuser successfully, but login webpage doesnot appear on 
chrome.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d34dd210-91bb-4fcf-adb0-c9151f7e3ec8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: using extends more than once

2018-09-06 Thread Andréas Kühne
Short answer:
You can't - at least not with extends. Extends is for one base template to
be used for all default things you need on a HTML template.

Long answer:
You can include templates in another template. If you have one template and
you need to include other templates in that template then you can use the
include template tag:
https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#include

However you can only include templates and not views

Regards,

Andréas


Den tors 6 sep. 2018 kl 04:35 skrev Rootz :

> Can a child template have more than one parent template?
> I am using the the latest release for Django and I have several template
> to include
> in the one template file. How can I do so using template inheritance
> (using the default django template api) ?
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5110b6a9-6b53-4a7d-b235-34e967de4361%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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCeNXMgoBrmnaatOMSYQ0JFA2OSiX%3DWR_o3bGqnZGq9eoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: From old-school Post/Redirect/Get to modern web (2018)

2018-09-06 Thread guettli
Up to now your customers keep us busy with new ideas. We even hardly 
advertise our products :-)

I was talking to a JS expert. He likes the react framework. Now there are 
four frameworks to evaluate ...

Regards,
  Thomas

Am Mittwoch, 5. September 2018 12:59:54 UTC+2 schrieb Jason:
>
> Yeah, I get what you mean.  Used to work at a Java shop using Google Web 
> Toolkit to build their web application, and it was ok.  Until you tried to 
> do something that GWT didn't like and had to figure workarounds.  The 
> reason GWT was picked was everyone in the company knew Java, and not JS.  
> That worked until the issues with GWT couldn't be papered over any longer, 
> and they started porting parts over to Angular, which required some people 
> to become familiar with JS.  That was on-the-job training.
>
> Sounds like you really have two options: 
>
>1. Hire a competent FE dev to work with your team for the frontend and 
>incorporate migrating your existing code to a RESTful API (with DRF, this 
>isn't too big a deal), or
>2. Assign a volunteer (or just tell someone) to get familiar with JS 
>and evaluate angular, vue or react for your needs and become the in-house 
>expert.
>
> Either way, its a significant investment in time and money because the 
> team lacks the skills required.  But it is an important skill to have in 
> the web dev world and you really do risk being left behind without it.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9bc6e694-0195-47f8-b43f-c2a777f3878c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Online Judge.

2018-09-06 Thread Md. Razibul Hasan Mithu
I want to make an *Online Judge System*. That system runs* C/C++* code and 
Take output using some inputs. But Problem is how can I run a code *Using 
Python* Language and take all output especially runtime and memory for 
making all verdict like *Wrong answer, TLE, MLE. *

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7713444e-6815-42ef-85a1-e40efdd34d13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.