Re: hello forks, i need help

2023-08-17 Thread ivan harold
https://www.w3schools.com/django/django_admin_include_members.php
explore the site maybe what you are ooking for is in there 
check this one. 

On Thursday, August 17, 2023 at 11:53:00 AM UTC-5 Abdoulaye SENE wrote:

> the problem is i don't see users  in admin.i only see groups. do not know 
> why.
>
>
> Le jeu. 17 août 2023 à 16:48, Abdoulaye SENE  a 
> écrit :
>
>> thanks a lot
>>
>>
>> Le jeu. 17 août 2023 à 16:38, ivan harold  a 
>> écrit :
>>
>>> https://www.w3schools.com/django/django_admin_create_user.php 
>>> check this one out.
>>>
>>> On Thursday, August 17, 2023 at 8:26:29 AM UTC-5 Abdoulaye SENE wrote:
>>>
 i have created a group named adminis. how to create users in the group 
 using django admin

 -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/78b972b4-dee8-4a69-bc40-fd804f3dc4d3n%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/5a1d8fa0-8eeb-4502-a9dc-b6b3abbfe3f0n%40googlegroups.com.


Re: hello forks, i need help

2023-08-17 Thread Abdoulaye SENE
the problem is i don't see users  in admin.i only see groups. do not know
why.


Le jeu. 17 août 2023 à 16:48, Abdoulaye SENE 
a écrit :

> thanks a lot
>
>
> Le jeu. 17 août 2023 à 16:38, ivan harold  a
> écrit :
>
>> https://www.w3schools.com/django/django_admin_create_user.php
>> check this one out.
>>
>> On Thursday, August 17, 2023 at 8:26:29 AM UTC-5 Abdoulaye SENE wrote:
>>
>>> i have created a group named adminis. how to create users in the group
>>> using django admin
>>>
>>> --
>> You received this message because you are 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/78b972b4-dee8-4a69-bc40-fd804f3dc4d3n%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/CAK9RMT3MKx9FZ7uwUwLndMgEoPYb3W8a7Otn0zTGUGWaK9G88w%40mail.gmail.com.


Re: hello forks, i need help

2023-08-17 Thread Abdoulaye SENE
thanks a lot


Le jeu. 17 août 2023 à 16:38, ivan harold  a
écrit :

> https://www.w3schools.com/django/django_admin_create_user.php
> check this one out.
>
> On Thursday, August 17, 2023 at 8:26:29 AM UTC-5 Abdoulaye SENE wrote:
>
>> i have created a group named adminis. how to create users in the group
>> using django admin
>>
>> --
> You received this message because you are 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/78b972b4-dee8-4a69-bc40-fd804f3dc4d3n%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/CAK9RMT2DRKUkiVUufEzcya%3Dh91%2BMfQuQS%2BLQhcy5J2XTG406Sw%40mail.gmail.com.


Re: hello forks, i need help

2023-08-17 Thread ivan harold
https://www.w3schools.com/django/django_admin_create_user.php 
check this one out.

On Thursday, August 17, 2023 at 8:26:29 AM UTC-5 Abdoulaye SENE wrote:

> i have created a group named adminis. how to create users in the group 
> using django admin
>
>

-- 
You received this message because you are 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/78b972b4-dee8-4a69-bc40-fd804f3dc4d3n%40googlegroups.com.


hello forks, i need help

2023-08-17 Thread Abdoulaye SENE
i have created a group named adminis. how to create users in the group 
using django admin

-- 
You received this message because you are 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/45e78c82-e392-4a3e-83ec-a0e2d7189f3fn%40googlegroups.com.


Re: Please i need help in creating a Login page with Django

2023-01-20 Thread Aditi Dwivedi
You have to first create a superuser in your django project.
It is same as creating a root user in Linux or admin user in windows.
Super user can be created as..
1. Run command in django terminal
 Python manage.py createsuperuser


2. It will ask for user name, emai and password.

3. Run command
Python manage.py runserver.


Hope this helps.

On Thu, 19 Jan 2023, 6:51 pm Radhika Soni,  wrote:

> Hello,
> You can take help from udemy or coursera courses.
>
> On Thu, Jan 19, 2023, 4:36 PM Hubert Kanyamahanga 
> wrote:
>
>> Please share what you have been able to do, where you are blocked and
>> from there we can guide you, because, we don't even know which videos you
>> have been viewing!
>>
>> On Wednesday, January 18, 2023 at 11:56:45 PM UTC+1 macca...@gmail.com
>> wrote:
>>
>>> I am trying everything possible to create a basic login page with
>>> Django., i have tried so many videos and online tutorial, but still can't
>>> make anything meaningful out of it. Can anyone please take me through a
>>> systematic process please, since i am new here and want to take Django to
>>> be my friend
>>
>> --
>> You received this message because you are 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/61f6c9f9-2973-4572-ae51-8689d6521292n%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/CAGhU6zNsAmutLvJRFdHMPOU8ZKS4Oywha%2B%3DoOWkKAUw4tsh61A%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/CAHBdd%2BAnpzf1N7VxS7Ue4OdEtzBzUTDf%3DizDmRkwA7xfvpdcZA%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread M Adnan
Join this group to discuss your issues with developers link below ,


https://chat.whatsapp.com/ICXdXOrbgoNFQTbKxalZD1

On Thu, 19 Jan 2023, 6:21 pm Radhika Soni,  wrote:

> Hello,
> You can take help from udemy or coursera courses.
>
> On Thu, Jan 19, 2023, 4:36 PM Hubert Kanyamahanga 
> wrote:
>
>> Please share what you have been able to do, where you are blocked and
>> from there we can guide you, because, we don't even know which videos you
>> have been viewing!
>>
>> On Wednesday, January 18, 2023 at 11:56:45 PM UTC+1 macca...@gmail.com
>> wrote:
>>
>>> I am trying everything possible to create a basic login page with
>>> Django., i have tried so many videos and online tutorial, but still can't
>>> make anything meaningful out of it. Can anyone please take me through a
>>> systematic process please, since i am new here and want to take Django to
>>> be my friend
>>
>> --
>> You received this message because you are 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/61f6c9f9-2973-4572-ae51-8689d6521292n%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/CAGhU6zNsAmutLvJRFdHMPOU8ZKS4Oywha%2B%3DoOWkKAUw4tsh61A%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/CABNyTSpXT57HOuVSWcmLk1NxSyq9F8hsZPYiWY0CtSRzk_2KpQ%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread ritik sahoo
Ofcourse

On Thu, 19 Jan, 2023, 7:40 pm Sebastian Jung, 
wrote:

> I think this is a good start or?
>
> https://github.com/earthcomfy/Django-registration-and-login-system
>
> Namanya Daniel  schrieb am Do., 19. Jan. 2023,
> 15:00:
>
>> Explain where you’re failing exactly, is it views, forms, templates or
>> models
>>
>> On Thu, 19 Jan 2023 at 01:56, Michael R. KOOMSON 
>> wrote:
>>
>>> I am trying everything possible to create a basic login page with
>>> Django., i have tried so many videos and online tutorial, but still can't
>>> make anything meaningful out of it. Can anyone please take me through a
>>> systematic process please, since i am new here and want to take Django to
>>> be my friend
>>>
>>> --
>>> You received this message because you are 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/0c495fc8-ce4e-4d6f-a2d7-7b2d8478b06an%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/CAP4VW2V%3DuVe2p%3DCQJBWup%3DDcn4FGs5dLFp-zGEqXLQK6xwD6VQ%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/CAKGT9mxg9yy3OXojtu67UUSADUbrpYe%2B%2BQT2aFBW6h2tKMGN7w%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/CAJwehCs8e4sZ9wGOoqq_8pA_OS6D%2BQgww2%2B9VvLgtwkV%3DoBWag%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread Sebastian Jung
I think this is a good start or?

https://github.com/earthcomfy/Django-registration-and-login-system

Namanya Daniel  schrieb am Do., 19. Jan. 2023,
15:00:

> Explain where you’re failing exactly, is it views, forms, templates or
> models
>
> On Thu, 19 Jan 2023 at 01:56, Michael R. KOOMSON 
> wrote:
>
>> I am trying everything possible to create a basic login page with
>> Django., i have tried so many videos and online tutorial, but still can't
>> make anything meaningful out of it. Can anyone please take me through a
>> systematic process please, since i am new here and want to take Django to
>> be my friend
>>
>> --
>> You received this message because you are 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/0c495fc8-ce4e-4d6f-a2d7-7b2d8478b06an%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/CAP4VW2V%3DuVe2p%3DCQJBWup%3DDcn4FGs5dLFp-zGEqXLQK6xwD6VQ%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/CAKGT9mxg9yy3OXojtu67UUSADUbrpYe%2B%2BQT2aFBW6h2tKMGN7w%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread Namanya Daniel
Explain where you’re failing exactly, is it views, forms, templates or
models

On Thu, 19 Jan 2023 at 01:56, Michael R. KOOMSON 
wrote:

> I am trying everything possible to create a basic login page with Django.,
> i have tried so many videos and online tutorial, but still can't make
> anything meaningful out of it. Can anyone please take me through a
> systematic process please, since i am new here and want to take Django to
> be my friend
>
> --
> You received this message because you are 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/0c495fc8-ce4e-4d6f-a2d7-7b2d8478b06an%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/CAP4VW2V%3DuVe2p%3DCQJBWup%3DDcn4FGs5dLFp-zGEqXLQK6xwD6VQ%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread ritik sahoo
If u will follow geekyshows channel on YouTube your basic must be cleared


On Thu, 19 Jan, 2023, 6:51 pm Radhika Soni,  wrote:

> Hello,
> You can take help from udemy or coursera courses.
>
> On Thu, Jan 19, 2023, 4:36 PM Hubert Kanyamahanga 
> wrote:
>
>> Please share what you have been able to do, where you are blocked and
>> from there we can guide you, because, we don't even know which videos you
>> have been viewing!
>>
>> On Wednesday, January 18, 2023 at 11:56:45 PM UTC+1 macca...@gmail.com
>> wrote:
>>
>>> I am trying everything possible to create a basic login page with
>>> Django., i have tried so many videos and online tutorial, but still can't
>>> make anything meaningful out of it. Can anyone please take me through a
>>> systematic process please, since i am new here and want to take Django to
>>> be my friend
>>
>> --
>> You received this message because you are 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/61f6c9f9-2973-4572-ae51-8689d6521292n%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/CAGhU6zNsAmutLvJRFdHMPOU8ZKS4Oywha%2B%3DoOWkKAUw4tsh61A%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/CAJwehCs3jF8TF5q%2BqY7XvWafPCprs8EtVcUA2oMLvcSUsumsJw%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread Radhika Soni
Hello,
You can take help from udemy or coursera courses.

On Thu, Jan 19, 2023, 4:36 PM Hubert Kanyamahanga 
wrote:

> Please share what you have been able to do, where you are blocked and from
> there we can guide you, because, we don't even know which videos you have
> been viewing!
>
> On Wednesday, January 18, 2023 at 11:56:45 PM UTC+1 macca...@gmail.com
> wrote:
>
>> I am trying everything possible to create a basic login page with
>> Django., i have tried so many videos and online tutorial, but still can't
>> make anything meaningful out of it. Can anyone please take me through a
>> systematic process please, since i am new here and want to take Django to
>> be my friend
>
> --
> You received this message because you are 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/61f6c9f9-2973-4572-ae51-8689d6521292n%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/CAGhU6zNsAmutLvJRFdHMPOU8ZKS4Oywha%2B%3DoOWkKAUw4tsh61A%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread Hubert Kanyamahanga
Please share what you have been able to do, where you are blocked and from 
there we can guide you, because, we don't even know which videos you have 
been viewing!

On Wednesday, January 18, 2023 at 11:56:45 PM UTC+1 macca...@gmail.com 
wrote:

> I am trying everything possible to create a basic login page with Django., 
> i have tried so many videos and online tutorial, but still can't make 
> anything meaningful out of it. Can anyone please take me through a 
> systematic process please, since i am new here and want to take Django to 
> be my friend

-- 
You received this message because you are 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/61f6c9f9-2973-4572-ae51-8689d6521292n%40googlegroups.com.


Please i need help in creating a Login page with Django

2023-01-18 Thread Michael R. KOOMSON
I am trying everything possible to create a basic login page with Django., 
i have tried so many videos and online tutorial, but still can't make 
anything meaningful out of it. Can anyone please take me through a 
systematic process please, since i am new here and want to take Django to 
be my friend

-- 
You received this message because you are 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/0c495fc8-ce4e-4d6f-a2d7-7b2d8478b06an%40googlegroups.com.


Re: hello guys I need help

2022-08-30 Thread Rotimi Michael james
my name is engr rotimi michael james , i think i can help you please just
make the model  one to one relations , that is  one user to a page and a
page to one user, hope it help.

On Mon, Aug 29, 2022 at 3:06 PM ISTEEN ISAC  wrote:

> I am beginner ,  how to redirect different types of pages to different
> users after login in django
> 
>  ?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/90a18a68-d66f-44d9-82e5-4498fa6c5fcen%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/CAKbLKW3_q1ZaOO47mc9X%2B%3D8dUJ4rSCF9Z3C-S2VP8n4WLFiSAw%40mail.gmail.com.


Re: hello guys I need help

2022-08-30 Thread Baber Ibrar
Please share your query
On Monday, August 29, 2022 at 9:02:05 PM UTC+5 bod...@gmail.com wrote:

> please I'm a starter on python and django, i need some to help me with an 
> online class training. 
>
> Thank 
> Moses 
>
> On Monday, August 29, 2022 at 3:06:26 PM UTC+1 istee...@gmail.com wrote:
>
>> I am beginner ,  how to redirect different types of pages to different 
>> users after login in django 
>> 
>>  ?  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b3a67b4-4a3f-46cd-a145-0fde34c6e2a1n%40googlegroups.com.


Re: hello guys I need help

2022-08-30 Thread Joshua Oriakhi
Hello Bode.
When you say different types of pages what do you mean?

Do you mean you want users to see pages specific to them?

For instance, if my name is Joshua, you want me to see a page with my name
and if your name is Bode, you want me to see a page with your name. Is this
what you mean?

On Mon, 29 Aug 2022, 17:02 bode moses,  wrote:

> please I'm a starter on python and django, i need some to help me with an
> online class training.
>
> Thank
> Moses
>
> On Monday, August 29, 2022 at 3:06:26 PM UTC+1 istee...@gmail.com wrote:
>
>> I am beginner ,  how to redirect different types of pages to different
>> users after login in django
>> 
>>  ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c5ea9827-410c-4d05-bb6c-2a7e4b875f27n%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/CAMSS1fDJHOtC3o5K30mi9aOAETtHBeH%3D1ZTdFUbCqECo1DSGbQ%40mail.gmail.com.


Re: hello guys I need help

2022-08-29 Thread bode moses
please I'm a starter on python and django, i need some to help me with an 
online class training. 

Thank 
Moses 

