Re: Having problem with a api data

2020-10-11 Thread surendra bhaskar
Thank you
Surendra Ediga



On Sun, Oct 11, 2020 at 12:55 AM Roger Gammans 
wrote:

> This is really a JavaScript question not a Django one.
>
> But since I can see the problem...  ,
>
> The issue is 'dissmal-info' isn't a valid Js identifier, the browser is
> trying to subtract the nonexistent 'info' variable from the 'dismissal'
> value. You should be able to use ['dismissal-info'] instead of .
> dismissal-info.
>
>
>
>
>
>
>
> On 10 October 2020 07:19:06 BST, surendra bhaskar <
> surendra.bhaska...@siesgst.ac.in> wrote:
> >*I am able to get all data from api but  not able to get certainvalues
> >which have - in between of 2 words*
> >"dismissal": "catch",
> >"SR": 120,
> >"6s": 0,
> >"4s": 2,
> >"M": 0,
> >"B": 10,
> >"R": 12,
> >"dismissal-info": "c Curran b Chawla", <== this type is not
> >working
> >"batsman": "RG Sharma (c)",
> >"pid": "34102"
> >
> >
> >* Trying this code to get data  *
> > document.write(JSON.stringify(data.data.fielding[0].scores[0].SR)) <==
> >working
> > document.write(JSON.stringify(data.data.batting[0].scores[0].batsman))
> ><== working
> >document.write(JSON.stringify(data.data.batting[0].scores[0].dismissal))
> ><== working
> >
>
> >document.write(JSON.stringify(data.data.batting[0].scores[0].dismissal-info))
> ><==showing  info is not defined
> >*I am tried with a lot but finally failed to get this type of data so
> >can
> >you pls help me out *
> >[image: image.png]
> >*Thank You,*
> >*Surendra Ediga*
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>

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


Having problem with a api data

2020-10-10 Thread surendra bhaskar
*I am able to get all data from api but  not able to get certainvalues
which have - in between of 2 words*
"dismissal": "catch",
"SR": 120,
"6s": 0,
"4s": 2,
"M": 0,
"B": 10,
"R": 12,
"dismissal-info": "c Curran b Chawla", <== this type is not
working
"batsman": "RG Sharma (c)",
"pid": "34102"


* Trying this code to get data  *
 document.write(JSON.stringify(data.data.fielding[0].scores[0].SR)) <==
working
  document.write(JSON.stringify(data.data.batting[0].scores[0].batsman))
<== working
  document.write(JSON.stringify(data.data.batting[0].scores[0].dismissal))
<== working

 document.write(JSON.stringify(data.data.batting[0].scores[0].dismissal-info))
<==showing  info is not defined
*I am tried with a lot but finally failed to get this type of data so can
you pls help me out *
[image: image.png]
*Thank You,*
*Surendra Ediga*

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


Re: hello world

2020-03-26 Thread surendra bhaskar
Follow official documentation it's best

On Thu, 26 Mar, 2020, 6:25 PM victor awakan,  wrote:

>
> Have you try to follow the official documentation tutorial ?
>
> On Thu 26. Mar 2020 at 14.48, Mr Black Hat 
> wrote:
>
>> hello i am beginner in django, guys can you help me from where should i
>> learn django
>> i know how to create projects in django and also multiple apps, but i
>> dont know how to templating 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/264cdf8d-d508-4919-b2bb-ca9c67ffa6df%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/CAAipwd87-CuvFzb9B4NccQ%3DxRJLogM7GeZjPXSzENUE3v2AchA%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/CAPT84Tmvv-EmCKiwkcza-AYeMBkz1E1OD5TNDq%3D9SCAF%3DFV7Ew%40mail.gmail.com.


Re: cant import views

2020-03-17 Thread surendra bhaskar
There is some error in function

On Tue, 17 Mar, 2020, 11:31 PM דביר חומרי,  wrote:

> i was following the toturial and i could'nt find why this error is accure.
> polls/urls.py'
>
> from django.urls import path
>
> from . import views
>
> urlpatterns = [
> path('', views.index, name='index'),
> ]
>
>
> and got this error:
>
> Traceback (most recent call last):
>   File "c:\Users\..polls\urls.py", line 20, in 
> from . import views
> ImportError: cannot import name 'views'
>
> p.s. views.py is in the same directory as urls.py
>
> ¶ \
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9c1f34af-2f3f-4a29-964f-056dd5f74ac2%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/CAPT84TmC%2B80a-U1xypr53RA%3DVjPekqx0BoYQh%2BfkzpodcSZo6Q%40mail.gmail.com.


Re: I AM getting this error plss help me

2020-03-15 Thread surendra bhaskar
Thanks a lot 

On Sun, 15 Mar, 2020, 9:35 AM Jorge Gimeno,  wrote:

> Can you try closing the powershell, running the Powershell as an admin,
> then trying again?
>
> Another option would be to try from the command terminal instead of
> Powershell.
>
> Let us know how it goes.
>
> -Jorge
>
> On Sat, Mar 14, 2020 at 5:25 AM surendra ediga 
> wrote:
>
>> Traceback (most recent call last):
>>   File "C:\Users\Asus\projects\manage.py", line 21, in 
>> main()
>>   File "C:\Users\Asus\projects\manage.py", line 17, in main
>> execute_from_command_line(sys.argv)
>>   File
>> "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py",
>> line 401, in execute_from_command_line
>> utility.execute()
>>   File
>> "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py",
>> line 395, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py",
>> line 244, in fetch_command
>> klass = load_command_class(app_name, subcommand)
>>   File
>> "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py",
>> line 38, in load_command_class
>> return module.Command()
>> AttributeError: 'NoneType' object has no attribute 'Command'
>> PS C:\Users\Asus\projects>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/df235239-985c-413b-a5d4-1ab5a3c5e69f%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANfN%3DK936bYPGVOX3GRoCOkrugzTCYsRAibkv6FR7Sj6n8jrGA%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/CAPT84TkVbwKRHC-RWsrhVrSG%2B5vcYL89-Sppq5qijDLxGb1T1Q%40mail.gmail.com.


