Re: django - admin error

2020-08-21 Thread RANGA BHARATH JINKA
Try using virtual environment

On Fri, 21 Aug 2020, 6:59 pm sapna Choudhary,  wrote:

> run command line django-admin ,you will see list of commands to run
>
> On Thu, Aug 20, 2020 at 6:47 PM company <2071...@hansung.ac.kr> wrote:
>
>> Hi, Django users.
>>  I started to learn programming this year and joined to make new homepage
>> for my programming club. So I want to know how to solve this problem.
>> According to Django documentation part.1(tutorial), I installed Django
>> and confirmed my Django version through  "python -m django --version"which
>> is version 3.2. Then, I made directory named "renewal" in command line and
>> moved to my directory "renewal" and lastly
>> I ordered "django-admin startproject mysite" in commad line to make
>> "mysite directory" in renewal directory. But, prompt said 'django -admin'
>> is not an internal or external command, executable program or a batch file
>> even if I tried to solve this problem, I do not know what should i do to
>> solve this one. I will look forward your answer :)
>>
>>
>>
>> --
>> 이 메일은 지정된 수취인만을 위해 작성되었으며, 중요한 정보나 저작권을 포함하고 있을 수 있습니다. 어떠한 권한 없이, 본 문서에
>> 포함된 정보의 전부 또는 일부를 무단으로 제3자에게 공개, 배포, 복사 또는 사용하는 것을 엄격히 금지합니다. 만약, 본 메일이 잘못
>> 전송된 경우, 발신인 또는 당사에 알려주시고, 본 메일을 즉시 삭제하여 주시기 바랍니다.
>> This E-mail may contain confidential information and/or copyright
>> material. This email is intended for the use of the addressee only. If you
>> receive this email by mistake, please either delete it without reproducing,
>> distributing or retaining copies thereof or notify the sender immediately.
>> 
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/261dd143-f482-4e6d-9ea9-c00fc4b7644an%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/CAP6mExiCpaHYBfdxinUksNy%3DE9g2QYsH791wFcvz1rsJmh%2BkuA%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/CAK5m316ziuog%3DqMg6U0Acmrt_%3D0%3DGd%3DA_xdJMQovnXq%2BWWaqZQ%40mail.gmail.com.


Re: django - admin error

2020-08-21 Thread sapna Choudhary
run command line django-admin ,you will see list of commands to run

On Thu, Aug 20, 2020 at 6:47 PM company <2071...@hansung.ac.kr> wrote:

> Hi, Django users.
>  I started to learn programming this year and joined to make new homepage
> for my programming club. So I want to know how to solve this problem.
> According to Django documentation part.1(tutorial), I installed Django and
> confirmed my Django version through  "python -m django --version"which is
> version 3.2. Then, I made directory named "renewal" in command line and
> moved to my directory "renewal" and lastly
> I ordered "django-admin startproject mysite" in commad line to make
> "mysite directory" in renewal directory. But, prompt said 'django -admin'
> is not an internal or external command, executable program or a batch file
> even if I tried to solve this problem, I do not know what should i do to
> solve this one. I will look forward your answer :)
>
>
>
> --
> 이 메일은 지정된 수취인만을 위해 작성되었으며, 중요한 정보나 저작권을 포함하고 있을 수 있습니다. 어떠한 권한 없이, 본 문서에
> 포함된 정보의 전부 또는 일부를 무단으로 제3자에게 공개, 배포, 복사 또는 사용하는 것을 엄격히 금지합니다. 만약, 본 메일이 잘못
> 전송된 경우, 발신인 또는 당사에 알려주시고, 본 메일을 즉시 삭제하여 주시기 바랍니다.
> This E-mail may contain confidential information and/or copyright
> material. This email is intended for the use of the addressee only. If you
> receive this email by mistake, please either delete it without reproducing,
> distributing or retaining copies thereof or notify the sender immediately.
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/261dd143-f482-4e6d-9ea9-c00fc4b7644an%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/CAP6mExiCpaHYBfdxinUksNy%3DE9g2QYsH791wFcvz1rsJmh%2BkuA%40mail.gmail.com.


Re: django - admin error

2020-08-20 Thread Ogunsanya Opeyemi
You are to call djando-admin as a module in python
by running "python -m django-admin startproject mysite"

On Thursday, August 20, 2020, company <2071...@hansung.ac.kr> wrote:

> Hi, Django users.
>  I started to learn programming this year and joined to make new homepage
> for my programming club. So I want to know how to solve this problem.
> According to Django documentation part.1(tutorial), I installed Django and
> confirmed my Django version through  "python -m django --version"which is
> version 3.2. Then, I made directory named "renewal" in command line and
> moved to my directory "renewal" and lastly
> I ordered "django-admin startproject mysite" in commad line to make
> "mysite directory" in renewal directory. But, prompt said 'django -admin'
> is not an internal or external command, executable program or a batch file
> even if I tried to solve this problem, I do not know what should i do to
> solve this one. I will look forward your answer :)
>
>
>
> --
> 이 메일은 지정된 수취인만을 위해 작성되었으며, 중요한 정보나 저작권을 포함하고 있을 수 있습니다. 어떠한 권한 없이, 본 문서에
> 포함된 정보의 전부 또는 일부를 무단으로 제3자에게 공개, 배포, 복사 또는 사용하는 것을 엄격히 금지합니다. 만약, 본 메일이 잘못
> 전송된 경우, 발신인 또는 당사에 알려주시고, 본 메일을 즉시 삭제하여 주시기 바랍니다.
> This E-mail may contain confidential information and/or copyright
> material. This email is intended for the use of the addressee only. If you
> receive this email by mistake, please either delete it without reproducing,
> distributing or retaining copies thereof or notify the sender immediately.
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/261dd143-f482-4e6d-9ea9-c00fc4b7644an%
> 40googlegroups.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/CABJxPrH81X%3DkPm%3DTo26u79SqQwoCVKFkKYkL30vqjZxC%2B7zs-g%40mail.gmail.com.