On Monday, August 29, 2022 at 3:06:26 PM UTC+1 istee...@gmail.com wrote:

> I am beginner ,  how to redirect different types of pages to different 
> users after login in django 
> 
>  ?  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c5ea9827-410c-4d05-bb6c-2a7e4b875f27n%40googlegroups.com.


hello guys I need help

2022-08-29 Thread ISTEEN ISAC
I am beginner ,  how to redirect different types of pages to different 
users after login in django 

 ?  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/90a18a68-d66f-44d9-82e5-4498fa6c5fcen%40googlegroups.com.


Re: I need help with saving data to django database.

2022-08-17 Thread Anh Nguyen
Problem is you try to use sth you can’t control it.
You should not modify admin page. Try to create a new one as your
knowledge. That way keep you learn and stay away unpredictable issues.
On Wed, 17 Aug 2022 at 20:02 Paul Kudla (SCOM.CA Internet Services Inc.) <
p...@scom.ca> wrote:

>
> ok i had a hudge problem when writing my invoice system
>
> in general you need to over ride the save defination in the admin and
> models.py files
>
> this was never clearly documented in django.
>
>
> I use inlines so the code gets really complicated really quickly
>
> i have given my code you will need to muddle through it to do your own
> thing.
>
> my code was designed to run inlines, update an invoice number from
> another form, do the math, taxes etc etc etc
>
> it also interfaces to a customer database (kinda required for repeat
> invoices)
>
> i did everything in admin but you should look at the models override for
> other stuff :
>
> class InvoiceAdmin(admin.ModelAdmin):
>
> class Invoice_Items_Inline(admin.TabularInline):
> model = Invoice_Items
> extra = 1
>
> class Invoice_Payment_Inline(admin.TabularInline):
> model = Invoice_Payment
> extra = 1
>
> formfield_overrides = {
> models.CharField: {'widget':
> TextInput(attrs={'size':'40','style':
> 'height: 1em;'})},
> models.TextField: {'widget': Textarea(attrs={'rows':1,
> 'cols':40,'style': 'height: 2em;'})},
> }
>
> def customer_name_sold_to(self, obj):
> if (obj.sold_to):
> return obj.sold_to.customer_name
> return None
> customer_name_sold_to.short_description = "Sold To"
>
> def attention_sold_to(self, obj):
> if (obj.sold_to):
> return obj.sold_to.attention_to
> return None
> attention_sold_to.short_description = "Attention to"
>
> def getinvoicebody(self, obj):
>
>
> return None
>
>
> def attention_ship_to(self, obj):
> if (obj.ship_to):
> return obj.ship_to.attention_to
> return None
> attention_ship_to.short_description = "Attention to"
>
>
> def invoice_paid_total(self,obj) :
> obj.paid_total = float(0.00)
> try :
> record = Invoice_Payment.objects.all().filter(
> payment_item = '%s'
> %obj.invoice_number )
> for nn in range (0,len(record)) : #start the update
> paid_total = float(paid_total) +
> float(record[nn].cashbook_amount)
>
> except : pass #No entries found against this invoice
>
> return obj.paid_total
>
> attention_ship_to.short_description = "Attention to"
>
> def Print_Invoice(modeladmin, request, queryset) :
> queryset.update(printed=True)
>
> Print_Invoice.short_description = "Print Invoice(s)"
>
>
> actions = [Print_Invoice]
>
> #('attention_sold_to','attention_ship_to'),
>
> fieldsets = [
> ('Info', {'fields':
> [('invoice_number','invoice_date'),('sold_to','ship_to',),('purchase_order','terms','currency_type','delivery_type','foreign_account',)]}),
>
> #,('sold_to_address',)
> ('#inline', {
> 'fields': (),
> 'description': 0
> }),
> ('Details', {'fields':
>
> [('sub_total'),('gst_tax_exempt','gst_tax_value','gst_tax_amount'),('hst_tax_exempt','hst_tax_value','hst_tax_amount'),('pst_tax_exempt','pst_tax_value','pst_tax_amount'),('invoice_total'),]}),
> ('#inline', {
> 'fields': (),
> 'description': 1
> }),
> ('Status', {'fields':
> [('ar_owing','printed','faxed','emailed','new_invoice'), ]}),
> ]
>
>
> inlines = [Invoice_Items_Inline, Invoice_Payment_Inline, ]
> reorder_inlines = True
> list_display = ('invoice_number',
>
> 'invoice_date','customer_name_sold_to','body_search','sub_total','hst_tax_amount','invoice_total','invoice_paid_total','ar_owing')
>
> search_fields = search_with_fk(['^invoice_number',
>  'body_search',
> ])
>
>
> #readonly_fields = ('sold_to_address','ship_to_address')
>
> date_hierarchy = 'invoice_date'
> ordering = ('-invoice_date','-invoice_number_sort','ar_owing')
>
> list_per_page = 100
>
> index = True
>
> adminextra_fields = [
> ('m21', 'sold_to', Contacts_Admin.list_display),
> #('fkd', 'sold_to_address', ('sold_to',)),
> ('m21', 'ship_to', Contacts_Admin.list_display),
> #('fkd', 'ship_to_address', ('ship_to',)),
> ]
>
> def save_model(self, request, obj, form, change): #This wi

Re: I need help with saving data to django database.

2022-08-17 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



ok i had a hudge problem when writing my invoice system

in general you need to over ride the save defination in the admin and 
models.py files


this was never clearly documented in django.


I use inlines so the code gets really complicated really quickly

i have given my code you will need to muddle through it to do your own 
thing.


my code was designed to run inlines, update an invoice number from 
another form, do the math, taxes etc etc etc


it also interfaces to a customer database (kinda required for repeat 
invoices)


i did everything in admin but you should look at the models override for 
other stuff :


class InvoiceAdmin(admin.ModelAdmin):

class Invoice_Items_Inline(admin.TabularInline):
model = Invoice_Items
extra = 1

class Invoice_Payment_Inline(admin.TabularInline):
model = Invoice_Payment
extra = 1

formfield_overrides = {
		models.CharField: {'widget': TextInput(attrs={'size':'40','style': 
'height: 1em;'})},
		models.TextField: {'widget': Textarea(attrs={'rows':1, 
'cols':40,'style': 'height: 2em;'})},

}

def customer_name_sold_to(self, obj):
if (obj.sold_to):
return obj.sold_to.customer_name
return None
customer_name_sold_to.short_description = "Sold To"

def attention_sold_to(self, obj):
if (obj.sold_to):
return obj.sold_to.attention_to
return None
attention_sold_to.short_description = "Attention to"

def getinvoicebody(self, obj):


return None


def attention_ship_to(self, obj):
if (obj.ship_to):
return obj.ship_to.attention_to
return None
attention_ship_to.short_description = "Attention to"  


def invoice_paid_total(self,obj) :
obj.paid_total = float(0.00)
try :
			record = Invoice_Payment.objects.all().filter( payment_item = '%s' 
%obj.invoice_number )

for nn in range (0,len(record)) : #start the update
paid_total = float(paid_total) + 
float(record[nn].cashbook_amount)

except : pass #No entries found against this invoice

return obj.paid_total

attention_ship_to.short_description = "Attention to"  

def Print_Invoice(modeladmin, request, queryset) :
queryset.update(printed=True)

Print_Invoice.short_description = "Print Invoice(s)"


actions = [Print_Invoice]   

#('attention_sold_to','attention_ship_to'),

fieldsets = [
	('Info', {'fields': 
[('invoice_number','invoice_date'),('sold_to','ship_to',),('purchase_order','terms','currency_type','delivery_type','foreign_account',)]}), 
#,('sold_to_address',)

('#inline', {
'fields': (),
'description': 0
}),
	('Details', {'fields': 
[('sub_total'),('gst_tax_exempt','gst_tax_value','gst_tax_amount'),('hst_tax_exempt','hst_tax_value','hst_tax_amount'),('pst_tax_exempt','pst_tax_value','pst_tax_amount'),('invoice_total'),]}),

('#inline', {
'fields': (),
'description': 1
}),
	('Status', {'fields': 
[('ar_owing','printed','faxed','emailed','new_invoice'), ]}),

]


inlines = [Invoice_Items_Inline, Invoice_Payment_Inline, ]  
reorder_inlines = True
	list_display = ('invoice_number', 
'invoice_date','customer_name_sold_to','body_search','sub_total','hst_tax_amount','invoice_total','invoice_paid_total','ar_owing')


search_fields = search_with_fk(['^invoice_number',
'body_search',
])


#readonly_fields = ('sold_to_address','ship_to_address')

date_hierarchy = 'invoice_date'
ordering = ('-invoice_date','-invoice_number_sort','ar_owing')

list_per_page = 100

index = True

adminextra_fields = [
('m21', 'sold_to', Contacts_Admin.list_display),
#('fkd', 'sold_to_address', ('sold_to',)),
('m21', 'ship_to', Contacts_Admin.list_display),
#('fkd', 'ship_to_address', ('ship_to',)),
]

def save_model(self, request, obj, form, change): #This will save create
#Check to see if this will be an invoice copy
copy = False
current_invoice = obj.invoice_number
		if obj.new_invoice :	#clear the flag and save the current object then 
set new & date

obj.new_invoice = False
obj.save()
  

I need help with saving data to django database.

2022-08-16 Thread Viando Donwasta
Hi,
May I get help with this project? I am new to Django. Below is my view and 
model for your review.


class Invoice(models.Model):

InvoiceNo = ShortUUIDField(length=16,
prefix="GN_",
alphabet="1234567890",
primary_key=True,
)
InvoiceDate = models.DateField(default=datetime.now, blank=True)
Account = models.CharField(max_length=50, blank=True)
PaymentDueDate = models.DateField(default=datetime.now, blank=True)
Location  = models.ForeignKey(Location, on_delete=models.DO_NOTHING, 
blank=True, default=1)
   # Product  = models.ForeignKey(Product, on_delete=models.DO_NOTHING)
Test = models.ManyToManyField("Products", blank=True, 
related_name="products")
Address   = models.ForeignKey(Address, on_delete=models.DO_NOTHING)
#Quantity = models.IntegerField(blank=True, default=1)
Tax = models.IntegerField(default =0)
SubTotal = models.DecimalField(blank=True, 
null=True,decimal_places=2,max_digits=10)
Total = models.DecimalField(blank=True, 
null=True,decimal_places=2,max_digits=10)
#Ful = models.FloatField(blank=True)

def save(self, *args, **kwargs):
#rate = Product.objects.get(pk=self.Product.id 
)
test = Products.objects.all()
total = 0
for my in test:
total +=  my.SubTotal
self.SubTotal = total
self.Total = self.SubTotal + self.Tax
#self.Total = Sum(self.Total) + Sum( self.SubTotal)
super(Invoice, self).save(*args, **kwargs)

# @property
# def PerformSub(self):
#  myval = self.Quantity * self.Product.Price
#  return myval

# @property
# def PerformCal(self):
# self.Total = self.SubTotal + self.Tax

# def __str__(self):
# return self.InvoiceNo




class Products(models.Model):
ProductDate = models.DateField(default=datetime.now, blank=True)
Title = models.CharField(max_length=50, blank=True)
Description = models.CharField(max_length=150, blank=True)
Sku = models.CharField(max_length=50, blank=True)
Price = models.FloatField(blank=True)
Quantity = models.IntegerField(blank=True, default=1)
SubTotal = models.DecimalField(blank=True, 
null=True,decimal_places=2,max_digits=10)
SalesPrice = models.CharField(max_length=50, blank=True)


def save(self, *args, **kwargs):
   # rate = Products.objects.get(pk=self.Product.id 
)
self.SubTotal = self.Price * self.Quantity
super(Products, self).save(*args, **kwargs)


def __str__(self):
return self.Title + "" + self.Description


class InvoiceForm(ModelForm):
class Meta:
model = Invoice
fields = ['InvoiceNo', 'InvoiceDate', 'Account','PaymentDueDate', 
'Location','Test', 'Address', 'Tax', 'SubTotal', 'Total'
]



Here is my view. Any help will be much appreciated thank you .





def dashboard(request):

# forms = admin.get_form(invoices, res)
location = Location.objects.all()
address = Address.objects.all()
products = Products.objects.all()
form = InvoiceForm()
# invoice = Invoice.objects.all()
# invoice = get_object_or_404(Invoice)

if request.method == 'POST':
form = InvoiceForm(request.POST)
if form.is_valid():
# myinvoice = form.save(commit=False)

print("test")

invoiceTest = form.save(commit=True)



invoice = Invoice()
invoice.InvoiceNo = form.cleaned_data['InvoiceNo']
invoice.InvoiceDate = form.cleaned_data['InvoiceDate']
invoice.Account = form.cleaned_data['Account']
invoice.PaymentDueDate = form.cleaned_data['PaymentDueDate']
invoice.Location = form.cleaned_data['Location']
invoice.Test =  form.cleaned_data['Test']
invoice.Tax = form.cleaned_data['Tax']
invoice.SubTotal = form.cleaned_data['SubTotal']
invoice.Total = form.cleaned_data['Total']




invoiceTest.save()
# invoice.save_m2m()

# print(invoiceForm)




# invoice = 
Invoice(InvoiceNo=InvoiceNo,InvoiceDate=InvoiceDate,Account=Account,PaymentDueDate=PaymentDueDate,Location=mylocation,Tax=Tax,SubTotal=SubTotal,Total=Total)
# invoice.save()


return HttpResponseRedirect('index')


else:
form = InvoiceForm()
# return redirect('dashboard')
return render(request, 'pages/dashboard.html', { "form" :form , 
'Location': location, 'Address': address, 'Products': products})

-- 
You received this message because you are 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/59e95c89-1d77-4a61-9d1e-bd7846ca3c35n%40googlegroups.com.


I need help with getting latest object after filtering

2021-05-10 Thread Francis Akabo
Hi Everyone!
I am working on a project that is supposed to allow users to transfer files 
amongst each other. A transferred file can only be viewed by the user to 
whom the file has been transferred or an is_staff account.

*My Model*
class File(models.Model):
TYPES = (
('GENERAL', 'General'),
('PERSONAL', 'Personal'),
)
type = models.CharField(max_length=10, choices=TYPES, default='Personal')
no = models.CharField(max_length=250, unique=True, null=True)
name = models.CharField(max_length=250, unique=True, null=True)
created = models.DateTimeField(auto_now_add=True, null=True)
updated = models.DateTimeField(auto_now=True)
class Meta:
ordering = ('-created',)

def __str__(self):
return f'{self.no}'

def get_absolute_url(self):
return reverse('outgoing_file', args=[self.pk])

class Transfer(models.Model):
STATES = (
('OUTGOING', 'Outgoing'),
('INCOMING', 'Incoming'),
)
file = models.ForeignKey('File', on_delete=models.CASCADE, 
related_name='transfers')
state = models.CharField(max_length=10, choices=STATES, 
default='Outgoing')
file_from = models.ForeignKey(User, on_delete=models.SET_NULL, 
null=True, related_name='transfers_from')
file_to = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, 
related_name='transfers_to')
recipient_name = models.CharField(max_length=250)
incoming_date = models.DateTimeField(auto_now=True)
due_date = models.DateTimeField(default=due_date(), null=True)
updated = models.DateTimeField(auto_now=True)
def __str__(self):
return f'{self.file_from} {self.file_to}'