Re: Making a scheduling app/programm for recurring treatment

2019-11-01 Thread Nithin Bhaskar
Hey,

I have send you a request. I think the name may appear as 'Charu'
Do let me know when you are free

Thanks

On Thu, 31 Oct 2019 at 14:15, Motaz Hejaze  wrote:

> Any time , send me a text message at first
>
> On Thu, 31 Oct 2019, 6:10 am Nithin Bhaskar, 
> wrote:
>
>> Hey,
>> Thanks.
>> What would be the right time to call you?
>>
>> On Wed, 30 Oct 2019 at 22:36, Motaz Hejaze  wrote:
>>
>>> I can cooperate with you ..
>>> Talk to me on skype : m3tz-hjze
>>>
>>> On Wed, 30 Oct 2019, 6:43 pm Uzama Zaid Mohammed Jaward, <
>>> uzamajaw...@gmail.com> wrote:
>>>
>>>> I think you don’t get any answer for these like questions in here. This
>>>> is a forum to discuss about Django and Support. First you have to design
>>>> the system. Then onwards you can use Django. You might get answer for this
>>>> if you will post this in stack overflow
>>>>
>>>> On Wed, Oct 30, 2019 at 19:34, Nithin Bhaskar 
>>>> wrote:
>>>>
>>>>> Well to be frank, I am stuck right at the beginning itself.
>>>>>
>>>>> I am working in a public sector with limiter resources and a huge
>>>>> patient load and almost no funding. I was thinking of making patient
>>>>> scheduling a bit manageable and easy in my hospital.
>>>>>
>>>>> I have not yet figured out how to go about with it. I know its too
>>>>> naive, but i could really use some help starting from the core basics. I
>>>>> have just made an app called scheduler1.
>>>>> 1. How do i progam treatments in the  7 scheduling rooms and block
>>>>> them for the next 7 weeks.
>>>>> 2. Certain procedures are done only in room 1 and 2. So in option 4
>>>>> (modality of treatment), if i have chosen them, the patients have to be
>>>>> scheduled in these rooms.
>>>>>
>>>>> But before this, I need to start with the basic layout of the app.
>>>>>
>>>>> I understand that you may find it similar to teaching a kindergarten
>>>>> kid, but I would be really grateful if you could help me put
>>>>>
>>>>> Thanking you
>>>>>
>>>>> Regards..
>>>>>
>>>>>
>>>>>
>>>>> On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup 
>>>>> wrote:
>>>>>
>>>>>> Hi Nithin,
>>>>>>
>>>>>> On 30/10/2019 08.19, Nithin Bhaskar wrote:
>>>>>> >
>>>>>> > I am completely new to django and python and don't have a
>>>>>> background in
>>>>>> > programming
>>>>>> > I have taught myself a bit of python and django and use PyCharm
>>>>>> >
>>>>>> > Kindly help me out
>>>>>> >
>>>>>>
>>>>>> What exactly do you need help with? What have you done so far? Where
>>>>>> are
>>>>>> you stuck?
>>>>>>
>>>>>> You need to be more specific.
>>>>>>
>>>>>> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
>>>>>> .
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.com?utm_medium=email_source=footer>
>>>>&g

Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
Hey,
Thanks.
What would be the right time to call you?

On Wed, 30 Oct 2019 at 22:36, Motaz Hejaze  wrote:

> I can cooperate with you ..
> Talk to me on skype : m3tz-hjze
>
> On Wed, 30 Oct 2019, 6:43 pm Uzama Zaid Mohammed Jaward, <
> uzamajaw...@gmail.com> wrote:
>
>> I think you don’t get any answer for these like questions in here. This
>> is a forum to discuss about Django and Support. First you have to design
>> the system. Then onwards you can use Django. You might get answer for this
>> if you will post this in stack overflow
>>
>> On Wed, Oct 30, 2019 at 19:34, Nithin Bhaskar 
>> wrote:
>>
>>> Well to be frank, I am stuck right at the beginning itself.
>>>
>>> I am working in a public sector with limiter resources and a huge
>>> patient load and almost no funding. I was thinking of making patient
>>> scheduling a bit manageable and easy in my hospital.
>>>
>>> I have not yet figured out how to go about with it. I know its too
>>> naive, but i could really use some help starting from the core basics. I
>>> have just made an app called scheduler1.
>>> 1. How do i progam treatments in the  7 scheduling rooms and block them
>>> for the next 7 weeks.
>>> 2. Certain procedures are done only in room 1 and 2. So in option 4
>>> (modality of treatment), if i have chosen them, the patients have to be
>>> scheduled in these rooms.
>>>
>>> But before this, I need to start with the basic layout of the app.
>>>
>>> I understand that you may find it similar to teaching a kindergarten
>>> kid, but I would be really grateful if you could help me put
>>>
>>> Thanking you
>>>
>>> Regards..
>>>
>>>
>>>
>>> On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup 
>>> wrote:
>>>
>>>> Hi Nithin,
>>>>
>>>> On 30/10/2019 08.19, Nithin Bhaskar wrote:
>>>> >
>>>> > I am completely new to django and python and don't have a background
>>>> in
>>>> > programming
>>>> > I have taught myself a bit of python and django and use PyCharm
>>>> >
>>>> > Kindly help me out
>>>> >
>>>>
>>>> What exactly do you need help with? What have you done so far? Where
>>>> are
>>>> you stuck?
>>>>
>>>> You need to be more specific.
>>>>
>>>> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAKJvVH0v-Ar%2BOct%2BNX2oCX89vbOX4RBWXqYTEbZMXumschS9_g%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAOHA2_3nsSstXkQBp6oWRu7PiYNCfTO0FYCh5T36%3DhFFUBTdeg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAOHA2_3nsSstXkQBp6oWRu7PiYNCfTO0FYCh5T36%3DhFFUBTdeg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-eT3%3DX019DVOpDWUqi-YYFJsJTHBy_NPewMOOU7L%3DhH_w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHV4E-eT3%3DX019DVOpDWUqi-YYFJsJTHBy_NPewMOOU7L%3DhH_w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

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