Re: django-admin error

2019-08-19 Thread Naty Mina
that's exactly what i tried to do but it doesn't work 

בתאריך יום ראשון, 18 באוגוסט 2019 בשעה 00:38:55 UTC+3, מאת Muhammad Nadeem:
>
> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE: 
> django-admin startproject mysite
> WHERE "mysite" is the name of your project. you can change this name as 
> you desired. 
>
>
> if further u have any error fell free ping me
>
>
> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina > 
> wrote:
>
>> hi, i'm new in django and trying to create my first project 
>> i followed the documentation and when i try to execute the django-admin 
>> startproject mysite i get error that 'no django settings specified' and to 
>> try 'django-admin.py help' instead for usage.
>> the problem is when i try to do so, i get again the same error message 
>> i need help with that.
>> i attached file so you can see
>> *thank you* 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/f2c4c291-0148-4e3f-9832-a806720e873e%40googlegroups.com.


Re: django-admin error

2019-08-18 Thread DPM
Hi,

Kindly do whatever some told to add in admin.py file above. Thats correct.
After that u can see in admin panel
..

And for heroku what  error you are getting plz share screenshot.
I can help you.

On Mon, 19 Aug, 2019, 2:36 AM Gil Obradors,  wrote:

> 1.-Plese detail more : "But it not run" ?  Any error?  Admin screen
> withous the model?
> You can try doing with the same with decorator and class:
>
> from django.contrib import admin
>
> @admin.register(Pacientes)
> class PacientesAdmin(admin.ModelAdmin)
> pass
>
> Share errors, screen, behaveour...
>
>
> 2.- I don't know heroku but maybe for test/demo your selfPC it could be
> easy for starting...
> Port forwarding and go!
>
>
>
>
> Bests djangos
>
> Missatge de Gabriel Araya Garcia  del dia
> dg., 18 d’ag. 2019 a les 21:41:
>
>> Hi Daniel:
>> I have build a little app in Django, but i have two problems:
>> 1) I can not see the tables in ADMIN, but nevertheless y put in admin.py:
>> from .models import Pacientes
>> admin.site.register(Pacientes)
>>
>> But it not run.
>>
>> 2) I can not upload my project to HEROKU, I've follow all the steps for
>> to do this, but not run
>> Do you know some cpanel to upload my app for demo only (it have 120
>> records)
>>
>> Please, can you help about this?
>>
>> Thanks
>> (excusme my english, my native language is spanish)
>>
>> El sáb., 17 ago. 2019 a las 18:38, Daniel Agbaji ()
>> escribió:
>>
>>> Please check to see it you got install Django properly with the version
>>> of Python you are using.
>>>
>>> On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
>>> wrote:
>>>
 FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
django-admin startproject mysite
 WHERE "mysite" is the name of your project. you can change this name as
 you desired.


 if further u have any error fell free ping me


 On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:

> hi, i'm new in django and trying to create my first project
> i followed the documentation and when i try to execute the
> django-admin startproject mysite i get error that 'no django settings
> specified' and to try 'django-admin.py help' instead for usage.
> the problem is when i try to do so, i get again the same error message
> i need help with that.
> i attached file so you can see
> *thank you*
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%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/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Gabriel Araya Garcia
>> GMI - Desarrollo de Sistemas Informáticos
>> 99.7721.15.70
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/CAKVvSDAW0r1hJ7muJ0cEB9NhTwhWVq1O5yCMo1%3D7OsV04nGLtA%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...@google

Re: django-admin error

2019-08-18 Thread Gil Obradors
1.-Plese detail more : "But it not run" ?  Any error?  Admin screen withous
the model?
You can try doing with the same with decorator and class:

from django.contrib import admin

@admin.register(Pacientes)
class PacientesAdmin(admin.ModelAdmin)
pass

Share errors, screen, behaveour...


2.- I don't know heroku but maybe for test/demo your selfPC it could be
easy for starting...
Port forwarding and go!




Bests djangos

Missatge de Gabriel Araya Garcia  del dia dg.,
18 d’ag. 2019 a les 21:41:

> Hi Daniel:
> I have build a little app in Django, but i have two problems:
> 1) I can not see the tables in ADMIN, but nevertheless y put in admin.py:
> from .models import Pacientes
> admin.site.register(Pacientes)
>
> But it not run.
>
> 2) I can not upload my project to HEROKU, I've follow all the steps for to
> do this, but not run
> Do you know some cpanel to upload my app for demo only (it have 120
> records)
>
> Please, can you help about this?
>
> Thanks
> (excusme my english, my native language is spanish)
>
> El sáb., 17 ago. 2019 a las 18:38, Daniel Agbaji ()
> escribió:
>
>> Please check to see it you got install Django properly with the version
>> of Python you are using.
>>
>> On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
>> wrote:
>>
>>> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
>>>django-admin startproject mysite
>>> WHERE "mysite" is the name of your project. you can change this name as
>>> you desired.
>>>
>>>
>>> if further u have any error fell free ping me
>>>
>>>
>>> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:
>>>
 hi, i'm new in django and trying to create my first project
 i followed the documentation and when i try to execute the django-admin
 startproject mysite i get error that 'no django settings specified' and to
 try 'django-admin.py help' instead for usage.
 the problem is when i try to do so, i get again the same error message
 i need help with that.
 i attached file so you can see
 *thank you*

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%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/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Gabriel Araya Garcia
> GMI - Desarrollo de Sistemas Informáticos
> 99.7721.15.70
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/CAKVvSDAW0r1hJ7muJ0cEB9NhTwhWVq1O5yCMo1%3D7OsV04nGLtA%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/CAK-JoTRhFtARycAprSZnOH77GnqUMGNNiArtrUpN__Qj1-%2Bjww%40mail.gmail.com.