*My Views*
@login_required
def outgoing_file_list(request):
if request.user.is_staff:
files = File.objects.all()
else:
files = File.objects.filter(transfers__file_to_id=request.user.id)

context = {
'files': files,
}
*NOTE:*
When the same file is transferred to a user multiple times, I want the 
query to return the newest item only. That to me will make the file 
accessible per user. Any recommended approach to achieve this is welcome.

*My Template*
**
*#*
*File Type*
*File Number*
*File Name*
*Recipient Name*
*Office Number*
*Transferred To*
*Outgoing Date*
*Due Date*
*Actions*
**
**
**
*{% for file in files %}*
**
*{{ forloop.counter }}*
*{{ file.type }}*
*{{ file.no }}*
*{{ file.name | title  }}*
*{{ file.transfers.recipient_name 
}}*
*{{ file.transfers.recipient_office 
}}*
*{{ file.transfer_to.get_full_name 
}}*
*{{ file.outgoing_date.date }}*
*{{ file.due_date | timeuntil }}*
**
*{% if request.user.is_staff %}*
**
*Receive*
**
**
*{% endif %}*

**
*Transfer*
**
**
**
**
*{% endfor %}*

*NOTE: All related fields in the table do not show ie.*
*file.transfers.recipient_name*
*file.transfers.recipient_office*
*file.transfer_to.get_full_name*
*and the remaining.*

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/801238dc-3aff-4bd6-8863-726eb024a163n%40googlegroups.com.


Re: I need help with my first Django project - its structure etc.

2020-09-10 Thread Ogunsanya Opeyemi
Hi,
So the reason why i said two apps is that you would be able to manage them
very well and your work will be clean. Also if there is any issue with
employee you would know that that issue is coming from the employee app
likewise companies.
So to interconnect them you need to add the two apps inside your project
settings file. And look for online tutorials on how to do the
register/login.

You can mail me through ogunsanyaopeye...@gmail.com if you still need help
or chat me on whatsapp +2349062351846.
Best

On Thursday, September 10, 2020, Mislav Jurić 
wrote:

> Hey Ogunsanya,
>
> before you responded, I started following through the tutorial again,
> modifying the code as needed.* I created one app and in that app I have
> two models* - one for employees, one for companies. I created different
> URL structure and views for employees and companies.
>
> However, as I stated, I only have one app which manages both the employees
> and the companies. You stated that:
>
> *2. Yes you need two apps companies and employees*
>
> *Can you tell me what's the difference between having those two separated
> in different apps vs me just having one app for them both (as I already
> have)?* Will my code be easier to manage if I have them separated in
> different apps? I will, for practice, continue going through the tutorial
> and modifying what I already have, but I'm willing to start from scratch
> with the new design.
>
> It would be immensely helpful for me if you could, in a paragraph or two,
> describe how you would do it (how many apps, how to interconnect them, how
> to do the register/login functionality and should I use tutorials available
> on Google for that etc.).
>
> Best,
> Mislav
>
>
> Dana četvrtak, 10. rujna 2020. u 15:39:45 UTC+2 korisnik Ogunsanya Opeyemi
> napisao je:
>
>> 1. You have to start from there
>> 2. Yes you need two apps companies and employees
>> 3. Yes your idea is correct
>> 4. You can do that.
>>
>> Email me if you still need help
>>
>> On Thursday, September 10, 2020, Mislav Jurić 
>> wrote:
>>
>>> Hey guys,
>>>
>>> I went through the Django tutorial
>>>  about 2 weeks
>>> ago and I decided to create a website using Django. I have a couple of
>>> questions on the structure of the Django project, but before I voice them,
>>> I wanted to describe the features that I want my website to have:
>>>
>>>- there will be two types of users - companies and employees
>>>- both companies and employees will have a profile with basic
>>>information about them listed there
>>>- there should exist two different registration pages (depending on
>>>if you're a company or if you're an employee)
>>>- companies and employees should be able to add certain tags during
>>>their registration (and afterwards add/remove tags via their profile 
>>> page)
>>>- companies and employees should be able to search for each other
>>>based on the tags
>>>- companies should be able to look at employees profiles and vice
>>>versa
>>>- there should exist an administrator website - he/she can remove or
>>>modify the profiles of both companies and employees
>>>
>>> This may not be all the features I want in the website, but I think you
>>> get the picture.
>>>
>>> Here are some questions I have for you:
>>>
>>>1. *Do I start from where the tutorial left off and modify that?*
>>>2. *How many apps should my website have?* This is non-trivial for
>>>me to determine as I have things like 2 different types of users, viewing
>>>profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
>>>3. *How do I go about making it possible for the two types of users
>>>to register?* I was thinking about creating separate models for
>>>companies and employees and then making their registration pages 
>>> different.
>>>4. *Can I somehow hardcode the tags that companies and employees can
>>>use?*
>>>
>>> These are my questions as of now and I'm sure more will pop up during
>>> the development. I have found some login / registration Django website
>>> building tutorials on Google, but I wanted to check with you to see what
>>> the official Django users say.
>>>
>>> To recap: *I recently finished the tutorial and I want to make the
>>> website with the features I listed. How do I do that in the least possible
>>> amount of time, keeping my project structure and code clean and
>>> Django-like?*
>>>
>>> Best,
>>> Mislav
>>>
>>> --
>>> You received this message because you are 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/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2Y
>>> E0z3keGMCUtn-g%40mail.gmail.com
>>> 

Re: I need help with my first Django project - its structure etc.

2020-09-10 Thread Mislav Jurić
Hey Ogunsanya,

before you responded, I started following through the tutorial again, 
modifying the code as needed.* I created one app and in that app I have two 
models* - one for employees, one for companies. I created different URL 
structure and views for employees and companies.

However, as I stated, I only have one app which manages both the employees 
and the companies. You stated that:

*2. Yes you need two apps companies and employees*

*Can you tell me what's the difference between having those two separated 
in different apps vs me just having one app for them both (as I already 
have)?* Will my code be easier to manage if I have them separated in 
different apps? I will, for practice, continue going through the tutorial 
and modifying what I already have, but I'm willing to start from scratch 
with the new design.

It would be immensely helpful for me if you could, in a paragraph or two, 
describe how you would do it (how many apps, how to interconnect them, how 
to do the register/login functionality and should I use tutorials available 
on Google for that etc.).

Best,
Mislav


Dana četvrtak, 10. rujna 2020. u 15:39:45 UTC+2 korisnik Ogunsanya Opeyemi 
napisao je:

> 1. You have to start from there
> 2. Yes you need two apps companies and employees
> 3. Yes your idea is correct
> 4. You can do that.
>
> Email me if you still need help
>
> On Thursday, September 10, 2020, Mislav Jurić  
> wrote:
>
>> Hey guys,
>>
>> I went through the Django tutorial 
>>  about 2 weeks 
>> ago and I decided to create a website using Django. I have a couple of 
>> questions on the structure of the Django project, but before I voice them, 
>> I wanted to describe the features that I want my website to have:
>>
>>- there will be two types of users - companies and employees
>>- both companies and employees will have a profile with basic 
>>information about them listed there
>>- there should exist two different registration pages (depending on 
>>if you're a company or if you're an employee)
>>- companies and employees should be able to add certain tags during 
>>their registration (and afterwards add/remove tags via their profile 
>> page) 
>>- companies and employees should be able to search for each other 
>>based on the tags
>>- companies should be able to look at employees profiles and vice 
>>versa
>>- there should exist an administrator website - he/she can remove or 
>>modify the profiles of both companies and employees
>>
>> This may not be all the features I want in the website, but I think you 
>> get the picture.
>>
>> Here are some questions I have for you:
>>
>>1. *Do I start from where the tutorial left off and modify that?*
>>2. *How many apps should my website have?* This is non-trivial for me 
>>to determine as I have things like 2 different types of users, viewing 
>>profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
>>3. *How do I go about making it possible for the two types of users 
>>to register?* I was thinking about creating separate models for 
>>companies and employees and then making their registration pages 
>> different.
>>4. *Can I somehow hardcode the tags that companies and employees can 
>>use?*
>>
>> These are my questions as of now and I'm sure more will pop up during the 
>> development. I have found some login / registration Django website building 
>> tutorials on Google, but I wanted to check with you to see what the 
>> official Django users say.
>>
>> To recap: *I recently finished the tutorial and I want to make the 
>> website with the features I listed. How do I do that in the least possible 
>> amount of time, keeping my project structure and code clean and 
>> Django-like?*
>>
>> Best,
>> Mislav
>>
>> -- 
>> You received this message because you are 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/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2YE0z3keGMCUtn-g%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
You received this message because you are 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/190c4ca9-7fc3-4979-9176-aa1c3d127d42n%40googlegroups.com.


Re: I need help with my first Django project - its structure etc.

2020-09-10 Thread Mislav Jurić
Hey Ogunsanya,

before you responded, I started following through the tutorial again, 
modifying the code as needed.* I created one app and in that app I have two 
models* - one for employees, one for companies. I created different URL 
structure and views for employees and companies.

However, as I stated, I only have one app which manages both the employees 
and the companies. You stated that:

*2. Yes you need two apps companies and employees*

*Can you tell me what's the difference between having those two separated 
in different apps vs me just having one app for them both (as I already 
have)?* Will my code be easier to manage if I have them separated in 
different apps? I will, for practice, continue going through the tutorial 
and modifying what I already have, but I'm willing to start from scratch 
with the new design.

It would be immensely helpful for me if you could, in a paragraph or two, 
describe how you would do it (how many apps, how to interconnect them, 
etc.).

Best,
Mislav
Dana četvrtak, 10. rujna 2020. u 15:39:45 UTC+2 korisnik Ogunsanya Opeyemi 
napisao je:

> 1. You have to start from there
> 2. Yes you need two apps companies and employees
> 3. Yes your idea is correct
> 4. You can do that.
>
> Email me if you still need help
>
> On Thursday, September 10, 2020, Mislav Jurić  
> wrote:
>
>> Hey guys,
>>
>> I went through the Django tutorial 
>>  about 2 weeks 
>> ago and I decided to create a website using Django. I have a couple of 
>> questions on the structure of the Django project, but before I voice them, 
>> I wanted to describe the features that I want my website to have:
>>
>>- there will be two types of users - companies and employees
>>- both companies and employees will have a profile with basic 
>>information about them listed there
>>- there should exist two different registration pages (depending on 
>>if you're a company or if you're an employee)
>>- companies and employees should be able to add certain tags during 
>>their registration (and afterwards add/remove tags via their profile 
>> page) 
>>- companies and employees should be able to search for each other 
>>based on the tags
>>- companies should be able to look at employees profiles and vice 
>>versa
>>- there should exist an administrator website - he/she can remove or 
>>modify the profiles of both companies and employees
>>
>> This may not be all the features I want in the website, but I think you 
>> get the picture.
>>
>> Here are some questions I have for you:
>>
>>1. *Do I start from where the tutorial left off and modify that?*
>>2. *How many apps should my website have?* This is non-trivial for me 
>>to determine as I have things like 2 different types of users, viewing 
>>profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
>>3. *How do I go about making it possible for the two types of users 
>>to register?* I was thinking about creating separate models for 
>>companies and employees and then making their registration pages 
>> different.
>>4. *Can I somehow hardcode the tags that companies and employees can 
>>use?*
>>
>> These are my questions as of now and I'm sure more will pop up during the 
>> development. I have found some login / registration Django website building 
>> tutorials on Google, but I wanted to check with you to see what the 
>> official Django users say.
>>
>> To recap: *I recently finished the tutorial and I want to make the 
>> website with the features I listed. How do I do that in the least possible 
>> amount of time, keeping my project structure and code clean and 
>> Django-like?*
>>
>> Best,
>> Mislav
>>
>> -- 
>> You received this message because you are 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/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2YE0z3keGMCUtn-g%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
You received this message because you are 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/3d7529a6-6e37-47d4-aa16-b3180539135cn%40googlegroups.com.


Re: I need help with my first Django project - its structure etc.

2020-09-10 Thread Ogunsanya Opeyemi
1. You have to start from there
2. Yes you need two apps companies and employees
3. Yes your idea is correct
4. You can do that.

Email me if you still need help

On Thursday, September 10, 2020, Mislav Jurić 
wrote:

> Hey guys,
>
> I went through the Django tutorial
>  about 2 weeks
> ago and I decided to create a website using Django. I have a couple of
> questions on the structure of the Django project, but before I voice them,
> I wanted to describe the features that I want my website to have:
>
>- there will be two types of users - companies and employees
>- both companies and employees will have a profile with basic
>information about them listed there
>- there should exist two different registration pages (depending on if
>you're a company or if you're an employee)
>- companies and employees should be able to add certain tags during
>their registration (and afterwards add/remove tags via their profile page)
>- companies and employees should be able to search for each other
>based on the tags
>- companies should be able to look at employees profiles and vice versa
>- there should exist an administrator website - he/she can remove or
>modify the profiles of both companies and employees
>
> This may not be all the features I want in the website, but I think you
> get the picture.
>
> Here are some questions I have for you:
>
>1. *Do I start from where the tutorial left off and modify that?*
>2. *How many apps should my website have?* This is non-trivial for me
>to determine as I have things like 2 different types of users, viewing
>profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
>3. *How do I go about making it possible for the two types of users to
>register?* I was thinking about creating separate models for companies
>and employees and then making their registration pages different.
>4. *Can I somehow hardcode the tags that companies and employees can
>use?*
>
> These are my questions as of now and I'm sure more will pop up during the
> development. I have found some login / registration Django website building
> tutorials on Google, but I wanted to check with you to see what the
> official Django users say.
>
> To recap: *I recently finished the tutorial and I want to make the
> website with the features I listed. How do I do that in the least possible
> amount of time, keeping my project structure and code clean and
> Django-like?*
>
> Best,
> Mislav
>
> --
> You received this message because you are 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/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2Y
> E0z3keGMCUtn-g%40mail.gmail.com
> 
> .
>


-- 
OGUNSANYA OPEYEMI

-- 
You received this message because you are 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/CABJxPrERGV2UK-eSG-Kg7%3DNavTqw1NdxFBgWGeBfd%2BUK4dB4Eg%40mail.gmail.com.


I need help with my first Django project - its structure etc.

2020-09-10 Thread Mislav Jurić
Hey guys,

I went through the Django tutorial
 about 2 weeks ago