Re: Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
Well to be frank, I am stuck right at the beginning itself.

I am working in a public sector with limiter resources and a huge patient
load and almost no funding. I was thinking of making patient scheduling a
bit manageable and easy in my hospital.

I have not yet figured out how to go about with it. I know its too naive,
but i could really use some help starting from the core basics. I have just
made an app called scheduler1.
1. How do i progam treatments in the  7 scheduling rooms and block them for
the next 7 weeks.
2. Certain procedures are done only in room 1 and 2. So in option 4
(modality of treatment), if i have chosen them, the patients have to be
scheduled in these rooms.

But before this, I need to start with the basic layout of the app.

I understand that you may find it similar to teaching a kindergarten kid,
but I would be really grateful if you could help me put

Thanking you

Regards..



On Wed, 30 Oct 2019 at 18:59, Kasper Laudrup  wrote:

> Hi Nithin,
>
> On 30/10/2019 08.19, Nithin Bhaskar wrote:
> >
> > I am completely new to django and python and don't have a background in
> > programming
> > I have taught myself a bit of python and django and use PyCharm
> >
> > Kindly help me out
> >
>
> What exactly do you need help with? What have you done so far? Where are
> you stuck?
>
> You need to be more specific.
>
> 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/e4a53cf5-2dd4-49cb-a6a2-b59cdaf93ce3%40stacktrace.dk
> .
>

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


Making a scheduling app/programm for recurring treatment

2019-10-30 Thread Nithin Bhaskar
I am trying to make a scheduling app/program for recurring treatments..ie.. 
for patients requiring treatments daily (5 days a week) for about 6-7 weeks.

Scheduling has to happen for 6-7 rooms with each room accommodating 50 
patients each per day, and each treatment slot extending anywhere between 
20-40min (based on the site and type of treatment)

My idea is to have the following data in the front end:

   1. patient name
   2. Hospital ID
   3. Site of treatment
   4. modality of treatment
   5. Expected starting date
   6. No of fractions (no. of recurrences)

Based on the data on 3-6 above, the room has to be allotted for the patient 
and also further booking for the next 6-7weeks (based on the no. of 
fractions) has to be blocked for him [except on saturdays and sundays] 
against his name and ID.

I am completely new to django and python and don't have a background in 
programming
I have taught myself a bit of python and django and use PyCharm

Kindly help me out

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/257b2fd2-3b93-4370-8bd4-f07b47f64d5a%40googlegroups.com.


Error decoding password stored in mysql : binascii.Error: Incorrect padding

2018-03-14 Thread uday bhaskar
Hello Everyone. 

I am trying to decode previously encoded and stored in mysql but ending up 
with binascii.Error: Incorrect padding error. I have been using sqllite for 
a while with same functionality used to work . When I changed to mysql it 
broke things . Any help with it is much appreciated. 


>>> dbins.user_pass
*"b'ZWJzMTJndTFTJEhANUg=\\n'"*

>>> base64.decodebytes(dbins.user_pass)
Traceback (most recent call last):
  File "D:\Development\sss\pyenv\lib\base64.py", line 517, in 
_input_type_check
m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 1, in 
  File "D:\Development\sss\pyenv\lib\base64.py", line 552, in decodebytes
_input_type_check(s)
  File "D:\Development\sss\pyenv\lib\base64.py", line 520, in 
_input_type_check
raise TypeError(msg) from err
TypeError: expected bytes-like object, not str

>>> base64.decodebytes(dbins.user_pass.encode("utf-8"))
Traceback (most recent call last):
  File "", line 1, in 
  File "D:\Development\sss\pyenv\lib\base64.py", line 553, in decodebytes
return binascii.a2b_base64(s)
*binascii.Error: Incorrect padding*

Thanks,
Uday.

-- 
You received this message because you are subscribed to the Google Groups 
"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/ffe9a87d-9c06-48af-a943-593d2879a00e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install and use Django

2018-02-26 Thread Bhaskar Bhushan


On Friday, February 9, 2018 at 3:58:19 AM UTC+5:30, Inderjeet Kaur wrote:
>
> Hi 
>
> I am new to Django. can anyone please help me with installation and 
> starting a project. Does Django have IDE like dreamweaver or Visual studio 
> to design a website?
> I have installed Python 3.6 on my Windows machine. Also I have downloaded 
> and installed Django files at 
> location C:\Users\Vismaad\Documents\Django-2.0.2\build\lib\django.
>
>I have no idea how to move ahead. What are Django-admin-tools?
>
> Thanks!
>



Hii Indrajeet,
You can use virtual environment which would help you to 
separate your project from the rest of the project working on your computer 
and is highly recommended.
 make a directory on your desktop(mkdir {name of the 
folder})
 cd (name of the folder)
 virtualenv .  (creates a virtual enviroment)
 source bin/activate (activates the virtualenv)
 pip install django (downloads the latest version of 
django)
 pip install django==(specific version if you want to 
download)
 ls(shows one manage.py file)
 python manage.py runserver generates your first django 