Re: django-admin error

2019-08-18 Thread Gabriel Araya Garcia
Hi Daniel:
I have build a little app in Django, but i have two problems:
1) I can not see the tables in ADMIN, but nevertheless y put in admin.py:
from .models import Pacientes
admin.site.register(Pacientes)

But it not run.

2) I can not upload my project to HEROKU, I've follow all the steps for to
do this, but not run
Do you know some cpanel to upload my app for demo only (it have 120 records)

Please, can you help about this?

Thanks
(excusme my english, my native language is spanish)

El sáb., 17 ago. 2019 a las 18:38, Daniel Agbaji ()
escribió:

> Please check to see it you got install Django properly with the version of
> Python you are using.
>
> On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
> wrote:
>
>> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
>> django-admin startproject mysite
>> WHERE "mysite" is the name of your project. you can change this name as
>> you desired.
>>
>>
>> if further u have any error fell free ping me
>>
>>
>> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:
>>
>>> hi, i'm new in django and trying to create my first project
>>> i followed the documentation and when i try to execute the django-admin
>>> startproject mysite i get error that 'no django settings specified' and to
>>> try 'django-admin.py help' instead for usage.
>>> the problem is when i try to do so, i get again the same error message
>>> i need help with that.
>>> i attached file so you can see
>>> *thank you*
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%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/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com
> 
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAKVvSDAW0r1hJ7muJ0cEB9NhTwhWVq1O5yCMo1%3D7OsV04nGLtA%40mail.gmail.com.


Re: django-admin error

2019-08-18 Thread Mituka Devlin Bwanausi
I recommend this: 
https://www.udemy.com/the-ultimate-beginners-guide-to-django-django-2-python-web-dev-website/

Django 2.2 & Python | The Ulitmate Web Development Bootcamp.

Good lectures and easy to grasp as you will also get through a python 
refresher before you get right into Django. 

On Sunday, August 18, 2019 at 2:18:27 PM UTC+2, Arjun Reddy wrote:
>
> Hi
>>
> I would like to start learning Django and can anyone suggest tutorial is 
> best for beginners.
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/22da02d9-2cb6-4ab4-990f-ec31af83a1dd%40googlegroups.com.


Re: django-admin error

2019-08-18 Thread Mituka Devlin Bwanausi
Type it all in one line.like this "*django-admin startproject mysite*"

Your screen shot shows you trying to do things separately.

On Saturday, August 17, 2019 at 10:33:43 PM UTC+2, Naty Mina wrote:
>
> hi, i'm new in django and trying to create my first project 
> i followed the documentation and when i try to execute the django-admin 
> startproject mysite i get error that 'no django settings specified' and to 
> try 'django-admin.py help' instead for usage.
> the problem is when i try to do so, i get again the same error message 
> i need help with that.
> i attached file so you can see
> *thank you* 
>

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


Re: django-admin error

2019-08-18 Thread Arjun Reddy
>
> Hi
>
I would like to start learning Django and can anyone suggest tutorial is
best for beginners.

-- 
You received this message because you are subscribed to the Google Groups 
"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/CALusEWOJFids%2BP0KibXn4RgBQsrPYKKb2E8EzUxD8yqG5dk17g%40mail.gmail.com.


Re: django-admin error

2019-08-17 Thread Ronit Mishra
You've installed your django correctly. I can see the version in your
snapshot.

Also I think you're trying to call django-admin from a python shell. Just
write the command 'django-admin startproject mysite' on the
terminal/command prompt.

This should do it.


On Sun, Aug 18, 2019 at 4:08 AM Daniel Agbaji  wrote:

> Please check to see it you got install Django properly with the version of
> Python you are using.
>
> On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
> wrote:
>
>> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
>> django-admin startproject mysite
>> WHERE "mysite" is the name of your project. you can change this name as
>> you desired.
>>
>>
>> if further u have any error fell free ping me
>>
>>
>> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:
>>
>>> hi, i'm new in django and trying to create my first project
>>> i followed the documentation and when i try to execute the django-admin
>>> startproject mysite i get error that 'no django settings specified' and to
>>> try 'django-admin.py help' instead for usage.
>>> the problem is when i try to do so, i get again the same error message
>>> i need help with that.
>>> i attached file so you can see
>>> *thank you*
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%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/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%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/CACh0EhyuXD2Xix4uGNTwBr7nPeebnbweogmhOfZx7iLmsFi0BA%40mail.gmail.com.


Re: django-admin error

2019-08-17 Thread Daniel Agbaji
Please check to see it you got install Django properly with the version of
Python you are using.

On Sat, Aug 17, 2019, 4:38 PM Muhammad Nadeem 
wrote:

> FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
> django-admin startproject mysite
> WHERE "mysite" is the name of your project. you can change this name as
> you desired.
>
>
> if further u have any error fell free ping me
>
>
> On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:
>
>> hi, i'm new in django and trying to create my first project
>> i followed the documentation and when i try to execute the django-admin
>> startproject mysite i get error that 'no django settings specified' and to
>> try 'django-admin.py help' instead for usage.
>> the problem is when i try to do so, i get again the same error message
>> i need help with that.
>> i attached file so you can see
>> *thank you*
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%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/CAEnL_2nXTu13StMpfL8EQR6zwhZ6TmpW8RhHYoH69cc-9xWAog%40mail.gmail.com.