and I decided to create a website using Django. I have a couple of
questions on the structure of the Django project, but before I voice them,
I wanted to describe the features that I want my website to have:

   - there will be two types of users - companies and employees
   - both companies and employees will have a profile with basic
   information about them listed there
   - there should exist two different registration pages (depending on if
   you're a company or if you're an employee)
   - companies and employees should be able to add certain tags during
   their registration (and afterwards add/remove tags via their profile page)
   - companies and employees should be able to search for each other based
   on the tags
   - companies should be able to look at employees profiles and vice versa
   - there should exist an administrator website - he/she can remove or
   modify the profiles of both companies and employees

This may not be all the features I want in the website, but I think you get
the picture.

Here are some questions I have for you:

   1. *Do I start from where the tutorial left off and modify that?*
   2. *How many apps should my website have?* This is non-trivial for me to
   determine as I have things like 2 different types of users, viewing
   profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
   3. *How do I go about making it possible for the two types of users to
   register?* I was thinking about creating separate models for companies
   and employees and then making their registration pages different.
   4. *Can I somehow hardcode the tags that companies and employees can
   use?*

These are my questions as of now and I'm sure more will pop up during the
development. I have found some login / registration Django website building
tutorials on Google, but I wanted to check with you to see what the
official Django users say.

To recap: *I recently finished the tutorial and I want to make the website
with the features I listed. How do I do that in the least possible amount
of time, keeping my project structure and code clean and Django-like?*

Best,
Mislav

-- 
You received this message because you are 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/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2YE0z3keGMCUtn-g%40mail.gmail.com.


Re: I need help on Keycloak with django

2020-06-12 Thread Kasper Laudrup

Hi Raghavendra,

On 12/06/2020 12.00, Raghavendra AK wrote:
I'm training to implement keycloak with django using 
https://github.com/jhuapl-boss/boss-oidc but getting error : *Could not 
import 'path.to.function' for API setting 'LOAD_USER_ROLES'. 
ModuleNotFoundError: No module named 'path'*

*
*


You need to actually modify the settings.py file according to the 
comments in the file. Not just copy it and expect everything to 
magically work however you want it.


Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a7663e6-10f9-e07b-3cc3-f8052a647ff5%40stacktrace.dk.


I need help on Keycloak with django

2020-06-12 Thread Raghavendra AK
I'm training to implement keycloak with django using 
https://github.com/jhuapl-boss/boss-oidc but getting error : *Could not 
import 'path.to.function' for API setting 'LOAD_USER_ROLES'. 
ModuleNotFoundError: No module named 'path'*

I really appreciate your help or any sample code

-- 
You received this message because you are 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/f9548534-afd0-4ff5-9dcf-ab3fc48bc609o%40googlegroups.com.


Re: I need help

2020-06-09 Thread Devender Kumar
For that you need to create a api and use ajax on javascript side to. Use
this api to push that variable either periodically or as per req


On Tue, 9 Jun, 2020, 10:24 am meera gangani, 
wrote:

> I have a html file in which i have implementing stopwatch and i have to
> that variable stored in django
>
> Here is my script.txt file is a js file, i don't know how to store js
> variables in django and stored into the database,
>  please help me out
>
> Thanking You in advance
> -Meera Gangani
>
> --
> You received this message because you are 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/CANaPPPLYTdqUFxoDL8eTUGtMpsqdsptZKAPC6RR6h_-HuF9TdA%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/CALZ%3DbELFgWSwmH3nmYfb%3D_0adi1dgbTazPvHWfuPnKZa%3DXzFyw%40mail.gmail.com.


I need help with getting the number of pages a particular user viewed

2020-03-13 Thread Awverosuo Trust
Hi guys 
Please I need help..  
I want to create a website (blog) where
* Users can upload or make post 
*Log in and log out
But I have one problem 
* I want to have a field in the data base called (point)  with initial value of 
Zero(0),  and a button in each posts (page)  , when the user clicks the button, 
I want  the point in the user data base to increase by two(+2)... 
* I want to have it displayed in the users profile 

Who can be of help please?
I would really appreciate if you guys can be of help to me...  I will welcome 
video tutorials too as far it can be of help please

-- 
You received this message because you are 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/d2751466-72a1-4eed-b63e-b5bbd83f3d7c%40googlegroups.com.


Re: I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Jani Eric
Thanks bro

On Saturday, January 25, 2020 at 5:52:48 PM UTC+5, Motaz Hejaze wrote:
>
> please contact me on Skype
> My Skype account m3tz-hjze
>
> On Sat, Jan 25, 2020 at 2:33 PM Jani Eric  > wrote:
>
>> if someone is free and ready for help then text me on *what'sapp 
>> :03331931286*
>> * Thanks to all django group  members*
>>
>> -- 
>> You received this message because you are 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/fa4d75f3-804d-47af-bd04-d3c28323458b%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/fa91f5b6-40a5-42cf-9e09-305dd73d6a87%40googlegroups.com.


Re: I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Motaz Hejaze
please contact me on Skype
My Skype account m3tz-hjze

On Sat, Jan 25, 2020 at 2:33 PM Jani Eric  wrote:

> if someone is free and ready for help then text me on *what'sapp
> :03331931286*
> * Thanks to all django group  members*
>
> --
> You received this message because you are 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/fa4d75f3-804d-47af-bd04-d3c28323458b%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-er89-wpYzjMXW5gSYZ6w1uDFJTBmyCymQ-zW4H%3Dceaag%40mail.gmail.com.