powered page.




 

-- 
You received this message because you are subscribed to the Google Groups 
"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/de4f6ed8-702f-4405-803d-0324a4e846ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help me kick start the ecommerce site using Django+mongodb by answering the questions.

2016-05-09 Thread Bhaskar rao
Hello everyone,

We are about to start this project this week and I really need someones 
help to start it better.

We are building an e-commerce web application using Django and mongodb and 
we have couple of questions to start with.


   1. Can I use django.contrib.auth.user etc or or any mongo package or 
   need to write my own auth system ? 
   2. Can I use Django all auth, mezzanine, rest framework etc ? Do I have 
   to write all these things on my own ? Let me know if I have to use multiple 
   databases here (nosql + sql) so we can use mezzanine, allauth using sql 
   database. But note that we dont have any preference. Want to know the 
   correct way.
   3. Please suggest python/Django packages for mongodb with django(like 
   mongoengine or mongo-nonrel or django-mongoengine etc) that suits points 1 
   and 2 or our application. I dont know which actually works well. 
   
I can experiment all these that would delay the project so if anyone could 
answer these, I can proceed happily :)

Please let me know for any questions.

-- 
You received this message because you are subscribed to the Google Groups 
"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/5b3a2d77-b77b-4592-87c1-2cfe4563607f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


csrf middleware uses only request.POST query dict during csrf check, and not request.raw_post_data

2012-01-07 Thread Bhaskar
I have two django apps in my django website:

app1:
set of views (REST apis):
 - sends empty response with csrf cookie set for GET requests
 - accept JSON string as input for POST requests and do some business
operations

app2:
set of views (django UI client which consumes apis from app1):
 - accept data from django forms/ajax posts in JSON format
 - performs some operations with the data
 - invokes the REST apis from app1 and sends the JSON data (using
urllib2 package)

In this scenario, I wish to use the built-in django csrf protection
I encountered '403 FORBIDDEN' http errors and finally tried the
following code which theoretically should work as per my knowledge:

Sample view of my app2:
def addSomething(request):
if request.method == 'POST':
userData = json.loads(request.raw_post_data)
# I make sure csrf cookie and csrfmiddlewaretoken are set in
my request:
#   - I first make a 'GET' request, get the csrf token
#   - Set the csrf cookie, and update csrfmiddlewaretoken
in my POST data
#   - convert my POST data to JSON , use urllib2 to invoke
the POST request
cookieHandler = urllib2.HTTPCookieProcessor()
opener = urllib2.build_opener(urllib2.HTTPHandler(),
cookieHandler)
urllib2.install_opener(opener)
url = 'http://www.mysite.com/add/'
urllib2.urlopen(url)
csrf_cookie = None
for cookie in cookieHandler.cookiejar:
if cookie.name == 'csrftoken':
csrf_cookie = cookie
break
if csrf_cookie:
userData['csrfmiddlewaretoken']=csrf_cookie.value
req = urllib2.Request(url, json.dumps(userData))
response = urllib2.urlopen(req)
return HttpResponse(response)

Now, as per django csrf middleware, I am sending the same, valid csrf
token in both cookie and in POST data
But still the above code will give me '403 forbidden'
after browsing csrf.py code, I could see that, while processing the
view, the csrf token is taken from request.POST only during the csrf
check

But my POST data is a json string, and not a django POST query dict
The middleware thinks that my csrf cookie and csrfmiddlewaretoken
values are not matching and raises 403 http error

Now my above code will work only if I do csrf_exempt(which is not good
for me)
or
Change my REST api to accept urlencoded parameters instead of JSON
string and make my app2 to invoke api with querydict instead of JSON
string (which is also not good for me)

My question is - can the csrf.py be changed so that it uses either
request.POST query dict or request.raw_post_data during csrf
comparison?

NOTE:
my environment details:
os: windows 7
python 2.7
django 1.3.1
code reference in csrf.py where request.POST is accessed to get the
csrfmiddleware token:
django\middleware\csrf.py
Line no 199: # check incoming token
Line no 200: request_csrf_token =
request.POST.get('csrfmiddlewaretoken', '')

I have modified the csrf.py so that it refers to request.raw_post_data
as well in my environment. it works for me
I am new to REST api implementation and stuff, so please correct me if
I am missing something here
looking forward for help
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: popup forms

2010-01-29 Thread Bhaskar Gara
That where I stuck.. I am new to Django so I confuse where to add
what? what name i need to give to the widget,form etc.,

Can you please help me.

Thank you
Bhaskar