Re: django-admin error

2019-08-17 Thread Muhammad Nadeem
FIRST U NEED TO START A NEW PROJECT USING FOLLOWING CODE:
django-admin startproject mysite
WHERE "mysite" is the name of your project. you can change this name as you
desired.


if further u have any error fell free ping me


On Sun, Aug 18, 2019 at 1:32 AM Naty Mina  wrote:

> hi, i'm new in django and trying to create my first project
> i followed the documentation and when i try to execute the django-admin
> startproject mysite i get error that 'no django settings specified' and to
> try 'django-admin.py help' instead for usage.
> the problem is when i try to do so, i get again the same error message
> i need help with that.
> i attached file so you can see
> *thank you*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%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/CALYW77hm8aK%2BNPpfPPexB10ikmQ7Y%2BzezZZULe5mDvgLyVYSSQ%40mail.gmail.com.


django-admin error

2019-08-17 Thread Naty Mina
hi, i'm new in django and trying to create my first project 
i followed the documentation and when i try to execute the django-admin 
startproject mysite i get error that 'no django settings specified' and to 
try 'django-admin.py help' instead for usage.
the problem is when i try to do so, i get again the same error message 
i need help with that.
i attached file so you can see
*thank you* 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1690dca2-2728-452e-81fe-1458af63ba95%40googlegroups.com.


Re: Django Admin Error: pop-up entry form

2013-11-20 Thread Derek
Solved.  You need to add "u" to the unicode representation of your model's 
record.  As in:

def __unicode__(self):
return u'%s' % self.fieldname

This "error" does not show up in the normal admin page for the model, only 
when its accessed via the pop-up route.