I start final year project in django and project for social welfare ''''' please i need help and guideline '''''''

2020-01-25 Thread Jani Eric
if someone is free and ready for help then text me on *what'sapp 
:03331931286*
* Thanks to all django group  members*

-- 
You received this message because you are 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/fa4d75f3-804d-47af-bd04-d3c28323458b%40googlegroups.com.


I am trying to create a search button in an input field . I have inserted an HTML code inside ma code but I hv got a syntax error. Can anyone go through my code and help me please . I need help my fel

2019-04-11 Thread Nanjuki Saidat
 the beginning of the code

# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import logging

from datetime import timedelta

from django.db import models

from crispy_forms.layout import Div

from crispy_forms.helper import FormHelper

from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder, HTML

from django import forms

from django.conf import settings

from django.urls import reverse

from django.db.models import Q

from django.utils import timezone

from .models import Message, strip_email

logger = logging.getLogger(__name__)

def validate_email(email):

timeframe = timezone.now() - timedelta(hours=24)

stripped_email = strip_email(email)

recent_message_count =
Message.objects.filter(Q(sender_email_stripped=stripped_email) |
Q(recipient_email_stripped=stripped_email), created__gte=timeframe).count()

if recent_message_count > settings.MAX_MESSAGES:

raise forms.ValidationError("We can't send emails to this address
at this time. You can try again in 24 hours.")

class MessageSendForm(forms.ModelForm):

# hp = forms.CharField(label="do not fill", required=False)

fasid = forms.CharField(label="FAS Username", required=False)

class Meta:

model = Message

fields = ['recipient_name', 'recipient_email', 'message',

  'sender_named', 'sender_approved_public',
'sender_approved_public_named']

def __init__(self, *args, **kwargs):

self.user = kwargs.pop('user')

super(MessageSendForm, self).__init__(*args, **kwargs)

self.helper = FormHelper()

self.helper.form_class = 'form-horizontal'

self.helper.label_class = 'col-md-3'

self.helper.field_class = 'col-md-8'

self.fields['recipient_name'].label = 'Name'

self.fields['recipient_email'].label = 'Email'

self.fields['recipient_email'].validators = [validate_email]

self.fields['message'].help_text = 'Writer\'s block? Check out our
message inspiration.' % reverse('messaging:inspiration')

self.fields['sender_named'].label = 'I agree to share my name and
email address with the recipient.'

self.fields['sender_approved_public'].label = "I agree to publish
this message and display it publicly in the Happiness Archive."

self.fields['sender_approved_public_named'].label = "... and I
agree to display our names publicly too."

self.fields['sender_approved_public_named'].help_text = "Note: We
only publish information if both the sender and the recipients agree."

self.helper.layout = Layout(

# Fieldset('This Happiness Packet is from...', 'sender_name',
'sender_email', 'hp'),

Fieldset("Search for a FAS Username", 'fasid' ),

#ButtonHolder(

#  Submit('submit', 'Submit', css_class='button white')



#),

I AM TRYING TO INSERT HTML CODE WITH BOOTSTRAP IN MY CRISPY FORM BUT AM
GETTING AN ERROR AND THIS IS THE SOURCE OF THE ERROR , can anyone help me
where am going wrong because am trying to add a search button in an input
field .

HTML(""

  " "

   ""

   ".00"

   ""

   ""),

THIS IS THE END OF HTML CODE I HAVE ADDED.

Fieldset("Send this Happiness Packet to...", 'recipient_name',
'recipient_email'),

Fieldset("Your message is...", 'message'),

Fieldset("Privacy and permissions", 'sender_named',
'sender_approved_public', 'sender_approved_public_named'),

HTML(""),

Submit('submit', 'Send some happiness', css_class='btn-lg
centered'),

)

def clean(self):

super(MessageSendForm, self).clean()

# if self.cleaned_data.get('hp'):

# raise forms.ValidationError('')

if self.cleaned_data.get('sender_approved_public_named') and not
self.cleaned_data.get('sender_approved_public'):

self.add_error('sender_approved_public_named', "If you want us
to publish the message including your names, "

   "you must also
check 'I agree to publish this message and"

   "display it
publicly in the Happiness Archive'")

validate_email(self.user.email)

class MessageRecipientForm(forms.ModelForm):

class Meta:

model = Message

fields = ['recipient_approved_public',
'recipient_approved_public_named']

def __init__(self, *args, **kwargs):

super(MessageRecipientForm, self).__init__(*args, **kwargs)

self.helper = FormHelper()

self.helper.form_class = 'form-horizontal'

self.helper.label_class = 'col-md-3'

self.helper.field_class = 'col-md-8'

self.fields['recipient_approved_public'].label = "I agree to
publish this message and display it publicly in the Happiness Archive."

self.fields['recipi

Re: I need help on adding a search button to an input field

2019-04-10 Thread Nanjuki Saidat
hello@joel, how do i use it as in what to import and so on do you have some
link or example and show me coz i tried inserting some inputs but when i
tried to build the docker didnt meaning i was missing some bootstrap
packages to import. can you please tell me how to do it.Thanks

On Wed, 10 Apr 2019 at 20:58, Joel Mathew  wrote:

> Use bootstrap's input-group-append
> Sincerely yours,
>
>  Joel G Mathew
>
>
>
> On Wed, 10 Apr 2019 at 23:14, Nanjuki Saidat 
> wrote:
>
>> Please any one to help me out.thanks
>>
>> On Wed, 10 Apr 2019 at 20:40, Nanjuki Saidat 
>> wrote:
>>
>>> this one still did the same thing which i didnt mean me i meant an
>>> search button in an input field
>>>
>>> On Wed, 3 Apr 2019 at 22:04, Anirudh Jain 
>>> wrote:
>>>
 You can include the following code in the end

 ButtonHolder(
 Submit('submit', 'Update', css_class='btn btn-theme small')
 )

 Take care of proper indentation.

 On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat, 
 wrote:

> Hi everyone,
> I want to add a search button to an input search field , if there is
> anyone who knows
> how to add a button to the field in crispy form's input field. Please
> help me out
>
>
> https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39DexHK90OBQ6mmsrSpfD2CCVA%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/CAHrBrjAhx4wY-eouLXr3LWYR9hsD_18bULS-p_6qku1cfDPKHA%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/CAA%3Diw_-x-jotqifY8DdpA-xHxF9XFMCcbACVOhkEJDd_fmgRzg%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 

Re: I need help on adding a search button to an input field

2019-04-10 Thread Joel Mathew
Use bootstrap's input-group-append
Sincerely yours,

 Joel G Mathew



On Wed, 10 Apr 2019 at 23:14, Nanjuki Saidat 
wrote:

> Please any one to help me out.thanks
>
> On Wed, 10 Apr 2019 at 20:40, Nanjuki Saidat 
> wrote:
>
>> this one still did the same thing which i didnt mean me i meant an search
>> button in an input field
>>
>> On Wed, 3 Apr 2019 at 22:04, Anirudh Jain 
>> wrote:
>>
>>> You can include the following code in the end
>>>
>>> ButtonHolder(
>>> Submit('submit', 'Update', css_class='btn btn-theme small')
>>> )
>>>
>>> Take care of proper indentation.
>>>
>>> On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat, 
>>> wrote:
>>>
 Hi everyone,
 I want to add a search button to an input search field , if there is
 anyone who knows
 how to add a button to the field in crispy form's input field. Please
 help me out


 https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39DexHK90OBQ6mmsrSpfD2CCVA%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/CAHrBrjAhx4wY-eouLXr3LWYR9hsD_18bULS-p_6qku1cfDPKHA%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/CAA%3Diw_-x-jotqifY8DdpA-xHxF9XFMCcbACVOhkEJDd_fmgRzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help on adding a search button to an input field

2019-04-10 Thread Nanjuki Saidat
Please any one to help me out.thanks

On Wed, 10 Apr 2019 at 20:40, Nanjuki Saidat 
wrote:

> this one still did the same thing which i didnt mean me i meant an search
> button in an input field
>
> On Wed, 3 Apr 2019 at 22:04, Anirudh Jain 
> wrote:
>
>> You can include the following code in the end
>>
>> ButtonHolder(
>> Submit('submit', 'Update', css_class='btn btn-theme small')
>> )
>>
>> Take care of proper indentation.
>>
>> On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat, 
>> wrote:
>>
>>> Hi everyone,
>>> I want to add a search button to an input search field , if there is
>>> anyone who knows
>>> how to add a button to the field in crispy form's input field. Please
>>> help me out
>>>
>>>
>>> https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39DexHK90OBQ6mmsrSpfD2CCVA%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/CAHrBrjAhx4wY-eouLXr3LWYR9hsD_18bULS-p_6qku1cfDPKHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help on adding a search button to an input field

2019-04-10 Thread Nanjuki Saidat
this one still did the same thing which i didnt mean me i meant an search
button in an input field

On Wed, 3 Apr 2019 at 22:04, Anirudh Jain 
wrote:

> You can include the following code in the end
>
> ButtonHolder(
> Submit('submit', 'Update', css_class='btn btn-theme small')
> )
>
> Take care of proper indentation.
>
> On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat,  wrote:
>
>> Hi everyone,
>> I want to add a search button to an input search field , if there is
>> anyone who knows
>> how to add a button to the field in crispy form's input field. Please
>> help me out
>>
>>
>> https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39DexHK90OBQ6mmsrSpfD2CCVA%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/CAHrBrjC6N3v3fxFsNoMwJ1E9L5wSRak36g6x7mg7RSc_8jHXRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help on adding a search button to an input field

2019-04-03 Thread Nanjuki Saidat
Am not getting you well, please elaborate more
On 3 Apr 2019 22:04, "Anirudh Jain"  wrote:

> You can include the following code in the end
>
> ButtonHolder(
> Submit('submit', 'Update', css_class='btn btn-theme small')
> )
>
> Take care of proper indentation.
>
> On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat,  wrote:
>
>> Hi everyone,
>> I want to add a search button to an input search field , if there is
>> anyone who knows
>> how to add a button to the field in crispy form's input field. Please
>> help me out
>>
>> https://pagure.io/fedora-commops/fedora-happiness-
>> packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a4
>> 95fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_
>> Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%
>> 2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39Dex
> HK90OBQ6mmsrSpfD2CCVA%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/CAHrBrjBd82-aGYXHQXQ6u%3D%2Bn1H0R%2BP%3D2HXreawGToo0XYSSCrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I need help on adding a search button to an input field

2019-04-03 Thread Mohammad Etemaddar
You can use FieldWithButtons in form helper's layout:
https://django-crispy-forms.readthedocs.io/en/d-0/layouts.html

-- 
You received this message because you are 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/59a2b90b-d146-4cf5-8047-40ed533586e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help on adding a search button to an input field

2019-04-03 Thread Anirudh Jain
You can include the following code in the end

ButtonHolder(
Submit('submit', 'Update', css_class='btn btn-theme small')
)

Take care of proper indentation.

On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat,  wrote:

> Hi everyone,
> I want to add a search button to an input search field , if there is
> anyone who knows
> how to add a button to the field in crispy form's input field. Please help
> me out
>
>
> https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%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/CAC3mK7fBWiFTXEqeDHPfiExZ39DexHK90OBQ6mmsrSpfD2CCVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I need help on adding a search button to an input field

2019-04-03 Thread Nanjuki Saidat
Hi everyone,
I want to add a search button to an input search field , if there is anyone
who knows
how to add a button to the field in crispy form's input field. Please help
me out

https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/a8846b7d72aced5bdc0a2470dc97a495fb7558d6a0908a04b369260e862d-Screenshot_2019-03-20_Open-source_Happiness_Packets.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/CAHrBrjDW%2Bn-oHwdiYRpw%3DdS8HA%2BAH%2Bne3_kjmxz-UHYqPhX9ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help please

2019-04-01 Thread dvij parekh
1. go and change admin url to drunke-octo-lama in main urls file i.e where 
your setting.py and wsgi.py is present
2. put {% url 'path_to_adminpannel/drunke-octo-lama' %}

hope this helps you else please elaborate problem so i can get it right 

On Monday, April 1, 2019 at 6:32:31 PM UTC+5:30, Nanjuki Saidat wrote:
>
> Hi all,
> I am Saidat a new django developer, i need help on how to go about this  " 
> Change 
> admin portal URL to more obvious path and add link in side menu to admin 
> settings for admin users". In summary:
>
>
>1.  i want to change URL string to more intuitive URL (i.e. 
>fhp.example.com/drunken-octo-lama/ to fhp.example.com/admin/)
>2. If a user is an admin user, show a link in the side menu to access 
>admin settings page.
>
>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/5916908f-b503-4d35-b4a5-6c8808d61702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help please

2019-04-01 Thread Joel Mathew
It's supposed to be an example.
Sincerely yours,

 Joel G Mathew



On Mon, 1 Apr 2019 at 19:12, dvij parekh  wrote:

> link is not working
>
>
> On Mon, Apr 1, 2019 at 6:32 PM Nanjuki Saidat 
> wrote:
>
>> Hi all,
>> I am Saidat a new django developer, i need help on how to go about this
>> " Change admin portal URL to more obvious path and add link in side menu
>> to admin settings for admin users". In summary:
>>
>>
>>1.  i want to change URL string to more intuitive URL (i.e.
>>fhp.example.com/drunken-octo-lama/ to fhp.example.com/admin/)
>>2. If a user is an admin user, show a link in the side menu to access
>>admin settings page.
>>
>>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/CAHrBrjC-j-2Z%2Bkn-U2gKBaV24Mu3W4QFGgochC1s6906VE5Tuw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHrBrjC-j-2Z%2Bkn-U2gKBaV24Mu3W4QFGgochC1s6906VE5Tuw%40mail.gmail.com?utm_medium=email&utm_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/CAF-XeXapTQ5jdOUOtkV5USYhyje9sWtU8hvShEY1yC6pBQ51zw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF-XeXapTQ5jdOUOtkV5USYhyje9sWtU8hvShEY1yC6pBQ51zw%40mail.gmail.com?utm_medium=email&utm_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/CAA%3Diw_9pa3ZyW9%2Ba4VWSYMFSY-3wsZ%2BBFvppJvwZrR0kTdQrXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help please

2019-04-01 Thread dvij parekh
link is not working


On Mon, Apr 1, 2019 at 6:32 PM Nanjuki Saidat 
wrote:

> Hi all,
> I am Saidat a new django developer, i need help on how to go about this  " 
> Change
> admin portal URL to more obvious path and add link in side menu to admin
> settings for admin users". In summary:
>
>
>1.  i want to change URL string to more intuitive URL (i.e.
>fhp.example.com/drunken-octo-lama/ to fhp.example.com/admin/)
>2. If a user is an admin user, show a link in the side menu to access
>admin settings page.
>
>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/CAHrBrjC-j-2Z%2Bkn-U2gKBaV24Mu3W4QFGgochC1s6906VE5Tuw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHrBrjC-j-2Z%2Bkn-U2gKBaV24Mu3W4QFGgochC1s6906VE5Tuw%40mail.gmail.com?utm_medium=email&utm_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/CAF-XeXapTQ5jdOUOtkV5USYhyje9sWtU8hvShEY1yC6pBQ51zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I need help please

2019-04-01 Thread Nanjuki Saidat
Hi all,
I am Saidat a new django developer, i need help on how to go about
this  " Change
admin portal URL to more obvious path and add link in side menu to admin
settings for admin users". In summary:


   1.  i want to change URL string to more intuitive URL (i.e.
   fhp.example.com/drunken-octo-lama/ to fhp.example.com/admin/)
   2. If a user is an admin user, show a link in the side menu to access
   admin settings page.

   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/CAHrBrjC-j-2Z%2Bkn-U2gKBaV24Mu3W4QFGgochC1s6906VE5Tuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help guys please

2019-01-23 Thread Nelson Varela
Say what 

> Say what?
>

-- 
You received this message because you are 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/49402962-6631-446e-8c71-24526b4bf9db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help guys please

2019-01-22 Thread abel otugeme
Zucchixz, z, nix, zx
On Jan 22, 2019 4:47 PM,  wrote:

> I can update object without sluglyfiy buy with slugyfiy I can't
>
> --
> You received this message because you are 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/71fe86c2-1080-499e-a4d4-72c16f2c6832%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/CAMrS0S8V80ThBvJpogiE6h_RfAAhdC6dkgX3%2BoSy%3D4LZbDFx7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I need help guys please

2019-01-22 Thread hayaay009
I can update object without sluglyfiy buy with slugyfiy I can't 

-- 
You received this message because you are 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/71fe86c2-1080-499e-a4d4-72c16f2c6832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i need help

2018-08-12 Thread Derek
Then you'll need to overwrite/customise the admin templates; see:
http://django.readthedocs.io/en/latest/ref/contrib/admin/index.html#overriding-admin-templates

Lots of blogs also cover this topic; e.g.
http://rahmonov.me/posts/customize-django-admin-templates/
(there are may more)

On Saturday, 11 August 2018 11:58:20 UTC+2, Aladin Masen wrote:
>
> I want to use it in my admin 
>
>
> Sent from my iPhone 
>
> > On Aug 9, 2018, at 7:16 PM, Kasper Laudrup  > wrote: 
> > 
> > Hi Aladin, 
> > 
> >> On 09/08/2018 15.07, Aladin Masen wrote: 
> >> Please how can i use the django_markdown  with django 2 
> > 
> > You probably can't, since the library seems to be unmaintained and not 
> updated for use with Django 2, unless you want to fork it and make the 
> changes needed for supporting Django 2. 
> > 
> > I have used django-markdownx: 
> > 
> > https://neutronx.github.io/django-markdownx/ 
> > 
> > Which was just fine for my (very basic) requirements. 
> > 
> > A better option might be to use django-markup: 
> > 
> > https://django-markup.readthedocs.io/en/latest/index.html 
> > 
> > I don't have any experience with that, but I plan to look into it. 
> > 
> > Hope that helps. 
> > 
> > Kind regards, 
> > 
> > Kasper Laudrup 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to django-users...@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/46ae51c1-773b-8bda-7ecd-167d790654fa%40stacktrace.dk.
>  
>
> > 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/bafb26f7-641c-4595-8668-69effe816ac4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i need help

2018-08-11 Thread Aladin Masen
I want to use it in my admin 


Sent from my iPhone

> On Aug 9, 2018, at 7:16 PM, Kasper Laudrup  wrote:
> 
> Hi Aladin,
> 
>> On 09/08/2018 15.07, Aladin Masen wrote:
>> Please how can i use the django_markdown  with django 2
> 
> You probably can't, since the library seems to be unmaintained and not 
> updated for use with Django 2, unless you want to fork it and make the 
> changes needed for supporting Django 2.
> 
> I have used django-markdownx:
> 
> https://neutronx.github.io/django-markdownx/
> 
> Which was just fine for my (very basic) requirements.
> 
> A better option might be to use django-markup:
> 
> https://django-markup.readthedocs.io/en/latest/index.html
> 
> I don't have any experience with that, but I plan to look into it.
> 
> Hope that helps.
> 
> Kind regards,
> 
> Kasper Laudrup
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To 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/46ae51c1-773b-8bda-7ecd-167d790654fa%40stacktrace.dk.
> 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/56039CF3-9CCC-4102-BCFA-A9C7E7FE9D35%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


I need help! How to add a language in Django that its not supported by default?

2018-08-10 Thread Deniz Bazan


I m trying to make a website in 5 languages. The main language should be 
kurdish but it is not supported by Django default. I tried already the how 
to add new languages into Django? 


but it didnt work for me. I receive an error mesagge

**LANG_INFO = dict(django.conf.locale.LANG_INFO.items() + 
EXTRA_LANG_INFO.items())

TypeError: unsupported operand type(s) for +: 'dict_items' and 
'dict_items'**

I also tried already to copy an english *po file* and rename it "ku" 
(kurdish) and i added into django/conf/*init*.py the language info.

'ku': {
'bidi': False,
'code': 'ku',
'name': 'Kurdish',
'name_local': 'Kurdî',},

I can see the language by languages option by template but when i click it 
i receive an error message.

File "/usr/lib/python3.6/gettext.py", line 91, in _tokenizeraise 
ValueError('invalid token in plural form: %s' % value)

ValueError: invalid token in plural form: EXPRESSION

Does anybody know how can i fix it? Thanks so much!

-- 
You received this message because you are 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/2d14351c-e7d9-4aee-b4e5-c6e0ec175fcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella

I found a tutorial!

I studied ForeignKey and how it works with sets... Now, I'll learn how 
to create a form and how to save the new data in set.


Thanks!



Il 09/08/2018 22:59, Julio Biason ha scritto:

Hi Germano,

When you use "ManyToMany", you're saying "any book can have any 
chapter and vice versa". That's obviously what you don't want. What 
you want is "A book has a closed set of chapters". This is done by 
thinking a bit on the other way with Django: Instead of saying "There 
is a list of chapters of this book", you say "The chapter belongs to a 
single book" with a foreign key:


class Book(models.Model):
   title = models.CharField(max_length=250)

class Chapters(models.Model):
   title = models.CharField(max_length=250)
   text = models.TextField()
   book = models.ForeignKey(Book)

Now a chapter can belong only to a book.

On Thu, Aug 9, 2018 at 4:34 PM, Germano Carella 
mailto:germano.care...@gmail.com>> wrote:


Hi,
I'm Germano from Italy. I'm new of django.
Probably this discussion has many many examples, but I can't find
my situation.
I have two models, Book and Chapters.
These are simple models, I need them only for educational purpose.

class Book(models.Model):
    title=models.CharField(max_length=250)
    chapters = models.ManyToManyField('Chapters')

class Chapters(models.Model):
    title_of_chapter = models.CharField(max_length=250)
    text=models.TextField()

Now, in admin interface I can add chapters on a new book and it
works fine.
So, whdn I try to add a second book I can see chapters of book I
added previously.

When I add a new book I want see only chapter of this book. List
must be empty if I'm adding a new book.
It's very simple, but I can't find a way to make it working.

I tried somethings, such as
chapters=
models.ManyToManyField('Chapters',limit_choices_to=Q('book__title'=title))
But this not works.
I know Chapters has book_set, that is the set of references for a
chapter.

There is a way to make it working?
-- 
You received this message because you are 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/2f104d64-50f4-433b-a764-be29d9a77f0c%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout
.




--
*Julio Biason*,Sofware Engineer
*AZION*  | Deliver. Accelerate. Protect.
Office: +55 51 3083 8101   |  Mobile: +55 51 
_99907 0554_

--
You received this message because you are 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/CAEM7gE0rAfJPYbgKxgHCRYwVuAEBGQrz5X2WxOJdOW6mG%3DzK3Q%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/2cadbc8e-ccdc-2283-9a58-7097c6a4f010%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella

Hi Julio,

Thanks, now is clear.

Ok, I created models correctly and createa book in admin interface. Now 
I can create chapters to add this book.


Now I want to learn how to create an interface that allows an user to 
add a new book, click on next button and add chapters to this book that 
is selected by default in book select list.


Can you point me in a tutorial, or document?

Thanks in advance,

Germano


Il 09/08/2018 22:59, Julio Biason ha scritto:

Hi Germano,

When you use "ManyToMany", you're saying "any book can have any 
chapter and vice versa". That's obviously what you don't want. What 
you want is "A book has a closed set of chapters". This is done by 
thinking a bit on the other way with Django: Instead of saying "There 
is a list of chapters of this book", you say "The chapter belongs to a 
single book" with a foreign key:


class Book(models.Model):
   title = models.CharField(max_length=250)

class Chapters(models.Model):
   title = models.CharField(max_length=250)
   text = models.TextField()
   book = models.ForeignKey(Book)

Now a chapter can belong only to a book.

On Thu, Aug 9, 2018 at 4:34 PM, Germano Carella 
mailto:germano.care...@gmail.com>> wrote:


Hi,
I'm Germano from Italy. I'm new of django.
Probably this discussion has many many examples, but I can't find
my situation.
I have two models, Book and Chapters.
These are simple models, I need them only for educational purpose.

class Book(models.Model):
    title=models.CharField(max_length=250)
    chapters = models.ManyToManyField('Chapters')

class Chapters(models.Model):
    title_of_chapter = models.CharField(max_length=250)
    text=models.TextField()

Now, in admin interface I can add chapters on a new book and it
works fine.
So, whdn I try to add a second book I can see chapters of book I
added previously.

When I add a new book I want see only chapter of this book. List
must be empty if I'm adding a new book.
It's very simple, but I can't find a way to make it working.

I tried somethings, such as
chapters=
models.ManyToManyField('Chapters',limit_choices_to=Q('book__title'=title))
But this not works.
I know Chapters has book_set, that is the set of references for a
chapter.

There is a way to make it working?
-- 
You received this message because you are 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/2f104d64-50f4-433b-a764-be29d9a77f0c%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout
.




--
*Julio Biason*,Sofware Engineer
*AZION*  | Deliver. Accelerate. Protect.
Office: +55 51 3083 8101   |  Mobile: +55 51 
_99907 0554_

--
You received this message because you are 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/CAEM7gE0rAfJPYbgKxgHCRYwVuAEBGQrz5X2WxOJdOW6mG%3DzK3Q%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/56a615c7-da95-c0b4-2079-a3b581e43c39%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread Julio Biason
Hi Germano,

When you use "ManyToMany", you're saying "any book can have any chapter and
vice versa". That's obviously what you don't want. What you want is "A book
has a closed set of chapters". This is done by thinking a bit on the other
way with Django: Instead of saying "There is a list of chapters of this
book", you say "The chapter belongs to a single book" with a foreign key:

class Book(models.Model):
   title = models.CharField(max_length=250)

class Chapters(models.Model):
   title = models.CharField(max_length=250)
   text = models.TextField()
   book = models.ForeignKey(Book)

Now a chapter can belong only to a book.

On Thu, Aug 9, 2018 at 4:34 PM, Germano Carella 
wrote:

> Hi,
> I'm Germano from Italy. I'm new of django.
> Probably this discussion has many many examples, but I can't find
> my situation.
> I have two models, Book and Chapters.
> These are simple models, I need them only for educational purpose.
>
> class Book(models.Model):
> title=models.CharField(max_length=250)
> chapters = models.ManyToManyField('Chapters')
>
> class Chapters(models.Model):
> title_of_chapter = models.CharField(max_length=250)
> text=models.TextField()
>
> Now, in admin interface I can add chapters on a new book and it works fine.
> So, whdn I try to add a second book I can see chapters of book I added
> previously.
>
> When I add a new book I want see only chapter of this book. List must be
> empty if I'm adding a new book.
> It's very simple, but I can't find a way to make it working.
>
> I tried somethings, such as
> chapters= models.ManyToManyField('Chapters',limit_choices_to=Q('
> book__title'=title))
> But this not works.
> I know Chapters has book_set, that is the set of references for a chapter.
>
> There is a way to make it working?
>
> --
> You received this message because you are 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/2f104d64-50f4-433b-a764-be29d9a77f0c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Julio Biason*, Sofware Engineer
*AZION*  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101   |  Mobile: +55 51
*99907 0554*

-- 
You received this message because you are 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/CAEM7gE0rAfJPYbgKxgHCRYwVuAEBGQrz5X2WxOJdOW6mG%3DzK3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread Germano Carella
Hi,
I'm Germano from Italy. I'm new of django.
Probably this discussion has many many examples, but I can't find 
my situation.
I have two models, Book and Chapters.
These are simple models, I need them only for educational purpose.

class Book(models.Model):
title=models.CharField(max_length=250)
chapters = models.ManyToManyField('Chapters')

class Chapters(models.Model):
title_of_chapter = models.CharField(max_length=250)
text=models.TextField()

Now, in admin interface I can add chapters on a new book and it works fine.
So, whdn I try to add a second book I can see chapters of book I added 
previously.

When I add a new book I want see only chapter of this book. List must be 
empty if I'm adding a new book.
It's very simple, but I can't find a way to make it working.

I tried somethings, such as 
chapters= 
models.ManyToManyField('Chapters',limit_choices_to=Q('book__title'=title))
But this not works.
I know Chapters has book_set, that is the set of references for a chapter.

There is a way to make it working? 

-- 
You received this message because you are 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/2f104d64-50f4-433b-a764-be29d9a77f0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i need help

2018-08-09 Thread Kasper Laudrup

Hi Aladin,

On 09/08/2018 15.07, Aladin Masen wrote:



Please how can i use the django_markdown  with django 2



You probably can't, since the library seems to be unmaintained and not 
updated for use with Django 2, unless you want to fork it and make the 
changes needed for supporting Django 2.


I have used django-markdownx:

https://neutronx.github.io/django-markdownx/

Which was just fine for my (very basic) requirements.

A better option might be to use django-markup:

https://django-markup.readthedocs.io/en/latest/index.html

I don't have any experience with that, but I plan to look into it.

Hope that helps.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To 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/46ae51c1-773b-8bda-7ecd-167d790654fa%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


i need help

2018-08-09 Thread Aladin Masen


Please how can i use the django_markdown  with django 2

-- 
You received this message because you are 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/2f9ae276-424b-490d-b1f1-126e9d3ef89e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Thanks for help me give me idea where is problem i'm will try it different from 
but when i finished will put 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/cd83bf95-92f9-4c88-990d-d0bc94479ecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread Julio Biason
"pruebapdf() missing 1 required positional argument: 'DesdeJango'"

Your view have an additional parameter, which is not used by views; views
always receive the "request" and then the list of parameters in your URL
definition (which does not have any parameters). So you need to remove it
from the function and actually import the class from your models.

On Tue, May 29, 2018 at 4:49 PM, ALDO JAVIER VIGUERAS <
aldojvigue...@gmail.com> wrote:

> Hallo, I want to do a view to retur me a PDF with my models tah I have in
> models.py , I habe python 3 Django 2.11 and the models are in POSTGRESQL .
> The next is my code that a I have, but gived TypeError: pruebapdf()
> missing 1 required positional argument: 'DesdeJango'
> 'DesdeJango'= is  model name.
>
> VIEW.PY
>
>
> def pruebapdf(request,DesdeJango):
> response=HttpResponse(content_type='application/pdf')
> response['Content-Disposition']='attachment; filename=PDF_CON
> _MODELO.pdf'
> buffer=BytesIO()
> c=canvas.Canvas(response,pagesize=A4)
> #Estilo
> styles = getSampleStyleSheet()
> styleBH=styles["Normal"]
> styleBH.alignment = TA_CENTER
> styleBH.fontSize=10
> #parametros
> folio=Paragraph('folio',styleBH)
> nombre=Paragraph('nombre',styleBH)
> sexo=Paragraph('sexo',styleBH)
> edad=Paragraph('edad',styleBH)
> gecha=Paragraph('gecha',styleBH)
> formato=[]
> formato.append(['folio','nombre','sexo','edad','gecha'])
> #Estilo de la tabla
> styleN=styles['BodyText']
> styleN.alignment=TA_CENTER
> styleN.fontSize=7
> #ALTURA
> high=650
> #ModeloPrueba(request.POST,instance=mascota)
>
> #ciclo for para poner la base de datos
>
> for dato in DesdeJango.objects.all():
> dato=[dato['folio'], dato['nombre'],dato['sexo'],
> dato['edad'],dato['gecha']]
> formato.append(dato)
> #ponemos el grosor del la fila
> high=high-18
>
> #AÑADIMOS DATOS DE PAGINACION
> width, height=A4
> table=Table(formato,colWidths=[1.9*cm,9.5*cm,1.9*cm,1.9*cm,1.9*cm])
> table.setStyle(TableStyle([('INNERGRID',(0,0),(-1,-1),0.25,
> colors.black), ]))
> table.wrapOn(c, width, height)
> table.drawOn(c,30,high)
> c.showPage()
> c.save()
> pdf=buffer.getvalue()
>
> c.showPage()
> c.save()
> pdf = buffer.getvalue()
> buffer.close()
> response.write(pdf)
>
>
> return response
>
>
> URL.PY
>
> path(r'html',pruebapdf , name='PDF'),
>
>
> NOTE : AttributeError: 'WSGIRequest' object has no attribute 'objects'
>
>
> I thank you in advance for your 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 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/2a6ef8f4-5153-4845-87dc-0fbe92e66469%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Julio Biason*, Sofware Engineer
*AZION*  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101   |  Mobile: +55 51
*99907 0554*

-- 
You received this message because you are 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/CAEM7gE3aSpne3G8Uzekj7v1KmhuOzUutF6w%2B9JFkbHd_gyRxwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Hallo, I want to do a view to retur me a PDF with my models tah I have in 
models.py , I habe python 3 Django 2.11 and the models are in POSTGRESQL .
The next is my code that a I have, but gived TypeError: pruebapdf() missing 
1 required positional argument: 'DesdeJango'
'DesdeJango'= is  model name.

VIEW.PY


def pruebapdf(request,DesdeJango):
response=HttpResponse(content_type='application/pdf')
response['Content-Disposition']='attachment; filename=PDF_CON 
_MODELO.pdf'
buffer=BytesIO()
c=canvas.Canvas(response,pagesize=A4)
#Estilo
styles = getSampleStyleSheet()
styleBH=styles["Normal"]
styleBH.alignment = TA_CENTER
styleBH.fontSize=10
#parametros
folio=Paragraph('folio',styleBH)
nombre=Paragraph('nombre',styleBH)
sexo=Paragraph('sexo',styleBH)
edad=Paragraph('edad',styleBH)
gecha=Paragraph('gecha',styleBH)
formato=[]
formato.append(['folio','nombre','sexo','edad','gecha'])
#Estilo de la tabla
styleN=styles['BodyText']
styleN.alignment=TA_CENTER
styleN.fontSize=7
#ALTURA
high=650
#ModeloPrueba(request.POST,instance=mascota)

#ciclo for para poner la base de datos

for dato in DesdeJango.objects.all():
dato=[dato['folio'], 
dato['nombre'],dato['sexo'],dato['edad'],dato['gecha']]
formato.append(dato)
#ponemos el grosor del la fila
high=high-18

#AÑADIMOS DATOS DE PAGINACION
width, height=A4
table=Table(formato,colWidths=[1.9*cm,9.5*cm,1.9*cm,1.9*cm,1.9*cm])
table.setStyle(TableStyle([('INNERGRID',(0,0),(-1,-1),0.25, 
colors.black), ]))
table.wrapOn(c, width, height)
table.drawOn(c,30,high)
c.showPage()
c.save()
pdf=buffer.getvalue()

c.showPage()
c.save()
pdf = buffer.getvalue()
buffer.close()
response.write(pdf)


return response


URL.PY

path(r'html',pruebapdf , name='PDF'),


NOTE : AttributeError: 'WSGIRequest' object has no attribute 'objects'


I thank you in advance for your 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 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/2a6ef8f4-5153-4845-87dc-0fbe92e66469%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please I need help on how to create a custom method for a model with list_display

2018-05-20 Thread Godson Rapture
Thanks very much. I have solved the problem.

On Sunday, May 20, 2018, Daniel Germano Travieso 
wrote:

> Hello!
>
> On your case, as stated on the official doc, you should just create a
> method on the model you want to display the ManyToMany field on the
> list_display that maybe returns the list of items from the ManyToMany
> field. Django avoids using this as it could be a potential overhead as you
> will run seperate queries on the database to fetch all the related
> many-to-many objects.
>
> But if you are feeling adventurous, just create the method that performs
> that query.
>
> i.e. On your Book model you create a method that returns the
> self.authors.all() set. Then you use that method's name on the list_display
> instead of authors.
>
> Hope it helps.
>
> On Saturday, May 19, 2018 at 3:54:17 PM UTC-3, Godson Rapture wrote:
>>
>> Please I am learning Django 2.0.4
>>
>>
>> Right now I am learning about Django Admin.
>>
>>
>> I got an error that the value of my list_display should not be a
>> ManyToMany Field.
>>
>>
>> I referred back to Django official doc and I was asked to create a custom
>> method for my model.
>>
>>
>> I tried looking for an example of how to do that, I could not see.
>>
>>
>> Here is my model.py program
>>
>>  from django.db import models
>>
>> class Publisher(models.Model):
>> name = models.CharField(max_length=30)
>> address = models.CharField(max_length=50,blank=True)
>> city = models.CharField(max_length=60,blank=True)
>> country = models.CharField(max_length=50,blank=True)
>> website = models.URLField()
>> def __str__(self):
>> return self.name
>>
>> class Author(models.Model):
>> salution = models.CharField(max_length=10)
>> first_name = models.CharField(max_length=30)
>> last_name = models.CharField(max_length=40)
>> email = models.EmailField()
>> headshot = models.ImageField(upload_to = "tmp")
>> def __str__(self):
>> return f"{self.first_name} {self.last_name}"
>>
>> class Book(models.Model):
>> title = models.CharField(max_length=100)
>> authors = models.ManyToManyField(Author)
>> publisher = models.ForeignKey(Publisher,on_delete=models.CASCADE,)
>> publication_date = models.DateField()
>> def __str__(self):
>> return self.title
>>
>> Here is my admin.py program
>>
>> from django.contrib import admin
>> from polls.models import Book, Publisher, Author
>> # Register your models here.
>>
>> class BookAdmin(admin.ModelAdmin):
>> list_display = [
>> "title",
>> "authors", #a ManyToMany Field
>>
>> ]
>>  search_fields = [
>> "Book"
>> ]
>> class Meta:
>> model = Book
>>
>> admin.site.register(Book, BookAdmin)
>>
>> Can someone please help me.
>>
>> 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/56c58fb6-7074-47aa-9536-8d8027ef70a0%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/CAEUEpOR37QtBN72gczc9JKteiB5rBryL3vhXP1capNtc1UsLZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please I need help on how to create a custom method for a model with list_display

2018-05-19 Thread Daniel Germano Travieso
Hello!

On your case, as stated on the official doc, you should just create a 
method on the model you want to display the ManyToMany field on the 
list_display that maybe returns the list of items from the ManyToMany 
field. Django avoids using this as it could be a potential overhead as you 
will run seperate queries on the database to fetch all the related 
many-to-many objects.

But if you are feeling adventurous, just create the method that performs 
that query.

i.e. On your Book model you create a method that returns the 
self.authors.all() set. Then you use that method's name on the list_display 
instead of authors.

Hope it helps.

On Saturday, May 19, 2018 at 3:54:17 PM UTC-3, Godson Rapture wrote:
>
> Please I am learning Django 2.0.4
>
>
> Right now I am learning about Django Admin.
>
>
> I got an error that the value of my list_display should not be a 
> ManyToMany Field.
>
>
> I referred back to Django official doc and I was asked to create a custom 
> method for my model.
>
>
> I tried looking for an example of how to do that, I could not see.
>
>
> Here is my model.py program
>
>  from django.db import models
>
> class Publisher(models.Model):
> name = models.CharField(max_length=30)
> address = models.CharField(max_length=50,blank=True)
> city = models.CharField(max_length=60,blank=True)
> country = models.CharField(max_length=50,blank=True)
> website = models.URLField()
> def __str__(self):
> return self.name
>
> class Author(models.Model):
> salution = models.CharField(max_length=10)
> first_name = models.CharField(max_length=30)
> last_name = models.CharField(max_length=40)
> email = models.EmailField()
> headshot = models.ImageField(upload_to = "tmp")
> def __str__(self):
> return f"{self.first_name} {self.last_name}"
>
> class Book(models.Model):
> title = models.CharField(max_length=100)
> authors = models.ManyToManyField(Author)
> publisher = models.ForeignKey(Publisher,on_delete=models.CASCADE,)
> publication_date = models.DateField()
> def __str__(self):
> return self.title
>
> Here is my admin.py program
>
> from django.contrib import admin
> from polls.models import Book, Publisher, Author
> # Register your models here.
>
> class BookAdmin(admin.ModelAdmin):
> list_display = [
> "title",
> "authors", #a ManyToMany Field
>
> ]
>  search_fields = [
> "Book"
> ]
> class Meta:
> model = Book
>
> admin.site.register(Book, BookAdmin)
>
> Can someone please help me.
>
> 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/56c58fb6-7074-47aa-9536-8d8027ef70a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Please I need help on how to create a custom method for a model with list_display

2018-05-19 Thread Godson Rapture


Please I am learning Django 2.0.4


Right now I am learning about Django Admin.


I got an error that the value of my list_display should not be a ManyToMany 
Field.


I referred back to Django official doc and I was asked to create a custom 
method for my model.


I tried looking for an example of how to do that, I could not see.


Here is my model.py program

 from django.db import models

class Publisher(models.Model):
name = models.CharField(max_length=30)
address = models.CharField(max_length=50,blank=True)
city = models.CharField(max_length=60,blank=True)
country = models.CharField(max_length=50,blank=True)
website = models.URLField()
def __str__(self):
return self.name

class Author(models.Model):
salution = models.CharField(max_length=10)
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=40)
email = models.EmailField()
headshot = models.ImageField(upload_to = "tmp")
def __str__(self):
return f"{self.first_name} {self.last_name}"

class Book(models.Model):
title = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
publisher = models.ForeignKey(Publisher,on_delete=models.CASCADE,)
publication_date = models.DateField()
def __str__(self):
return self.title

Here is my admin.py program

from django.contrib import admin
from polls.models import Book, Publisher, Author
# Register your models here.

class BookAdmin(admin.ModelAdmin):
list_display = [
"title",
"authors", #a ManyToMany Field

]
 search_fields = [
"Book"
]
class Meta:
model = Book

admin.site.register(Book, BookAdmin)

Can someone please help me.

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/c2574ad9-e4cb-4b21-a255-8eb9db40ab9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-22 Thread Sadialiou Diallo


hello. first you need to be with the documentation. It is your best freind

clic here to go there
https://docs.djangoproject.com/fr/2.0/intro/
 https://docs.djangoproject.com/en/2.0/

 

-- 
You received this message because you are 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/5d8d452e-8d59-4867-8733-93a8a80cfc65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-16 Thread Etienne Robillard

Hi Daniella,

Next time you want to ask us something, please drop the caps lock key.

Etienne


Le 2018-03-16 à 11:53, Daniella a écrit :
PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME 
THROUGH ON HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB 
APPLICATION. THANKS IN ANTICIPATION

--
You received this message because you are 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/e34ff9eb-f605-4b3a-a0a9-f319b4955183%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
You received this message because you are 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/84149222-e9c2-be50-3730-90901a9df965%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-16 Thread Babatunde Akinyanmi
Hi Daniella. Welcome to the django ecosystem.

As per your question, to get started with django, read the tutorial.

https://www.djangoproject.com/start/

On 16 Mar 2018 18:57, "Daniella"  wrote:

PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME THROUGH ON
HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB APPLICATION.
THANKS IN ANTICIPATION

-- 
You received this message because you are 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/e34ff9eb-f605-4b3a-a0a9-f319b4955183%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/CA%2BWjgXOuqy5X_QbzB_bc-3E7Sff3h81feYxwVTaPt8RCZmzMCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I NEED HELP PLEASE

2018-03-16 Thread Dylan Reinhold
https://www.djangoproject.com/start/

On Fri, Mar 16, 2018 at 8:53 AM, Daniella 
wrote:

> PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME THROUGH ON
> HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB APPLICATION.
> THANKS IN ANTICIPATION
>
> --
> You received this message because you are 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/e34ff9eb-f605-4b3a-a0a9-f319b4955183%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/CAHtg44AbegMgoegfeQ13%3DtgWdh%2B07A8NMX9WHGo0Fd13C64kRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I NEED HELP PLEASE

2018-03-16 Thread Daniella
PLEASE I AM NEW TO DJANGO FRAME WORK. PLEASE CAN SOMEONE PUT ME THROUGH ON 
HOW TO GET STARTED, USING IT TO DEVELOP A WEBSITE AND WEB APPLICATION. 
THANKS IN ANTICIPATION

-- 
You received this message because you are 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/e34ff9eb-f605-4b3a-a0a9-f319b4955183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: why when using the tag AMP or ⚡, the server django load four times or more, and when deleting this tag only load one time? I need help

2017-08-13 Thread ANTHONY WAINER


El sábado, 12 de agosto de 2017, 5:49:05 (UTC-5), ANTHONY WAINER escribió:
>
>
> 
>  
> 
>
>
>
>

-- 
You received this message because you are 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/c8470ba6-27dc-4f17-880e-01cee1a14687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


why when using the tag AMP or ⚡, the server django load four times or more, and when deleting this tag only load one time? I need help

2017-08-12 Thread ANTHONY WAINER



 




-- 
You received this message because you are 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/3fe9b5e8-c847-4669-a010-9d1311c43077%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need help doing a linked lookup in admin

2013-04-29 Thread Richard E. Cooke
I'm getting closer!  

First I found this note in the Content Types docs that explains why what I 
was doing does NOT work:
https://docs.djangoproject.com/en/1.4/ref/contrib/contenttypes/#django.contrib.contenttypes.generic.GenericForeignKey

*Due to the way 
GenericForeignKeyis
 implemented, you cannot use such fields directly with filters (
filter() and exclude(), for example) via the database API.*


Then I found this sample code in the admin docs:
https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_foreignkey


That I adapted to this for my admin form:
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == "ship_to":
kwargs["queryset"] = 
StreetAddress.objects.filter(po__supplier__street_address__location="shipto")
return super(POAdmin, self).formfield_for_foreignkey(db_field, 
request, **kwargs)

Note that while this is my "PO" data model, I used the model belonging to 
the address data "StreetAddress".  This is because which model does the 
object.filter() is the one whose __unicode__ function is called to get a 
representation of each record found for the list selection dialogue.  Which 
means, for my PO database, it describes each address by its PO number 
(which are the same number) making it hard to tell the addresses apart!  By 
using the StreetAddress model, it uses its __unicode__ instead, which makes 
a mini-summary of each address.  Much clearer.


This is not a perfect solution though because when I try to SAVE an edited 
PO record I get an error:

MultipleObjectsReturned: get() returned more than one StreetAddress -- it 
returned 2! Lookup parameters were {'id': u'2'}


I'm going to go back to letting it list all "ship to" addresses for all 
companies until I figure out what this error even means!

Another problem is its listing both address choices with the same 
description.  Another mystery to ponder.


-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




I need help doing a linked lookup in admin

2013-04-26 Thread Richard E. Cooke
I used the *django-contacts *project as my starting point for a company 
contact database.  Its really cool, it keeps "addresses", "phone numbers", 
etc in seperate db table so you can associate as many as you need to each 
company or person record.  It uses *django.contrib.contenttype*s for its 
relations.  Which is also pretty cool since that lets you attach comments 
to any other record!

Anyway, I want to build on this by adding an Inventory and Purchasing 
system.

In my Inventory model I have a field for supplier:

  supplier = models.ForeignKey('contacts.Company', blank=True, null=True)

Which works perfect, you get a pop-up list to pick the lucky vendor from.  
Later I might add a filter to limit the choices to a particular type of 
company - like vendors.  But this is fine for now.

A company record can (and will) have multiple "StreetAddresses" records 
associated with it through a GenericRelation.  For the PO I want to be able 
to select one out of that set of addresses.

So for a test, I tried:

  ship_to = models.ForeignKey('contacts.StreetAddress', 
limit_choices_to={'content_type':27, 'object_id':1, 'location':'shipto'}, 
blank=True, null=True)

"content_type", "object_id" are the content types fields used to control 
the Generic Relation.  And those values correspond to pk=1 for records of 
type "company".  And the "location" field indicates the type of address 
record.

This works.  I get a list of "ship to" addresses for the company (pk=1).

So, now I want to re-jig this to use the current PO record's setting for 
"supplier" to automatically limit the address selection.

There might be a way to capitalize on the fact that *supplier.street_address
*  is a *GenericRelatedObjectManager* seeded with the right values.  

In shell, I read in a PO record with *a = PO.objects.get(pk=1)*
Then I enter *a.supplier.street_address.filter(location="shipto")* I get a 
list of all the "shipto" addresses for the supplier!  Exactly the list I 
want to be able to pick one from.

But I haven't a clue how to make use of this in the Admin system.  Any 
ideas appreciated!

I tried making a ForeignKey field to the StreetAddress db, and filter it 
using values from the supplier record currently in memory:
  ship_to = models.ForeignKey('contacts.StreetAddress', 
limit_choices_to={'content_type':F('po__supplier__street_address__content_type__id'),
 
'object_id':F('po__supplier__pk'),}, blank=True, null=True)

In Admin, this returns an empty list of addresses.  

To debug, I went into shell, and tried:
b = 
StreetAddress.objects.filter(content_type=F('po__supplier__street_address__content_type__id'))
  

>>> b
[]

does "F()" write a log someplace that will tell me where this falls apart?  
Well, I don't see how it would know what PO record to get "supplier" from.  
Or maybe its better to say I don't understand how it determines where to 
get any of its data from when your walking relations.The Django manual 
entry for 1.4 is pretty vague on details. 

Or, is there a better way to do this?

Thanks in Advance!



-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: i need help

2013-02-19 Thread wassim bchini
thx ryan :)


> Please take a look at the Django tutorial[1] and then feel free to 
> ask specific questions.  Also, when posting, try to put something more 
> meaningful[2] than "i need help" in the subject. 
>
> - Ryan 
>
> 1. https://docs.djangoproject.com/en/1.4/intro/tutorial01/ 
> 2. http://www.catb.org/esr/faqs/smart-questions.html#bespecific 
>

-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: I need help

2013-02-19 Thread Carlos Aguilar
I fix the error.

Thank you for your time.

The error was caused for a bad access to delete function. Thanks againg.

Best Regards


On Tue, Feb 19, 2013 at 5:55 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

>
> On Wed, Feb 20, 2013 at 6:52 AM, Carlos Aguilar wrote:
>
>> I am trying to use the User model outside of django app, but without
>> successful.
>>
>> This is my imports section:
>>
>> from django.core.management import setup_environ
>> from htdjango import settings
>> setup_environ(settings)
>>
>> from django.contrib.auth import get_user_model
>>
>> I am trying many things but right now I am receiving this error:
>>
>> Traceback (most recent call last):
>>   File "htuser.py", line 539, in 
>> user.delete()
>>   File "htuser.py", line 99, in delete
>>  django_user.objects.delete()
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line
>> 232, in __get__
>> raise AttributeError("Manager isn't accessible via %s instances" %
>> type.__name__)
>> AttributeError: Manager isn't accessible via HTDjangoUser instances
>>
>
> You've provided code, but not the code that is actually raising the error
> (i.e., htuser.py). However, the error message does tell you exactly what
> you're doing wrong -- you're attempting to access a manager, when what you
> have is an instance.
>
> Your code will be doing something like this:
>
> > myUser = User.objects.get(username='foo')
> > myUser.objects.all()
>
> myUser is an *instance* of User. The ".objects" attribute, representing
> the manager, exists for internal reasons, but you can't use it - you're
> trying to access a manager on an instance.
>
> > User.objects.all()
>
> *would* be legal -- in this case, you're accessing the manager on the
> *class*, not the instance.
>
> Looking at your stack trace, the problem is either on line 539 or line 99
> of htuser.py, where you've switched between working with an instance and
> working with a model. You'll have to work out for yourself what the fix is.
>
> Yours,
> Russ Magee %-)
>
> --
> You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Carlos Aguilar
Consultor Hardware y Software
DWD&Solutions
http://www.dwdandsolutions.com
http://www.houseofsysadmin.com
Cel: +50378735118
USA: (301) 337-8541

-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: I need help

2013-02-19 Thread Russell Keith-Magee
On Wed, Feb 20, 2013 at 6:52 AM, Carlos Aguilar wrote:

> I am trying to use the User model outside of django app, but without
> successful.
>
> This is my imports section:
>
> from django.core.management import setup_environ
> from htdjango import settings
> setup_environ(settings)
>
> from django.contrib.auth import get_user_model
>
> I am trying many things but right now I am receiving this error:
>
> Traceback (most recent call last):
>   File "htuser.py", line 539, in 
> user.delete()
>   File "htuser.py", line 99, in delete
>  django_user.objects.delete()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line
> 232, in __get__
> raise AttributeError("Manager isn't accessible via %s instances" %
> type.__name__)
> AttributeError: Manager isn't accessible via HTDjangoUser instances
>

You've provided code, but not the code that is actually raising the error
(i.e., htuser.py). However, the error message does tell you exactly what
you're doing wrong -- you're attempting to access a manager, when what you
have is an instance.

Your code will be doing something like this:

> myUser = User.objects.get(username='foo')
> myUser.objects.all()

myUser is an *instance* of User. The ".objects" attribute, representing the
manager, exists for internal reasons, but you can't use it - you're trying
to access a manager on an instance.

> User.objects.all()

*would* be legal -- in this case, you're accessing the manager on the
*class*, not the instance.

Looking at your stack trace, the problem is either on line 539 or line 99
of htuser.py, where you've switched between working with an instance and
working with a model. You'll have to work out for yourself what the fix is.

Yours,
Russ Magee %-)

-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: i need help

2013-02-17 Thread Ryan Nowakowski
On Fri, Feb 15, 2013 at 04:17:30PM -0800, wassim bchini wrote:
> hello ;
> i have a Project and i'm beginner on Django ; my project is to build web 
> application to administrate FTP server , i have the program 
> of administration on python (engine) and i need some information how to 
> render the web application interface (pages,forms,...)  to work with engine 
> ,  please excuse  my poor English  :) ,thx 

Wassim,

Please take a look at the Django tutorial[1] and then feel free to
ask specific questions.  Also, when posting, try to put something more
meaningful[2] than "i need help" in the subject.

- Ryan

1. https://docs.djangoproject.com/en/1.4/intro/tutorial01/ 
2. http://www.catb.org/esr/faqs/smart-questions.html#bespecific

-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




i need help

2013-02-15 Thread wassim bchini
hello ;
i have a Project and i'm beginner on Django ; my project is to build web 
application to administrate FTP server , i have the program 
of administration on python (engine) and i need some information how to 
render the web application interface (pages,forms,...)  to work with engine 
,  please excuse  my poor English  :) ,thx 

-- 
You received this message because you are 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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-31 Thread Daniel Roseman
On Tuesday, 31 January 2012 18:38:18 UTC, JJ Zolper wrote:
>
> Sam,
>
> Since I'm on Ubuntu know with my Python and Django I'm wondering which 
> CPython I should download?
>
> I saw stackless python on the python.org site but I'm not sure if that's 
> what CPython version I would need. I thought there was a standard CPython? 
> Any help about my interpreter for Python on Ubuntu would be helpful.
>
> As for Django I think I'm in good shape since it is now ready to go along 
> side Ubuntu. And that's how i would move to production, on a Linux machine 
> for it. I can open a python interpreter from the terminal but I thought I 
> should have more than that such as IronPython or CPython?
>
> JJ
>
>
There isn't such a thing as "CPython" that's separate from the Python 
interpreter already on your VM. That interpreter *is* CPython. You have no 
need to install anything else. In any case, that's the version that works 
with the other Python tools on the system, so installing a different one 
would be complicated and unnecessary.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/mwcx__cjWMsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-31 Thread JJ Zolper
Sam,

Since I'm on Ubuntu know with my Python and Django I'm wondering which 
CPython I should download?

I saw stackless python on the python.org site but I'm not sure if that's 
what CPython version I would need. I thought there was a standard CPython? 
Any help about my interpreter for Python on Ubuntu would be helpful.

As for Django I think I'm in good shape since it is now ready to go along 
side Ubuntu. And that's how i would move to production, on a Linux machine 
for it. I can open a python interpreter from the terminal but I thought I 
should have more than that such as IronPython or CPython?

JJ


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/x9WHmF2Td2UJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread JJ Zolper
I have never heard of Guess Additions thanks for the tip!

Right now I am going to remove my Ubuntu installation and re-install to 
give it more RAM and Video memory as well as install guest Additions!

Thanks,

JJ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Zd1wCdtXBgMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread Sam Lai
On 29 January 2012 16:49, JJ Zolper  wrote:
> Sam,
>
> I have set up VirtualBox with Python and Django. Things have gone
> flawlessly.
>
> Only thing I've noticed is it seems to be running a tad bit slow. I feel
> this way because I had a native installation before and it ran quite well.

Have you installed the VirtualBox Guest Additions? That will, among
other things, optimise your  video which should make it feel a lot
faster.

This looks like a good guide for installing it on Ubuntu 11.10 -
http://www.varunvats.com/2011/06/install-virtualbox-guest-additions-for-ubuntu-11-04-guest/

> Before I go too far into writing code I was hoping to "perfect" my
> environment. I want to be able to donate enough resources such as RAM to the
> VM so that it runs well but at the same time maintain a steady local Windows
> boot.
>
> Would you mind helping get me situated?
>
> My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have
> Windows 7 Enterprise 64 bit operating system installed.
>
> The original or current setup for my Ubuntu 11.10 on my VirtualBox system
> is:
>
> Base Memory: 700 MB (RAM? max is 4096)
> Storage: 40 GB (Fixed)
> Video Memory: 12 MB (max is 128)
> Monitor count is 1
>
> Those are all the details I thought might be useful. I would really
> appreciate some guidance as to what you set yours up as or what you think
> might be the best to optimize performance?
>
> As a side note I'm really asking anyone in this thread what their opinion
> is? I plan is to look through this thread and see who else mentioned Linux
> and see if I can get input so I'm ready to go before I dive too deep into my
> development.
>
> Thanks to you and to everyone who has been very patient with me, given me so
> many tips, and stepped me through my setup!
>
> Much appreciation,
>
> JJ Zolper
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/y689VFsrhDUJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-29 Thread JJ Zolper
Going forward I'll make sure to post only once. I don't use these Google 
Groups mailing lists that much besides the occasional community question so 
I'll make sure not to spam you all next time! : /

Yes well I bought my laptop through my school (Virginia Tech) and we had a 
few options for engineering computers. As for the 64-bit that is new to me 
but I suppose I should have thought it would use more RAM.

I do hope to buy a new laptop in the next few years the laptop I have now 
is overrated, I think.

Anyways, I was able to find some youtube videos with Windows users using 
Vbox and Ubuntu. They typically selected half of their overall RAM to be 
used in the Vbox as well as some amped up their video memory allocation. So 
probably today or tomorrow I will give the whole installation another go. 
The multiple workspace feature of 11.10 seems to hang a good bit so I'm 
wondering if extra video graphic memory might help... I guess it's sort of 
a guess and check thing as long as I don't over my demand my Windows system.

I just want to give myself the right specs going forward so mid development 
I don't run into issues. As for storage space some picked dynamic and some 
picked fixed. I picked fix at 40 GB which yes probably is more than enough 
but I have 120 GB free now so why not. I saw that dynamically expanding 
could hender performace so I guess we will see if things go smoothly.

Thanks Dennis!

JJ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/M2apkuqrFxgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
lawgon,

I have set up VirtualBox with Python and Django. Things have gone 
flawlessly.

Only thing I've noticed is it seems to be running a tad bit slow. I feel 
this way because I had a native installation before and it ran quite well.

Before I go too far into writing code I was hoping to "perfect" my 
environment. I want to be able to donate enough resources such as RAM to 
the VM so that it runs well but at the same time maintain a steady local 
Windows boot.

Would you mind helping get me situated?

My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have 
Windows 7 Enterprise 64 bit operating system installed.

The original or current setup for my Ubuntu 11.10 on my VirtualBox system 
is:

Base Memory: 700 MB (RAM? max is 4096)
Storage: 40 GB (Fixed)
Video Memory: 12 MB (max is 128)
Monitor count is 1

Those are all the details I thought might be useful. I would really 
appreciate some guidance as to what you set yours up as or what you think 
might be the best to optimize performance?

As a side note I'm really asking anyone in this thread what their opinion 
is? I plan is to look through this thread and see who else mentioned Linux 
and see if I can get input so I'm ready to go before I dive too deep into 
my development.

Thanks to you and to everyone who has been very patient with me, given me 
so many tips, and stepped me through my setup!

Much appreciation,

JJ Zolper




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DCFm0YJL_D8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Sam,

I have set up VirtualBox with Python and Django. Things have gone 
flawlessly.

Only thing I've noticed is it seems to be running a tad bit slow. I feel 
this way because I had a native installation before and it ran quite well.

Before I go too far into writing code I was hoping to "perfect" my 
environment. I want to be able to donate enough resources such as RAM to 
the VM so that it runs well but at the same time maintain a steady local 
Windows boot.

Would you mind helping get me situated?

My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have 
Windows 7 Enterprise 64 bit operating system installed.

The original or current setup for my Ubuntu 11.10 on my VirtualBox system 
is:

Base Memory: 700 MB (RAM? max is 4096)
Storage: 40 GB (Fixed)
Video Memory: 12 MB (max is 128)
Monitor count is 1

Those are all the details I thought might be useful. I would really 
appreciate some guidance as to what you set yours up as or what you think 
might be the best to optimize performance?

As a side note I'm really asking anyone in this thread what their opinion 
is? I plan is to look through this thread and see who else mentioned Linux 
and see if I can get input so I'm ready to go before I dive too deep into 
my development.

Thanks to you and to everyone who has been very patient with me, given me 
so many tips, and stepped me through my setup!

Much appreciation,

JJ Zolper




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/y689VFsrhDUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Jonathan,

I have set up VirtualBox with Python and Django. Things have gone 
flawlessly.

Only thing I've noticed is it seems to be running a tad bit slow. I feel 
this way because I had a native installation before and it ran quite well.

Before I go too far into writing code I was hoping to "perfect" my 
environment. I want to be able to donate enough resources such as RAM to 
the VM so that it runs well but at the same time maintain a steady local 
Windows boot.

Would you mind helping get me situated?

My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have 
Windows 7 Enterprise 64 bit operating system installed.

The original or current setup for my Ubuntu 11.10 on my VirtualBox system 
is:

Base Memory: 700 MB (RAM? max is 4096)
Storage: 40 GB (Fixed)
Video Memory: 12 MB (max is 128)
Monitor count is 1

Those are all the details I thought might be useful. I would really 
appreciate some guidance as to what you set yours up as or what you think 
might be the best to optimize performance?

As a side note I'm really asking anyone in this thread what their opinion 
is? I plan is to look through this thread and see who else mentioned Linux 
and see if I can get input so I'm ready to go before I dive too deep into 
my development.

Thanks to you and to everyone who has been very patient with me, given me 
so many tips, and stepped me through my setup!

Much appreciation,

JJ Zolper




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/npgPLwB8wYAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Steven,

I have set up VirtualBox with Python and Django. Things have gone 
flawlessly.

Only thing I've noticed is it seems to be running a tad bit slow. I feel 
this way because I had a native installation before and it ran quite well.

Before I go too far into writing code I was hoping to "perfect" my 
environment. I want to be able to donate enough resources such as RAM to 
the VM so that it runs well but at the same time maintain a steady local 
Windows boot.

Would you mind helping get me situated?

My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have 
Windows 7 Enterprise 64 bit operating system installed.

The original or current setup for my Ubuntu 11.10 on my VirtualBox system 
is:

Base Memory: 700 MB (RAM? max is 4096)
Storage: 40 GB (Fixed)
Video Memory: 12 MB (max is 128)
Monitor count is 1

Those are all the details I thought might be useful. I would really 
appreciate some guidance as to what you set yours up as or what you think 
might be the best to optimize performance?

As a side note I'm really asking anyone in this thread what their opinion 
is? I plan is to look through this thread and see who else mentioned Linux 
and see if I can get input so I'm ready to go before I dive too deep into 
my development.

Thanks to you and to everyone who has been very patient with me, given me 
so many tips, and stepped me through my setup!

Much appreciation,

JJ Zolper




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Vcst2yhhSWsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:25 -0800, JJ Zolper wrote:
> Thanks a lot I was thinking I would learn the Google Maps API. Have
> you worked with OSM? 
> 
> Do you have any input if you have used OSM and if you have used Google
> Maps what your comments are? 

google maps are proprietary. OSM in open source - end of discussion.
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:24 -0800, JJ Zolper wrote:
> That's really all I am trying to understand. From A to B. A being
> where I am able to develop once I finally am able to make that
> decision and B how smart I picked A so that the move from my local
> computer to my server is smooth and simple.

upgrade to linux and stop worrying
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:18 -0800, JJ Zolper wrote:
> Since I will be deploying my Python code on a server that is based on
> Linux wouldn't it be smart that I develop my Python code on something
> similar to my VM for Django?

yes
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread Jonathan Paugh
Developing on a Linux-based OS will give you indispensable understanding
of your production environment. On the other hand, it will probably be
very unfamiliar if you haven't worked on Linux before, and easy tasks
will become very difficult again, for a while. You should ultimately
develop your application on the platform that makes you the most
productive---the portability of Python and Django gives you that
luxury---you could even target the Java Virtual Machine. (And you won't
know that without trying them all.)

Definitely try out running a development websever './manage.py runserver
is fine) on Linux, to get a feel for what your production environment
might be like. You might decide you like working on Linux, and it make
you more productive---or not. But---at least for Django/Python---that's
largely a matter of taste.

On 01/27/2012 03:18 PM, JJ Zolper wrote:
> Since I will be deploying my Python code on a server that is based on Linux 
> wouldn't it be smart that I develop my Python code on something similar to 
> my VM for Django?
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Thanks a lot I was thinking I would learn the Google Maps API. Have you 
worked with OSM?

Do you have any input if you have used OSM and if you have used Google Maps 
what your comments are?

Thanks,

JJ Zolper

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TLCnDS2Io6wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Thanks a lot I was thinking I would learn the Google Maps API. Have you 
worked with OSM?

Do you have any input if you have used OSM and if you have used Google Maps 
what your comments are?

Thanks,

JJ Zoler

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/QJxwbShlYI4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
> ActivePython for Windows includes the win32 extension libraries (if
>  one wants to go to native Windows code -- though the now standard ctypes
>  library permits similar capability if one knows the API), and PythonWin
>  IDE (as I recall, this started life as an included demo of the win32
>  extension libraries ). 

I don't necessarily want all my code to be native WIndows code. I'm 
starting to get the impression that since Django is developed on Unbuntu I 
should setup an interpreter on my VM with Unbuntu?

That's really all I am trying to understand. From A to B. A being where I 
am able to develop once I finally am able to make that decision and B how 
smart I picked A so that the move from my local computer to my server is 
smooth and simple.

I'm just unfamiliar with Python and how any of it is done besides just once 
you have an interpreter and type in simple functions. I've done everything 
from the interpreter I haven't even made a program yet. I just wanted to be 
in the right place when I started from the beginning just where I can send 
my work into production directly. If I loose compatibility with libraries 
and important features in Windows I will absolutely change my current 
course and move to where everyone is in the UNIX/LINUX realm.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/nSNskYv_OHwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Since I will be deploying my Python code on a server that is based on Linux 
wouldn't it be smart that I develop my Python code on something similar to 
my VM for Django?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/SobtqjAubcoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Steven Elliott Jr

On Jan 25, 2012, at 9:14 PM, JJ Zolper wrote:

> > The keywords were 'in production'. The development server (i.e. python
> > manage.py runserver) works fine under Windows. But when you want to
> > make the website accessible to your audience (the internet, company
> > etc.), you should host that on Linux. 
> 
> I still don't quite understand. Can you explain more? I would think this 
> means that my Django files should be on a Linux portion of my web server? I 
> am with Bluehost.com

It means when you actually go to deploy your app on an actual web server in 
production you're going to be deploying on Linux. I've never seen a Python host 
on Windows, but then again I've never looked because, to be honest most Django 
devs use some Unix variant for development.

> I have installed ActiveState and will give it a try. I have my VS up and 
> running with Python Tools for VS so that should be okay.
> 
> Hey Sam you've been a great help. Would you by chance mind giving me your 
> e-mail address? That way in the future I could work with you? I won't bother 
> you too much don't worry! lol. Just since I am trying your advice it could be 
> a great help to me.
> 
> What Virtual Machine did you pick? What Linux version are you running?

Most people use Ubuntu running in VirtualBox
> 
> If you prefer e-mailing/want to give me your address my next inquery would 
> just go to your e-mail.
> 
> Thanks so much!
> 
> JJ Zolper
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/nMqg8xOLXRcJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Jonathan Paugh

On 01/23/2012 03:58 PM, JJ Zolper wrote:
Yes I knew I was in the Python shell I just never saw anything that 
described you couldn't make Django commands within the Python 
interpreter. I mean it is based on Python isn't it? That's where I 
thought logically you could make Django calls from in Python?


SO

Shells run commands. Python is not a shell.  If you want to run the 
Python /command/ from inside of the Python interpreter prompt, the 
closest you can get is:

>>> import os
>>> os.system('python ./manage.py')

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread kenneth gonsalves
On Wed, 2012-01-25 at 09:41 -0800, JJ Zolper wrote:
> Okay I am glad to hear that something I knew was on the right track!
> Thanks Kenneth! However what is OSM? Open Street Maps? maybe you could
> tell me a little bit more about it as I have not heard of it

http://www.openstreetmap.org/
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



  1   2   >