On Jan 29, 1:45 am, andreas schmid <a.schmi...@gmail.com> wrote:
> hi, yes it works perfectly :)
>
> follow the steps on the turorial here
>
> http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/
>
> sometimes its not so clear where to put the code... if you have questions ill 
> try to help you.
>
> ill make a "more complete" tutorial on my blog soon.
>
>
>
> Bhaskar Gara wrote:
> > Hi Andrew,  Do you have any luck on this. I need same functionality.
>
> > On Nov 30 2009, 5:40 am, andreas schmid <a.schmi...@gmail.com> wrote:
>
> >> Emily Rodgers wrote:
>
> >>> On Oct 13, 1:20 pm, andreas schmid <a.schmi...@gmail.com> wrote:
>
> >>>> thank you very much for pointing me to the right path!!
> >>>> ill try to understand the behaviour and report about my progress...
>
> >>>> Andrew Ingram wrote:
>
> >>>>> I'm assuming you are doing this somewhere other than the admin, or in
> >>>>> custom views, so I'll explain how the admin stuff works.
>
> >>>>> Basically, when you create thepopupwindowyou give it a name which
> >>>>> can be used the uniquely identify the field that is using thepopup
> >>>>> (some variant on the field id would be ideal). Your main page (not the
> >>>>> popup) should also have a javascript function to be called after the
> >>>>> new author is saved (in the case of django admin, this function is
> >>>>> called dismissAddAnotherPopup and is in RelatedObjectLookup.js).
>
> >>>>> Now the clever part (which I had to hunt around for when I needed this
> >>>>> functionality, you can find it around line 608 in
> >>>>> django.contrib.admin.options.py), is that when you successfully save
> >>>>> the new author, you return an HttpResponse that consists of nothing
> >>>>> but a script tag that executes
> >>>>> owner.yourFunctionName(window_name,new_object_id (in the case of the
> >>>>> django admin this would be owner.dismissAddAnotherPopup), window_name
> >>>>> is the unique identifier you passed in originally.
>
> >>>>> This causes the browser to execute the function in the ownerwindow
> >>>>> (the one that created thepopup) with the parameters you specified -
> >>>>> which includes the ID of the new object. Django's code also provides
> >>>>> the representation string of the object so it can be added to the
> >>>>> select box.
>
> >>>>> Then you just make your JS function close thepopupwith 
> >>>>> window_name.close().
>
> >>>>> I may not have explained it that well, but the key parts are in
> >>>>> RelatedObjectLookup.js and options.py (near line 608).
>
> >>>>> I hope this helps.
>
> >>>>> - Andrew Ingram
>
> >>>>> 2009/10/13 nabucosound <hecto...@gmail.com>:
>
> >>>>>> This is the default behaviour in Django Admin, dude...
>
> >>>>>> On Oct 13, 9:43 am, andreas schmid <a.schmi...@gmail.com> wrote:
>
> >>>>>>> hi,
>
> >>>>>>> how can i achieve a behaviour like in the admin backend where i can 
> >>>>>>> add
> >>>>>>> a related object through apopupwindowand have it selectable after i
> >>>>>>> saved the related form?
>
> >>>>>>> for example:
> >>>>>>> im copleting the form book and i have to select the author but it 
> >>>>>>> doesnt
> >>>>>>> exist yet... so i click on the + (add) button and apopupwindowappears
> >>>>>>> where i create the editor object, and i can select it in the book form
> >>>>>>> right after i saved and closed thispopupwindow.
>
> >>>>>>> can somebody point me to the code?
>
> >>>>>>> thank you in advance...
>
> >>> You might find this 
> >>> helpful:http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/
>
> >>> Em
>
> >> the tutorial is nice but i cant get it really working. the problem is
> >> that thepopupopens but i get a:
>
> >>     TypeError at

Session Management

2010-01-27 Thread Bhaskar Gara
Hi,

Right now I am tracking my subcriber session,  I have a new
requirement.  From our website, the subcriber can go to different
website and take the exam. Once he finish that exam, I need to send a
request to their database to get the result of that exam.

How can I track the second website activities (start and end). Do I
need to create one more session to track that ?  Is it possible
Session inside Session.


Thank you
Bhaskar

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Python Graph

2010-01-27 Thread Bhaskar Gara
I am really stupid. After cut & Paste I need to double check what i
pasted.

Thank you very much Dan and sorry for wasting your time.

Lesson learned.

On Jan 27, 11:16 am, Daniel Hilton <daniel.hil...@gmail.com> wrote:
> 2010/1/27 Bhaskar Gara <bacch...@gmail.com>:
>
>
>
>
>
> > No luck.
>
> > url.py
> > url(r'^member/score/compare/$', direct_to_template,
> >            {'template': 'member_score_compare.html'},
> > name='member_score_compare'),
>
> > view.py
> > def prev_score(request):
> >    template_name = 'member_score_compare.html'
> >    graph = graphs.BarGraph('vBar')
> >    graph.values = [380, 150, 260, 310, 430]
> >    myGraph =  graph.create()
> >    return render_to_response(template_name,
> >                   { 'graph': myGraph },
> >                    context_instance=RequestContext(request))
>
> > thank you
> > Bhaskar
>
> In your example, the request will never touch your view function as
> you're using the generic view to render straight to template.
> Try placing this at the top of your urls.py:
>
> from YOUR_APP_NAME.views import view
>
> And then in your urls.py:
>
> url(r'^member/score/compare/$', view,
>             {'template': 'member_score_compare.html'},
>  name='member_score_compare'),
>
> Although you'll prob get an error on your view name. Have a look 
> at:http://docs.djangoproject.com/en/1.1/topics/http/urls/#topics-http-urls
>
> HTH
>
> Dan
>
>
>
>
>
>
>
> > On Jan 27, 3:40 am, Daniel Hilton <daniel.hil...@gmail.com> wrote:
> >> 2010/1/27 Bhaskar Gara <bacch...@gmail.com>:
>
> >> > Hi,
>
> >> >    I am very new to django.  I am trying to use this library for my
> >> > graphs
> >> >http://www.gerd-tentler.de/tools/pygraphs/?page=introduction
>
> >> > In my Views.py
>
> >> > prev_score(request):
> >> >        graph = graphs.BarGraph('vBar')
> >> >        graph.values = [380, 150, 260, 310, 430]
> >> >        print graph.create()
>
> >> > In my Template  "score_compare.html"  in between the screen  I kept
> >> > below code where it need to display the graph.
>
> >> >                {{ prev_score }}
>
> >> > It not erroring out,  but the graph is not displaying.  Please help.
>
> >> > Thank you
> >> > Bhaskar
>
> >> Within a view function you can't print html out, you need to return
> >> the output of the function.
>
> >> So, using your example, this should give you your graph:
>
> >> from django.template import loader, Context
>
> >> def prev_score(request):
> >>     graph = graphs.BarGraph('vBar')
> >>     graph.values = [380, 150, 260, 310, 430]
> >>     myGraph =  graph.create()
> >>     t = loader.get_template('my_template.html')
> >>     c = Context({ 'graph': myGraph })
> >>     return HttpResponse(t.render(c))
>
> >> Have a read through this part of the 
> >> documentation:http://docs.djangoproject.com/en/1.1/topics/http/views/#topics-http-v...
>
> >> HTH
> >> Dan
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group.
> >> > To post to this group, send email to django-us...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > django-users+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/django-users?hl=en.
>
> >> --
> >> Dan Hilton
> >> www.twitter.com/danhiltonwww.DanHilton.co.uk
> >> - Hide quoted text -
>
> >> - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Dan Hilton
> www.twitter.com/danhiltonwww.DanHilton.co.uk
> - Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Python Graph

2010-01-27 Thread Bhaskar Gara
No luck.

url.py
url(r'^member/score/compare/$', direct_to_template,
{'template': 'member_score_compare.html'},
name='member_score_compare'),


view.py
def prev_score(request):
template_name = 'member_score_compare.html'
graph = graphs.BarGraph('vBar')
graph.values = [380, 150, 260, 310, 430]
myGraph =  graph.create()
return render_to_response(template_name,
   { 'graph': myGraph },
context_instance=RequestContext(request))

thank you
Bhaskar

On Jan 27, 3:40 am, Daniel Hilton <daniel.hil...@gmail.com> wrote:
> 2010/1/27 Bhaskar Gara <bacch...@gmail.com>:
>
>
>
>
>
> > Hi,
>
> >    I am very new to django.  I am trying to use this library for my
> > graphs
> >http://www.gerd-tentler.de/tools/pygraphs/?page=introduction
>
> > In my Views.py
>
> > prev_score(request):
> >        graph = graphs.BarGraph('vBar')
> >        graph.values = [380, 150, 260, 310, 430]
> >        print graph.create()
>
> > In my Template  "score_compare.html"  in between the screen  I kept
> > below code where it need to display the graph.
>
> >                {{ prev_score }}
>
> > It not erroring out,  but the graph is not displaying.  Please help.
>
> > Thank you
> > Bhaskar
>
> Within a view function you can't print html out, you need to return
> the output of the function.
>
> So, using your example, this should give you your graph:
>
> from django.template import loader, Context
>
> def prev_score(request):
>     graph = graphs.BarGraph('vBar')
>     graph.values = [380, 150, 260, 310, 430]
>     myGraph =  graph.create()
>     t = loader.get_template('my_template.html')
>     c = Context({ 'graph': myGraph })
>     return HttpResponse(t.render(c))
>
> Have a read through this part of the 
> documentation:http://docs.djangoproject.com/en/1.1/topics/http/views/#topics-http-v...
>
> HTH
> Dan
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Dan Hilton
> www.twitter.com/danhiltonwww.DanHilton.co.uk
> - Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Python Graph

2010-01-27 Thread Bhaskar Gara
Thank you Dan

On Jan 27, 3:40 am, Daniel Hilton <daniel.hil...@gmail.com> wrote:
> 2010/1/27 Bhaskar Gara <bacch...@gmail.com>:
>
>
>
>
>
> > Hi,
>
> >    I am very new to django.  I am trying to use this library for my
> > graphs
> >http://www.gerd-tentler.de/tools/pygraphs/?page=introduction
>
> > In my Views.py
>
> > prev_score(request):
> >        graph = graphs.BarGraph('vBar')
> >        graph.values = [380, 150, 260, 310, 430]
> >        print graph.create()
>
> > In my Template  "score_compare.html"  in between the screen  I kept
> > below code where it need to display the graph.
>
> >                {{ prev_score }}
>
> > It not erroring out,  but the graph is not displaying.  Please help.
>
> > Thank you
> > Bhaskar
>
> Within a view function you can't print html out, you need to return
> the output of the function.
>
> So, using your example, this should give you your graph:
>
> from django.template import loader, Context
>
> def prev_score(request):
>     graph = graphs.BarGraph('vBar')
>     graph.values = [380, 150, 260, 310, 430]
>     myGraph =  graph.create()
>     t = loader.get_template('my_template.html')
>     c = Context({ 'graph': myGraph })
>     return HttpResponse(t.render(c))
>
> Have a read through this part of the 
> documentation:http://docs.djangoproject.com/en/1.1/topics/http/views/#topics-http-v...
>
> HTH
> Dan
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Dan Hilton
> www.twitter.com/danhiltonwww.DanHilton.co.uk
> - Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Python Graph

2010-01-26 Thread Bhaskar Gara
Hi,

I am very new to django.  I am trying to use this library for my
graphs
http://www.gerd-tentler.de/tools/pygraphs/?page=introduction


In my Views.py

prev_score(request):
graph = graphs.BarGraph('vBar')
graph.values = [380, 150, 260, 310, 430]
print graph.create()

In my Template  "score_compare.html"  in between the screen  I kept
below code where it need to display the graph.

{{ prev_score }}

It not erroring out,  but the graph is not displaying.  Please help.

Thank you
Bhaskar

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Email field - Memory exception - object at 0xa3c9e8c

2010-01-23 Thread Bhaskar Gara
I am getting error for only emailfield remaining string fields are
working fine the Error is

DEBUG:root:

I am new to django, I am not sure why I am getting that above error.
Please help to fix the issue.

model.py

class Nomination(models.Model):
 yourname = models.CharField(max_length=30)
 heroname = models.CharField(max_length=30)
 heroemail = models.EmailField()
 comment = models.TextField()

form.py
class hero(forms.Form):
.

heroemail = forms.EmailField(required=False)   - Error
happening here.

view.py

def hero(request):
if request.method == 'POST':
form = forms.hero(data=request.POST)
if form.is_valid():
hero = models.Nomination(
.
...
heroemail = form.cleaned_data['heroemail'],
)
hero.save()
else:
   pass
return http.HttpResponseRedirect('/member/hero/thankyou/')

hero.html




Thank you
Bhaskar

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: NoReverseMatch:

2010-01-17 Thread Bhaskar Gara
Thank you,

I am putting same pattern because both tellfriend and hero belongs to
same template.

refer template has two form.

Thank you
Bhaskar

On Jan 17, 11:25 am, Andreas Pfrengle <a.pfren...@gmail.com> wrote:
> > url(r'^member/refer/$', direct_to_template,
> >         {'template': 'member_refer.html'}, name='member_refer'),
>
> > url(r'^refer/$', 'erp_site.views.tellfriend', name='tell_friend'),
> > url(r'^refer/$', 'erp_site.views.hero', name='hero'),
>
> tell_friend and hero have the same pattern r'^refer/$', maybe that's
> the reason?
>
>
>
>
>
> > On Jan 17, 8:40 am, Andreas Pfrengle <a.pfren...@gmail.com> wrote:
>
> > > Your urls.py needs to contain sth. like that:
>
> > > urlpatterns = patterns('your_app.views',
> > >     url(r'^the_url_you_want_for_tellfriend$', 'name_of_viewfunction',
> > > name='tellfriend'),
> > >     
> > > )
>
> > > the last argument, name='tellfriend', is what the {% url %} tag is
> > > searching for in your urlpatterns, and then directs to the
> > > corresponding viewfunction.
> > > Details 
> > > here:http://docs.djangoproject.com/en/1.1/topics/http/urls/#topics-http-urls-
> > >  Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: NoReverseMatch:

2010-01-17 Thread Bhaskar Gara
Thank you Lan,  I am pretty new to the Django.

How do I know its needs an argument?  which file will have that, is
that in URL.py?

On Jan 17, 12:30 am, Ian Lewis <ianmle...@gmail.com> wrote:
> Bhaskar,
>
> The error means that there is either no defined URL called
> 'tellfriend' or it requires some kind of argument, like a user id, to
> generate the URL.
>
> Having two separate forms with different actions is no problem. Fixing
> the URL reversing should clear up your issue.
>
> Ian
>
>
>
>
>
> On Sunday, January 17, 2010, Bhaskar Gara <bacch...@gmail.com> wrote:
> > Caught an exception while rendering: Reverse for 'tellfriend' with
> > arguments '()' and keyword arguments '{}' not found.
>
> > 
>
> > I have a html template which has two form
>
> > My form1  action is empty  and form 2 action is as above. I am
> > getting error @ that line.
>
> > 1)   What is the meaning of the error ?
> > 2)   How can I call two different fucntion in views.py  from the same
> > HTML form action.
>
> > Thank you
> > Bhaskar
>
> --
> ===
> 株式会社ビープラウド  イアン・ルイス
> 〒150-0012
> 東京都渋谷区広尾1-11-2アイオス広尾ビル604
> email: ianmle...@beproud.jp
> TEL:03-5795-2707
> FAX:03-5795-2708http://www.beproud.jp/
> ===- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.