On Tuesday, 19 November 2013 20:42:25 UTC+2, Derek wrote:
>
> Hi
>
> I am using Django 1.5.5.  This error happens while running the dev 
> server.  If I click on the "+" button so I can use the pop-up form to add a 
> new entry to a drop-down list (i.e. FK to another model), I get the 
> following error trace when trying to save that form.
>
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/core/handlers/base.py"
>  
> in get_response
>   115. response = callback(request, 
> *callback_args, **callback_kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
>  
> in wrapper
>   372. return self.admin_site.admin_view(view)(*args, 
> **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
>  
> in _wrapped_view
>   91. response = view_func(request, *args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/views/decorators/cache.py"
>  
> in _wrapped_view_func
>   89. response = view_func(request, *args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/sites.py"
>  
> in inner
>   202. return view(request, *args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
>  
> in _wrapper
>   25. return bound_func(*args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
>  
> in _wrapped_view
>   91. response = view_func(request, *args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
>  
> in bound_func
>   21. return func(self, *args2, **kwargs2)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/db/transaction.py"
>  
> in inner
>   223. return func(*args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
>  
> in add_view
>   1010. return self.response_add(request, new_object)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
>  
> in response_add
>   833. (escape(pk_value), escapejs(obj)))
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/functional.py"
>  
> in wrapper
>   196. return func(*args, **kwargs)
> File 
> "/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/html.py"
>  
> in escapejs
>   64. return mark_safe(force_text(value).translate(_js_escapes))
>
> Exception Type: TypeError at /admin/core/item/add/
> Exception Value: expected a character buffer object
>
>
> You can see there are no links to my code, so I am not sure what needs to 
> change or be changed.  Is it Django code itself that is faulty?
>
> Thanks
> Derek
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6ddf3ada-7307-4156-aca1-f0e1ae7a4ad9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Django Admin Error: pop-up entry form

2013-11-19 Thread Derek
Hi

I am using Django 1.5.5.  This error happens while running the dev server.
If I click on the "+" button so I can use the pop-up form to add a new
entry to a drop-down list (i.e. FK to another model), I get the following
error trace when trying to save that form.

File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
  115. response = callback(request, *callback_args,
**callback_kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
in wrapper
  372. return self.admin_site.admin_view(view)(*args,
**kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
in _wrapped_view
  91. response = view_func(request, *args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/views/decorators/cache.py"
in _wrapped_view_func
  89. response = view_func(request, *args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/sites.py"
in inner
  202. return view(request, *args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
in _wrapper
  25. return bound_func(*args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
in _wrapped_view
  91. response = view_func(request, *args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/decorators.py"
in bound_func
  21. return func(self, *args2, **kwargs2)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/db/transaction.py"
in inner
  223. return func(*args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
in add_view
  1010. return self.response_add(request, new_object)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/contrib/admin/options.py"
in response_add
  833. (escape(pk_value), escapejs(obj)))
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/functional.py"
in wrapper
  196. return func(*args, **kwargs)
File
"/home/derek/.virtualenvs/s2s/local/lib/python2.7/site-packages/django/utils/html.py"
in escapejs
  64. return mark_safe(force_text(value).translate(_js_escapes))

Exception Type: TypeError at /admin/core/item/add/
Exception Value: expected a character buffer object


You can see there are no links to my code, so I am not sure what needs to
change or be changed.  Is it Django code itself that is faulty?

Thanks
Derek

-- 
You received this message because you are subscribed to the Google Groups 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF1Wu3PAwPOx%3D_R9JjnM76zWDea51ULNsqzyAWUx5FxjjZnEew%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Wissal Khadrouf WBC
I went the hard way and changed all the null values untill I found out
which one caused a problem
Thanks


2013/4/24 Shawn Milochik 

> Ah, I missed that point. You could temporarily create an __init__ override
> in your model and put the code there.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/r4VivI6pwOs/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Cordialement.


 Wissal KHADROUF
Web Development Engineer
81 Avenue Mers sultan, Grand Casablanca, Maroc
0660 347 547
wissal.khadr...@wbc.ma

-- 
You received this message because you are subscribed to the Google Groups 
"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: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Shawn Milochik
Ah, I missed that point. You could temporarily create an __init__ override
in your model and put the code there.

-- 
You received this message because you are subscribed to the Google Groups 
"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: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Wissal Khadrouf WBC
it's the admin view you're telling me to modify
I'm sorry I'm faily new to django and I'm afraid I will do something wrong!


2013/4/24 Shawn Milochik 

> See what I said above about iterating through the fields in your view. Use
> logging, print statements, or dump output to a file.
>
>
> On Wed, Apr 24, 2013 at 10:39 AM, Wissal Khadrouf WBC <
> wissal.khadr...@wbc.ma> wrote:
>
>> That's what I was thinking,it's from the data
>> But I dont know wich field and how to find out
>>
>>
>> 2013/4/24 Shawn Milochik 
>>
>>> Try iterating through your output in the view and look at field,
>>> field.content, and if field.help_text. Somewhere you have a null value
>>> which is None in Python.
>>>
>>> Since the traceback you posted (if it's complete) is all from Django's
>>> code and not yours, then the error must be in your data.
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/r4VivI6pwOs/unsubscribe?hl=en
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Cordialement.
>>
>>
>>  Wissal KHADROUF
>> Web Development Engineer
>> 81 Avenue Mers sultan, Grand Casablanca, Maroc
>> 0660 347 547
>> wissal.khadr...@wbc.ma
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "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.
>>
>>
>>
>
>
>
> --
> e-mail: sh...@milochik.com
> voicemail or fax: 206-350-8781
> blog: http://milocast.com
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/r4VivI6pwOs/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Cordialement.


 Wissal KHADROUF
Web Development Engineer
81 Avenue Mers sultan, Grand Casablanca, Maroc
0660 347 547
wissal.khadr...@wbc.ma

-- 
You received this message because you are subscribed to the Google Groups 
"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: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Shawn Milochik
See what I said above about iterating through the fields in your view. Use
logging, print statements, or dump output to a file.


On Wed, Apr 24, 2013 at 10:39 AM, Wissal Khadrouf WBC <
wissal.khadr...@wbc.ma> wrote:

> That's what I was thinking,it's from the data
> But I dont know wich field and how to find out
>
>
> 2013/4/24 Shawn Milochik 
>
>> Try iterating through your output in the view and look at field,
>> field.content, and if field.help_text. Somewhere you have a null value
>> which is None in Python.
>>
>> Since the traceback you posted (if it's complete) is all from Django's
>> code and not yours, then the error must be in your data.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/r4VivI6pwOs/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Cordialement.
>
>
>  Wissal KHADROUF
> Web Development Engineer
> 81 Avenue Mers sultan, Grand Casablanca, Maroc
> 0660 347 547
> wissal.khadr...@wbc.ma
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "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.
>
>
>



-- 
e-mail: sh...@milochik.com
voicemail or fax: 206-350-8781
blog: http://milocast.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 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: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Wissal Khadrouf WBC
That's what I was thinking,it's from the data
But I dont know wich field and how to find out


2013/4/24 Shawn Milochik 

> Try iterating through your output in the view and look at field,
> field.content, and if field.help_text. Somewhere you have a null value
> which is None in Python.
>
> Since the traceback you posted (if it's complete) is all from Django's
> code and not yours, then the error must be in your data.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/r4VivI6pwOs/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Cordialement.


 Wissal KHADROUF
Web Development Engineer
81 Avenue Mers sultan, Grand Casablanca, Maroc
0660 347 547
wissal.khadr...@wbc.ma

-- 
You received this message because you are subscribed to the Google Groups 
"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: Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread Shawn Milochik
Try iterating through your output in the view and look at field,
field.content, and if field.help_text. Somewhere you have a null value
which is None in Python.

Since the traceback you posted (if it's complete) is all from Django's code
and not yours, then the error must be in your data.

-- 
You received this message because you are subscribed to the Google Groups 
"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.




Django admin error : coercing to Unicode: need string or buffer, NoneType found

2013-04-24 Thread slim
Hello everyone,

I have this error since a long time but can't figure it out :

*Caught TypeError while rendering: coercing to Unicode: need string or 
buffer, NoneType found*

It happens in admin when I try to add or modify on one of my models 
(display works fine)


This is the model:


class PS(models.Model):
id_ps = models.IntegerField(null=True)
client = models.ForeignKey(Client, null=True, blank=True)
nom_du_site = models.CharField(max_length=250)
rue_livraison = models.TextField(null=True)
complement_adresse = models.TextField(null=True)
code_postal_livraison = models.CharField(max_length=50, null=True)
ville_livraison = models.CharField(max_length=200, null=True)
pays_livraison = models.CharField(max_length=200, null=True)
distributeur = models.CharField(max_length=50, null=True)
tarif = models.CharField(max_length=250, null=True)
type_tarif = models.CharField(max_length=50, null=True)
type_installation = models.CharField(max_length=50, null=True)

def __unicode__(self):
return self.nom_du_site

@property
def pce(self):
try:
return PCE.objects.filter(ps=self)[0]
except IndexError:
return
#
def get_pce(self):
from pce.models import PCE
return PCE.objects.filter(ps=self).exclude(frequence='6M')
#
def get_pce_6m(self):
from pce.models import PCE
return PCE.objects.filter(ps=self,frequence='6M') 



Any idea what am i doing wrong here?


*Traceback:*

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8026/admin/ps/ps/add/
Django Version: 1.2.5
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'easy_thumbnails',
 'django_extensions',
 'contentadmin',
 'south',
 'sentry',
 'sentry.client',
 'indexer',
 'file_uploader',
 'paging',
 'pagination',
 'consommation',
 'ps',
 'pce',
 'profil',
 'analytics',
 'document']
Installed Middleware:
('annoying.middlewares.StaticServe',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'pagination.middleware.PaginationMiddleware')


Template error:
In template 
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/includes/fieldset.html,
 
error at line 19
   Caught TypeError while rendering: coercing to Unicode: need 
string or buffer, NoneType found
   9 : {% for field in line %}


   10 : 


   11 : {% if not line.fields|length_is:'1' and 
not field.is_readonly %}{{ field.errors }}{% endif %}


   12 : {% if field.is_checkbox %}


   13 : {{ field.field }}{{ field.label_tag 
}}


   14 : {% else %}


   15 : {{ field.label_tag }}


   16 : {% if field.is_readonly %}


   17 : {{ field.contents }}


   18 : {% else %}


   19 :   *   {{ field.field }} *


   20 : {% endif %}


   21 : {% endif %}


   22 : {% if field.field.field.help_text %}


   23 : {{ 
field.field.field.help_text|safe }}


   24 : {% endif %}


   25 : 


   26 : {% endfor %}


   27 : 


   28 : {% endfor %}


   29 : 


Traceback:
File 
"/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in 
get_response
  100. response = callback(request, 
*callback_args, **callback_kwargs)
File 
"/usr/local/lib/python2.7/dist-packages/django/contr

Re: Custom model field and Django-admin -- error

2009-08-10 Thread BenW

Excellent that it was reported, but bad that it's not considered a
'bug' -- Any suggestions on how to use date_hierarchy (and probably
others) with my field?

On Aug 10, 8:04 am, Alex Gaynor  wrote:
> On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote:
>
> > Hello,
>
> > I'm working with a legacy database that stores datetimes as unsigned
> > ints.  Rather than do the conversion with properties on the model I've
> > written a custom Field 'UnixDateTimeField':
>
> > class UnixDateTimeField(models.DateTimeField):
>
> >    __metaclass__ = models.SubfieldBase
>
> >    def get_internal_type(self):
> >        return 'PositiveIntegerField'
>
> >    def to_python(self, value):
> >        if value is None or isinstance(value, datetime):
> >            return value
> >        if isinstance(value, date):
> >            return datetime(value.year, value.month, value.day)
> >        return datetime.fromtimestamp( float(value) )
>
> >    def get_db_prep_value(self, value):
> >        return int( time.mktime( value.timetuple() ) )
>
> >    def value_to_string(self, obj):
> >        value = self._get_val_from_obj(obj)
> >        return self.to_python(value).strftime('%Y-%m-%d %H:%M:%S')
>
> > class MyModel(models.Model):
> >    time = UnixDateTimeField()
>
> > # This Works:
> >>> MyModel.objects.filter(time__lte=datetime.now())
> > [, , etc..]
>
> > # This works:
> >>> MyModel.objects.all()[0].time
> > datetime.datetime(2009, 8, 10, 6, 40, 7)
>
> > # Doesn't work:
> >>> MyModel.objects.all().values('time')
> > [{'time': 1249911607L}, {'time': 1249911607L}, {'time':
> > 1249911607L}, ...]
>
> > The same thing happens in the Admin when I specify date_hierarchy in
> > my ModelAdmin a one of these fields.  Why are the standard accessor
> > methods (namely 'to_python()') not being called here?  How can I make
> > the custom Field more robust?
>
> > Thank you,
>
> > Ben
>
> This looks like ticket #9619:http://code.djangoproject.com/ticket/9619
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your
> right to say it." -- Voltaire
> "The people's good is the highest law." -- Cicero
> "Code can always be simpler than you think, but never as simple as you
> want" -- Me
--~--~-~--~~~---~--~~
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: Custom model field and Django-admin -- error

2009-08-10 Thread Jean Stebens

Alex Gaynor wrote:
> On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote:
>   
>> Hello,
>>
>> I'm working with a legacy database that stores datetimes as unsigned
>> ints.  Rather than do the conversion with properties on the model I've
>> written a custom Field 'UnixDateTimeField':
>>
>> class UnixDateTimeField(models.DateTimeField):
>>
>>__metaclass__ = models.SubfieldBase
>>
>>def get_internal_type(self):
>>return 'PositiveIntegerField'
>>
>>def to_python(self, value):
>>if value is None or isinstance(value, datetime):
>>return value
>>if isinstance(value, date):
>>return datetime(value.year, value.month, value.day)
>>return datetime.fromtimestamp( float(value) )
>>
>>def get_db_prep_value(self, value):
>>return int( time.mktime( value.timetuple() ) )
>>
>>def value_to_string(self, obj):
>>value = self._get_val_from_obj(obj)
>>return self.to_python(value).strftime('%Y-%m-%d %H:%M:%S')
>>
>> class MyModel(models.Model):
>>time = UnixDateTimeField()
>>
>> # This Works:
>> 
 MyModel.objects.filter(time__lte=datetime.now())
 
>> [, , etc..]
>> 
>> # This works:
>> 
 MyModel.objects.all()[0].time
 
>> datetime.datetime(2009, 8, 10, 6, 40, 7)
>> 
>> # Doesn't work:
>> 
 MyModel.objects.all().values('time')
 
>> [{'time': 1249911607L}, {'time': 1249911607L}, {'time':
>> 1249911607L}, ...]
>> 
>> The same thing happens in the Admin when I specify date_hierarchy in
>> my ModelAdmin a one of these fields.  Why are the standard accessor
>> methods (namely 'to_python()') not being called here?  How can I make
>> the custom Field more robust?
>>
>> Thank you,
>>
>> Ben
>> 
>
> This looks like ticket #9619: http://code.djangoproject.com/ticket/9619
>
> Alex
>
>   
Beside that - I would like to see the UnixDateTimeField in django by 
default - it's not uncommon to use unix timestamps for applications 
which do support quite alot of databases, especially when mssql is one 
of them.

Cheers,
Jean

--~--~-~--~~~---~--~~
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: Custom model field and Django-admin -- error

2009-08-10 Thread Alex Gaynor

On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote:
>
> Hello,
>
> I'm working with a legacy database that stores datetimes as unsigned
> ints.  Rather than do the conversion with properties on the model I've
> written a custom Field 'UnixDateTimeField':
>
> class UnixDateTimeField(models.DateTimeField):
>
>    __metaclass__ = models.SubfieldBase
>
>    def get_internal_type(self):
>        return 'PositiveIntegerField'
>
>    def to_python(self, value):
>        if value is None or isinstance(value, datetime):
>            return value
>        if isinstance(value, date):
>            return datetime(value.year, value.month, value.day)
>        return datetime.fromtimestamp( float(value) )
>
>    def get_db_prep_value(self, value):
>        return int( time.mktime( value.timetuple() ) )
>
>    def value_to_string(self, obj):
>        value = self._get_val_from_obj(obj)
>        return self.to_python(value).strftime('%Y-%m-%d %H:%M:%S')
>
> class MyModel(models.Model):
>    time = UnixDateTimeField()
>
> # This Works:
>>> MyModel.objects.filter(time__lte=datetime.now())
> [, , etc..]
>>>
>
> # This works:
>>> MyModel.objects.all()[0].time
> datetime.datetime(2009, 8, 10, 6, 40, 7)
>>>
>
> # Doesn't work:
>>> MyModel.objects.all().values('time')
> [{'time': 1249911607L}, {'time': 1249911607L}, {'time':
> 1249911607L}, ...]
>>>
>
> The same thing happens in the Admin when I specify date_hierarchy in
> my ModelAdmin a one of these fields.  Why are the standard accessor
> methods (namely 'to_python()') not being called here?  How can I make
> the custom Field more robust?
>
> Thank you,
>
> Ben
> >
>

This looks like ticket #9619: http://code.djangoproject.com/ticket/9619

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

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



Custom model field and Django-admin -- error

2009-08-10 Thread BenW

Hello,

I'm working with a legacy database that stores datetimes as unsigned
ints.  Rather than do the conversion with properties on the model I've
written a custom Field 'UnixDateTimeField':

class UnixDateTimeField(models.DateTimeField):

__metaclass__ = models.SubfieldBase

def get_internal_type(self):
return 'PositiveIntegerField'

def to_python(self, value):
if value is None or isinstance(value, datetime):
return value
if isinstance(value, date):
return datetime(value.year, value.month, value.day)
return datetime.fromtimestamp( float(value) )

def get_db_prep_value(self, value):
return int( time.mktime( value.timetuple() ) )

def value_to_string(self, obj):
value = self._get_val_from_obj(obj)
return self.to_python(value).strftime('%Y-%m-%d %H:%M:%S')

class MyModel(models.Model):
time = UnixDateTimeField()

# This Works:
>> MyModel.objects.filter(time__lte=datetime.now())
[, , etc..]
>>

# This works:
>> MyModel.objects.all()[0].time
datetime.datetime(2009, 8, 10, 6, 40, 7)
>>

# Doesn't work:
>> MyModel.objects.all().values('time')
[{'time': 1249911607L}, {'time': 1249911607L}, {'time':
1249911607L}, ...]
>>

The same thing happens in the Admin when I specify date_hierarchy in
my ModelAdmin a one of these fields.  Why are the standard accessor
methods (namely 'to_python()') not being called here?  How can I make
the custom Field more robust?

Thank you,

Ben
--~--~-~--~~~---~--~~
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: django-admin error

2008-04-30 Thread [EMAIL PROTECTED]

I know this may sound dumb but are you actually on the correct drive
to be issuing that command?  Also are you using the svn or .96.  Not
that it matters I am just curious.

On Apr 30, 9:57 am, curt <[EMAIL PROTECTED]> wrote:
> I've completed the install of python and django and I'm trying to run
> django-admin to start the first project in the tutorial.  When I enter
> the command:
>
> django-admin.py startproject mysite
>
> I get the following response:
>
> Type 'django-admin.py help' for usage.
>
> What am I doing wrong?
>
> Thanks...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



django-admin error

2008-04-30 Thread curt

I've completed the install of python and django and I'm trying to run
django-admin to start the first project in the tutorial.  When I enter
the command:

django-admin.py startproject mysite

I get the following response:

Type 'django-admin.py help' for usage.

What am I doing wrong?

Thanks...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin Error at /admin/auth/user/1/?

2008-04-05 Thread Sky

I think I solved this problem after I upgrade my python version from
2.3 to 2.5.
before I used python2.3 on Dreamhost, /admin/auth/user/1/ raise a
http404 exception
thanks!

On Apr 6, 7:31 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Sat, Apr 5, 2008 at 1:43 AM, Sky <[EMAIL PROTECTED]> wrote:
>
> > my site is hosted by Dreamhost, Dreamhost can use DATABASE_ENGINE =
> > 'mysql_old'  for djngo, my django admin panel broken at /admin/auth/
> > user/1/ , but /admin/auth/user/1/password/ is fine
> > and on my local compute I used DATABASE_ENGINE = 'mysql' are works
> > fine, why??
> > My django version is the newest svn version,both Dreamhost and my
> > personal compute
>
> I think people will need a few more clues than "admin panel broken" to
> provide any help.  What exactly does broken look like?
>
> Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin Error at /admin/auth/user/1/?

2008-04-05 Thread Karen Tracey
On Sat, Apr 5, 2008 at 1:43 AM, Sky <[EMAIL PROTECTED]> wrote:

>
> my site is hosted by Dreamhost, Dreamhost can use DATABASE_ENGINE =
> 'mysql_old'  for djngo, my django admin panel broken at /admin/auth/
> user/1/ , but /admin/auth/user/1/password/ is fine
> and on my local compute I used DATABASE_ENGINE = 'mysql' are works
> fine, why??
> My django version is the newest svn version,both Dreamhost and my
> personal compute
>

I think people will need a few more clues than "admin panel broken" to
provide any help.  What exactly does broken look like?

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django admin Error at /admin/auth/user/1/?

2008-04-04 Thread Sky

my site is hosted by Dreamhost, Dreamhost can use DATABASE_ENGINE =
'mysql_old'  for djngo, my django admin panel broken at /admin/auth/
user/1/ , but /admin/auth/user/1/password/ is fine
and on my local compute I used DATABASE_ENGINE = 'mysql' are works
fine, why??
My django version is the newest svn version,both Dreamhost and my
personal compute
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin error?

2008-02-25 Thread nwgadgetguy

FYI: The 'max_digits' specifies the field size,
the 'decimal_places' specifies where to place the decimal point within
the field.

;o) Have a nice day, and Happy Programming!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin error?

2008-02-25 Thread PB

That was it. Cheers!

On Feb 24, 3:10 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > On Sat, 2008-02-23 at 06:42 -0800, PB wrote:
> > > When trying to add 46.229253 to a floatfield
> > > I get displayed error:
>
> > > Please enter a valid decimal number with a whole part of at most -19
> > > digits
>
> > > Any ideas?
> On Sun, Feb 24, 2008 at 9:04 AM, PB <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm using Django 0.96. The model has the lines:
>
> > latitude = models.FloatField(null=True, max_digits=12,
> > decimal_places=31, blank=True)
> > longitude = models.FloatField(null=True, max_digits=12,
> > decimal_places=31, blank=True)
>
> > Then when trying to use the admin tool it throws the above error.
>
> Well, 12-31 is -19.   I'm guessing (without checking the doc) that
> max_digits is supposed to include decimal_places, thus always be greater
> than or equal to it, and yours are not.  If you want a whole part max of 12,
> decimal part max of 31, make your max_digits 12+31, not 12.
>
> Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin error?

2008-02-24 Thread Karen Tracey
> On Sat, 2008-02-23 at 06:42 -0800, PB wrote:
> > When trying to add 46.229253 to a floatfield
> > I get displayed error:
>
> > Please enter a valid decimal number with a whole part of at most -19
> > digits
>
> > Any ideas?

On Sun, Feb 24, 2008 at 9:04 AM, PB <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm using Django 0.96. The model has the lines:
>
> latitude = models.FloatField(null=True, max_digits=12,
> decimal_places=31, blank=True)
> longitude = models.FloatField(null=True, max_digits=12,
> decimal_places=31, blank=True)
>
> Then when trying to use the admin tool it throws the above error.
>

Well, 12-31 is -19.   I'm guessing (without checking the doc) that
max_digits is supposed to include decimal_places, thus always be greater
than or equal to it, and yours are not.  If you want a whole part max of 12,
decimal part max of 31, make your max_digits 12+31, not 12.

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin error?

2008-02-24 Thread PB

Hi,

I'm using Django 0.96. The model has the lines:

latitude = models.FloatField(null=True, max_digits=12,
decimal_places=31, blank=True)
longitude = models.FloatField(null=True, max_digits=12,
decimal_places=31, blank=True)

Then when trying to use the admin tool it throws the above error.




On Feb 23, 10:57 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2008-02-23 at 06:42 -0800, PB wrote:
> > When trying to add 46.229253 to a floatfield
> > I get displayed error:
>
> > Please enter a valid decimal number with a whole part of at most -19
> > digits
>
> > Any ideas?
>
> What happens when you do enter a float with negative nineteen (or fewer)
> digits? Does it work then?
>
> Perhaps a few more clues are necessary here: what version of Django are
> you using (since FloatField has changed within the last 12 months)? What
> does your model look like? What happens if you reduce it to a small
> example containing just that field?
>
> Regards,
> Malcolm
>
> --
> On the other hand, you have different 
> fingers.http://www.pointy-stick.com/blog/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin error?

2008-02-23 Thread Malcolm Tredinnick


On Sat, 2008-02-23 at 06:42 -0800, PB wrote:
> When trying to add 46.229253 to a floatfield
> I get displayed error:
> 
> Please enter a valid decimal number with a whole part of at most -19
> digits
> 
> Any ideas?

What happens when you do enter a float with negative nineteen (or fewer)
digits? Does it work then?

Perhaps a few more clues are necessary here: what version of Django are
you using (since FloatField has changed within the last 12 months)? What
does your model look like? What happens if you reduce it to a small
example containing just that field?

Regards,
Malcolm

-- 
On the other hand, you have different fingers. 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django admin error?

2008-02-23 Thread PB

When trying to add 46.229253 to a floatfield
I get displayed error:

Please enter a valid decimal number with a whole part of at most -19
digits

Any ideas?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---