NoReverseMatch:

2010-01-16 Thread Bhaskar Gara
Caught an exception while rendering: Reverse for 'tellfriend' with
arguments '()' and keyword arguments '{}' not found.




I have a html template which has two form

My form1  action is empty  and form 2 action is as above. I am
getting error @ that line.


1)   What is the meaning of the error ?
2)   How can I call two different fucntion in views.py  from the same
HTML form action.


Thank you
Bhaskar
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.




Permission denied

2010-01-16 Thread Bhaskar Gara
Request Method:

POST
Request URL:
Exception Type:IOError
Exception Value:[Errno 13] Permission denied: u'Bhaskar_dsa.xml'
Exception Location:/home/erp/webappserp_dev/erp/apps/erp_site/views.py
in testimonials, line 238
Python Executable:/usr/local/bin/python
Python Version:2.5.4

This is the above error I am getting when I am trying to write an xml
file in
TESTIMONIAL_DIR  /home/erp/webapps/erp_dev/erp/xml/testimonial'

It something related to permission stuff.   I  did  chmod 777 on both
xml and testimonial folder which I created. Still getting the same
issue.  Can you please help me there.

Scenerio is  I need to generate xml file from the form field and put
it in to that TESTIMONIAL folder.

my code in views.py

filename = fname + "_" + lname + ".xml"
filepath = settings.TESTIMONIAL_DIR + "/" + filename;
logging.debug('filepath = %s' % filepath)

FILE = open(filename,"w")-This is the line its giving the
error.
doc.writexml(FILE)
FILE.close()


Thank you
Bhaskar
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: migration problem from Django0.96 to Django1.0

2008-09-25 Thread vijay bhaskar
Hi karen,
sorry for the delay,i did not notice this mail.To solve this issue, i have
taken the WEEKDAYS_ABBR code from the trunk and added in the
django.utils.dates file.

Regards & Thank you,
Vijay.

On Mon, Sep 15, 2008 at 8:09 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:

> On Mon, Sep 15, 2008 at 1:58 AM, vijay bhaskar <[EMAIL PROTECTED]> wrote:
>
>> I solved that problem.
>>
>>
> How please?  Someone else is running into trouble with WEEKDAYS_ABBR and I
> can't understand why. What fixed the problem for you?
>
> Thanks,
> Karen
>
>
>>>
>>> On Mon, Sep 15, 2008 at 11:07 AM, vijay bhaskar <[EMAIL PROTECTED]>wrote:
>>>
>>>> Hi karen,Thanks for your reply.but the problem is ,there is no
>>>> definition for WEEKDAYS_ABBR in the django.utils.dates.That's the
>>>> reason its throwing error.How can i get rid of this?
>>>>
>>>> Thanks & regards
>>>> Vijay
>>>>
>>>>
>>>> On Sat, Sep 13, 2008 at 5:39 PM, Karen Tracey <[EMAIL PROTECTED]>wrote:
>>>>
>>>>> On Sat, Sep 13, 2008 at 5:28 AM, vijay <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>>>
>>>>>> When i'am trying to migrate my application which is wriiten in 0.96
>>>>>> version to 1.0, i encountered the following error message.
>>>>>>
>>>>>>  File "c:\python25\lib\site-packages\django\utils\dateformat.py",
>>>>>> line 127, in D
>>>>>>return WEEKDAYS_ABBR[self.data.weekday()]
>>>>>> NameError: global name 'WEEKDAYS_ABBR' is not defined
>>>>>>
>>>>>>
>>>>>> Is there any patch available for this? How can i get rid of this
>>>>>> problem?
>>>>>>
>>>>>>
>>>>> Have you modified that file django\utils\dateformat.py?  The one
>>>>> shipped with 1.0 does not have the problem you are seeing since it imports
>>>>> WEEKDAYS_ABBR from where it is defined before using it, see line 14 in:
>>>>>
>>>>>
>>>>> http://code.djangoproject.com/browser/django/tags/releases/1.0/django/utils/dateformat.py
>>>>>
>>>>> (Also the line number reported in your error message does not match
>>>>> what is on that line the shipped version of the file, so something seems 
>>>>> to
>>>>> have happened to alter your 1.0 Django files, or at least this one.)
>>>>>
>>>>> 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: migration problem from Django0.96 to Django1.0

2008-09-14 Thread vijay bhaskar
I solved that problem.

On Mon, Sep 15, 2008 at 11:09 AM, vijay bhaskar <[EMAIL PROTECTED]> wrote:

>
>
> On Mon, Sep 15, 2008 at 11:07 AM, vijay bhaskar <[EMAIL PROTECTED]> wrote:
>
>> Hi karen,Thanks for your reply.but the problem is ,there is no definition
>> for WEEKDAYS_ABBR in the django.utils.dates.That's the reason its
>> throwing error.How can i get rid of this?
>>
>> Thanks & regards
>> Vijay
>>
>>
>> On Sat, Sep 13, 2008 at 5:39 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
>>
>>> On Sat, Sep 13, 2008 at 5:28 AM, vijay <[EMAIL PROTECTED]> wrote:
>>>
>>>>
>>>> When i'am trying to migrate my application which is wriiten in 0.96
>>>> version to 1.0, i encountered the following error message.
>>>>
>>>>  File "c:\python25\lib\site-packages\django\utils\dateformat.py",
>>>> line 127, in D
>>>>return WEEKDAYS_ABBR[self.data.weekday()]
>>>> NameError: global name 'WEEKDAYS_ABBR' is not defined
>>>>
>>>>
>>>> Is there any patch available for this? How can i get rid of this
>>>> problem?
>>>>
>>>>
>>> Have you modified that file django\utils\dateformat.py?  The one shipped
>>> with 1.0 does not have the problem you are seeing since it imports
>>> WEEKDAYS_ABBR from where it is defined before using it, see line 14 in:
>>>
>>>
>>> http://code.djangoproject.com/browser/django/tags/releases/1.0/django/utils/dateformat.py
>>>
>>> (Also the line number reported in your error message does not match what
>>> is on that line the shipped version of the file, so something seems to have
>>> happened to alter your 1.0 Django files, or at least this one.)
>>>
>>> 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: migration problem from Django0.96 to Django1.0

2008-09-14 Thread vijay bhaskar
Hi karen,Thanks for your reply.but the problem is ,there is no definition
for WEEK_ABBR in the django.utils.dates.That's the reason its throwing
error.How can i get rid of this?

Thanks & regards
Vijay


On Sat, Sep 13, 2008 at 5:39 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:

> On Sat, Sep 13, 2008 at 5:28 AM, vijay <[EMAIL PROTECTED]> wrote:
>
>>
>> When i'am trying to migrate my application which is wriiten in 0.96
>> version to 1.0, i encountered the following error message.
>>
>>  File "c:\python25\lib\site-packages\django\utils\dateformat.py",
>> line 127, in D
>>return WEEKDAYS_ABBR[self.data.weekday()]
>> NameError: global name 'WEEKDAYS_ABBR' is not defined
>>
>>
>> Is there any patch available for this? How can i get rid of this
>> problem?
>>
>>
> Have you modified that file django\utils\dateformat.py?  The one shipped
> with 1.0 does not have the problem you are seeing since it imports
> WEEKDAYS_ABBR from where it is defined before using it, see line 14 in:
>
>
> http://code.djangoproject.com/browser/django/tags/releases/1.0/django/utils/dateformat.py
>
> (Also the line number reported in your error message does not match what is
> on that line the shipped version of the file, so something seems to have
> happened to alter your 1.0 Django files, or at least this one.)
>
> 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
-~--~~~~--~~--~--~---