Re: Gyftr api integration

2021-06-27 Thread Puneet Makhija
What do you mean by 'gyftr' please let me know
What do you want to achieve

On Sun, Jun 27, 2021, 9:13 PM Anuj Kumar  wrote:

> i also want api , please help me out
>
> On Friday, 30 October 2020 at 13:53:59 UTC+5:30 ankitba...@gmail.com
> wrote:
>
>> Plz, Tell me how to integrate Gyftr api in rest-framework.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "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/a0e05f9c-d3fb-4140-b98b-b89720da1412n%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/CAHqz0_ar9_PC%3D7%2BTtuQKxWasQj9NYiAbCtQ4F%2BsZUus-SCxi_A%40mail.gmail.com.


How can we achieve this?

2020-07-02 Thread Puneet Makhija


def decorator(func):
@wraps(func)
def inner(request, *args, **kwargs):
pdb.set_trace()
a1 = args
user = a1[1]._request.user
permission = Permission.objects.get(user=user)
# < Permission: bookings | Booking | Can view Booking >
return func(*args, **kwargs)
return inner



class OfferListAPIView(generics.ListCreateAPIView):
queryset = Offers.objects.all().order_by('-id')
serializer = OfferListSerializer
def list(self, request):
queryset = self.get_queryset()
serializer = OfferListSerializer(queryset, many=True)
return response_handler(data=serializer.data, message="All offer list 
fetched.")



The requested user have a permissions to view only booking , and the class is 
mainly for Offer List API , how can I map this and display 

an error you dont have permission to access this. , I am working with Angular 
and Django . please help me

-- 
You received this message because you are subscribed to the Google Groups 
"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/5714f9b2-2402-4c33-8e1f-e6dc605fcb7co%40googlegroups.com.


How to achieve this?

2020-07-02 Thread Puneet Makhija
My clients wants sub admins panel , just like a staff users 


class OfferListAPIView(generics.ListCreateAPIView):
queryset = Offers.objects.all().order_by('-id')
serializer = OfferListSerializer

@decorator

def list(self, request):
queryset = self.get_queryset()
serializer = OfferListSerializer(queryset, many=True)
return response_handler(data=serializer.data, message="All offer list 
fetched.")



-- 
You received this message because you are subscribed to the Google Groups 
"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/83e28995-bd94-4cc0-921f-b8096d724717o%40googlegroups.com.


Re: Collaborators

2020-06-27 Thread Puneet Makhija

Hello sir , Will you please please help me becuase I have to submit by 
project tomorrow , please help me please 
Here below is the link , sir please please help me
https://stackoverflow.com/questions/62608223/override-a-field-in-child-class-from-the-parent-class-in-django


On Friday, June 19, 2020 at 5:39:34 PM UTC+5:30, Ragnar Örn Ólafsson 
Ólafsson wrote:
>
> Hi John,
>
> I’d love to get in touch with you regarding the Django role. What’s the 
> best way to contact you?Hello 
>
> On Fri, 19 Jun 2020 at 09:55, John McClain  > wrote:
>
>> Hello all,
>>
>> I am looking for long term collaborators on a live django project I own 
>> and operate.
>>
>> This is a bootstrapped project which is generated revenue. However, all 
>> funds are poured back into the project at the moment.
>>
>> There is compensation for the right person(s)
>>
>> Please only apply if you have exceptional full stack developer skills. 
>> This is not a jr. role but would suit an intermediate level developer with 
>> a few years under their belt.
>>
>> Fluent English as a first language is required but the position itself is 
>> fully remote.
>>
>> If you are looking to contribute to a true bootstrapped startup with a 
>> proven POC, perhaps you would consider this opportunity.
>>
>> I am looking forward to speaking with you soon.
>>
>>
>> We are looking for expertise in
>>
>> 1. Marketing Guru who can manage the Sendgrid implementation and ongoing 
>> marketing campaign creation and management.
>>
>> 2. Django backend developer to continue improving models or introducing 
>> new ones to the architecture already in play.
>>
>> 3, Frontend designer with strong UI UX experience to assist with assets 
>> to compliment the two rolls identified above
>>
>> -- 
>> John McClain
>> fundgrazing.com
>>
>> Cell: 085-1977-823
>> Skype: jmcclain0129
>> Email: jmccla...@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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAN-hv_qi7kLmrfcQaqihT1xP0EpfJbqgt5S6q%3Di8rOFDwgBasw%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/c6d319a1-c559-4a24-9f14-685078286cedo%40googlegroups.com.


Can somebody help me in this case

2020-06-27 Thread Puneet Makhija
https://stackoverflow.com/questions/62608223/override-a-field-in-child-class-from-the-parent-class-in-django


If their will be no solution for this, Then I have to change my overall 
structure of the Code, Its take too much effort to do, and again testing 
required by the tester,
Please help me , my project is completed mostly. 

-- 
You received this message because you are subscribed to the Google Groups 
"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/8161f847-ee22-49d7-93d5-014afc46833bo%40googlegroups.com.


Re: Manage.py not working

2020-06-22 Thread Puneet Makhija
Hello piyush sir
Please reply sir please reply my question

On Mon, Jun 22, 2020, 10:39 PM Piyush Jangid 
wrote:

> Try to change the directory of your app i.e try "cd C://
> ../texts1/text1 whatever where your namage.py is and then run command.
> Thank you
> Piyush jangid
>
> On Sat, 20 Jun 2020, 9:11 pm Tanisha Jain, 
> wrote:
>
>> Hi everyone,
>> I am new to Django platform. Whenever I am trying to create a new app
>> using  ( python manage.py startapp app1) then I am not able to create app.
>> Neither I get any error message in logs. Can someone plz suggest me what to
>> do now?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/6b4c856f-0849-409a-b77a-b31038572aado%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/CALtK9W--o1cacuCsnrsMpVtvsSexG3Qdr12BC1tduvx7%3Dsct%3Dw%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/CAHqz0_ZFX9LiF%2B40OishXCVfa75U%3DJrL__Bo6sMnHjfQfauabg%40mail.gmail.com.


Re: Collaborators

2020-06-22 Thread Puneet Makhija
Hello please guide me please I request
Actually I completed a project of django 95 percent
By using abstract user
Class User(absrract user)
Class worker(User)

Through this architecture
And my clients suddenly wants role based setup
They said when I am an admin
I will be able to create multiple sub admin through restrictions
How to achieve this now
Please help me please

On Mon, Jun 22, 2020, 3:01 AM John McClain  wrote:

> Francis,
>
> You can email me at j...@fundgrazing.com
>
> John
>
> On Sat, 20 Jun 2020 at 10:08, FRANCIS ODERO 
> wrote:
>
>> hello am really interested in django backend development
>> How am i supposed to contant you
>>
>> On Sat, Jun 20, 2020 at 4:08 AM chaitanya orakala <
>> chaitu.orak...@gmail.com> wrote:
>>
>>> Hey John,
>>> I had sent an email in interest to this position. Please have a look at
>>> it
>>> Thanks
>>>
>>> On Fri, Jun 19, 2020 at 7:52 PM John McClain 
>>> wrote:
>>>
 Hello Ali,

 Please contact me via email or skype to discuss the possibilities.

 Cheers,

 John

 On Fri, 19 Jun 2020 at 12:37, Ali Murtuza 
 wrote:

> Hello I am intrested for Django backend developer
>
> On Fri, 19 Jun 2020 at 2:55 PM, John McClain 
> wrote:
>
>> Hello all,
>>
>> I am looking for long term collaborators on a live django project I
>> own and operate.
>>
>> This is a bootstrapped project which is generated revenue. However,
>> all funds are poured back into the project at the moment.
>>
>> There is compensation for the right person(s)
>>
>> Please only apply if you have exceptional full stack developer
>> skills. This is not a jr. role but would suit an intermediate level
>> developer with a few years under their belt.
>>
>> Fluent English as a first language is required but the position
>> itself is fully remote.
>>
>> If you are looking to contribute to a true bootstrapped startup with
>> a proven POC, perhaps you would consider this opportunity.
>>
>> I am looking forward to speaking with you soon.
>>
>>
>> We are looking for expertise in
>>
>> 1. Marketing Guru who can manage the Sendgrid implementation and
>> ongoing marketing campaign creation and management.
>>
>> 2. Django backend developer to continue improving models or
>> introducing new ones to the architecture already in play.
>>
>> 3, Frontend designer with strong UI UX experience to assist with
>> assets to compliment the two rolls identified above
>>
>> --
>> John McClain
>> fundgrazing.com
>>
>> Cell: 085-1977-823
>> Skype: jmcclain0129
>> Email: jmcclain0...@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/CAN-hv_qi7kLmrfcQaqihT1xP0EpfJbqgt5S6q%3Di8rOFDwgBasw%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/CA%2BGgMvW12F83%3DpqLubJTGqkUzH2eDzqzn1t%2BgMZ3UnCsE6uy%3Dw%40mail.gmail.com
> 
> .
>


 --
 John McClain

 Cell: 085-1977-823
 Skype: jmcclain0129
 Email: jmcclain0...@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/CAN-hv_pJ-eh2XGYkKFA6NSez89ffOe__oizdqpOMrrOHVRmieg%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
>>> 

Re: Please help me out!

2020-06-19 Thread Puneet Makhija
Meera, if you stuck anywhere
Then post your issue
Or contact me

On Fri, Jun 19, 2020, 4:00 PM meera gangani 
wrote:

> Yeah i already started my Project
> So I have an HR Project
> In this Project when admin enters the event details then the notification
> will be sent to the user
>
>
>
> On Fri, Jun 19, 2020 at 3:11 PM RANGA BHARATH JINKA <
> bharathjink...@gmail.com> wrote:
>
>> Hi, You can use this.
>>
>> https://pypi.org/project/django-notifications-hq/
>>
>> https://pypi.org/project/django-notification/
>>
>> On Fri, Jun 19, 2020 at 1:38 PM Doddahulugappa.B <
>> doddahuluga...@gmail.com> wrote:
>>
>>> Please elaborate more on your requirement
>>>
>>> On Fri, Jun 19, 2020, 10:31 AM meera gangani 
>>> wrote:
>>>
 Hello ,

 I want to implement a Notification module in my Project
 could you please help me out!


 Thank you
 -Meera Gangani

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CANaPPPJJq_r9AZqeQACGqMpGjPzzx1sJA%3DLQr-K3FJ6s4%3DQkbA%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/CAKfjjGpDpgBQ%3DK4%3DbjACmsSNE%2BddHndVvJMqR3FF43fLvjpejw%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Thanks and Regards
>>
>> J. Ranga Bharath
>> cell: 9110334114
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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/CAK5m3172%2BEbLGW0X%2Bdht4sSg7Ba8DejZCQXq%2B6%3D3tbJfiHtD7A%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/CANaPPPJU-nB%3DM4Jfjf6EKN5t9ZEptG_NM6kkY6%3DYgnjazy7DRQ%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/CAHqz0_ZVX_U8YiNnWBHHf4v-kPnKwUzKnAe3JD65EqNVFZVFpw%40mail.gmail.com.


Re: Please help me out!

2020-06-19 Thread Puneet Makhija
Ma'am scratch se btana hai kya sab kuch
On Fri, Jun 19, 2020, 1:11 PM Puneet Makhija 
wrote:

> yes,  let me know
> U started your project?
>
>
> On Fri, Jun 19, 2020, 12:01 PM meera gangani 
> wrote:
>
>> Hello ,
>>
>> I want to implement a Notification module in my Project
>> could you please help me out!
>>
>>
>> Thank you
>> -Meera Gangani
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANaPPPJJq_r9AZqeQACGqMpGjPzzx1sJA%3DLQr-K3FJ6s4%3DQkbA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANaPPPJJq_r9AZqeQACGqMpGjPzzx1sJA%3DLQr-K3FJ6s4%3DQkbA%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/CAHqz0_aHyrZuG_F17E-VJaUUAUnKkZmTZuDbXR-pOhLLA5svKg%40mail.gmail.com.


Re: Please help me out!

2020-06-19 Thread Puneet Makhija
yes,  let me know
U started your project?


On Fri, Jun 19, 2020, 12:01 PM meera gangani 
wrote:

> Hello ,
>
> I want to implement a Notification module in my Project
> could you please help me out!
>
>
> Thank you
> -Meera Gangani
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANaPPPJJq_r9AZqeQACGqMpGjPzzx1sJA%3DLQr-K3FJ6s4%3DQkbA%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/CAHqz0_YK6GDJo%2B2Uq6eJt%3DL--gYLPf1U3DNdejFx0oQGQTE9yw%40mail.gmail.com.


Re: Employee leave module in django?

2020-06-18 Thread Puneet Makhija
ok
Meera
So whats the problem
Just create it
If you have any query just ask
To me

On Thu, Jun 18, 2020, 4:54 PM meera gangani 
wrote:

> Hello ,
>
> I want to implement an employee leave module in django??
> "Am New" in django
> Please help me?
>
> Thanks in advance
> -Meera Gangani
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANaPPPKP88ZscoDCxrwJZU0UcH30pzxqUQqFLyk%2B4g8Yfj%2BBXA%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/CAHqz0_YS5XWDVc%2BrSUtLC7j6ebATaYuncmXwJsVUNSJ0TvXEiA%40mail.gmail.com.


Re: cant be able to setup GDAL in django prject

2020-06-16 Thread Puneet Makhija
Please reply please please please please 

On Monday, June 15, 2020 at 6:51:51 PM UTC+5:30, Puneet Makhija wrote:
>
> As i am Stuck in this Error from 2 days. But cant get the Solution why 
> this was Happening 
> I am getting an Error: 
>  
> self._handle = _dlopen(self._name, mode) 
>indusli  | OSError: /usr/local/lib/libgdal.so: cannot open shared 
> object file: No such file or directory
>
> And below is my django settings.py filelibrary path for GDAL and 
> GEOS
>
> GDAL_LIBRARY_PATH="/usr/local/lib/libgdal.so"
> GEOS_LIBRARY_PATH="/usr/local/lib/libgeos_c.so"
>
>
> As i setted up the path in the /etc/ld.so.conf :-
> include /etc/ld.so.conf.d/*.conf
> /usr/local/lib
> then sudo ldconfig 
>
> still im geeting the same error :-
> cannot open shared object file: No such file or directory
> As i stuck in this from last 2 days why this was happening 
>
> As i am using Ubuntu 18.04 version 
> GDAL: gdal-3.1.0 
> Proj: proj-7.0.1
> Geos: geos-3.8.1
>
> ** Any help will be highly Appreciated ***
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/c307f59c-440e-4bba-8f00-586f1bdab3bco%40googlegroups.com.


cant be able to setup GDAL in django prject

2020-06-15 Thread Puneet Makhija
As i am Stuck in this Error from 2 days. But cant get the Solution why this 
was Happening 
I am getting an Error: 
 
self._handle = _dlopen(self._name, mode) 
   indusli  | OSError: /usr/local/lib/libgdal.so: cannot open shared object 
file: No such file or directory

And below is my django settings.py filelibrary path for GDAL and 
GEOS

GDAL_LIBRARY_PATH="/usr/local/lib/libgdal.so"
GEOS_LIBRARY_PATH="/usr/local/lib/libgeos_c.so"


As i setted up the path in the /etc/ld.so.conf :-
include /etc/ld.so.conf.d/*.conf
/usr/local/lib
then sudo ldconfig 

still im geeting the same error :-
cannot open shared object file: No such file or directory
As i stuck in this from last 2 days why this was happening 

As i am using Ubuntu 18.04 version 
GDAL: gdal-3.1.0 
Proj: proj-7.0.1
Geos: geos-3.8.1

** Any help will be highly Appreciated ***

-- 
You received this message because you are subscribed to the Google Groups 
"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/ae2ef965-65c5-4c85-9011-7506c47cc007o%40googlegroups.com.


Re: Django Matrimonial Apps,

2014-02-06 Thread Puneet
Guys did you anything on this ? I am looking for one matrimonial app in 
django. 

On Saturday, August 14, 2010 5:05:51 PM UTC+5:30, Kenneth Gonsalves wrote:
>
> On Sat, 2010-08-14 at 12:28 +0100, Rizwan Mansuri wrote:
> > I belies in open sources 100%. Anything what I will write would be
> > 100% open
> > source. 
>
> in which case - where is the code - I would like to join
> -- 
> regards
> Kenneth Gonsalves
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/ed1e6077-4d0b-41d7-a27f-4b8a01d95cca%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


'python manage.py migrate' command gives error even after installing south

2013-11-22 Thread puneet pandey
I was going through Django tutorials and found the command - 'python 
manage.py migrate' to give output as 'unknown command' . So i searched for 
it and found that its most probably due to 'south' not installed. i checked 
it on python shell by giving the command - 'import south' which resulted in 
'unknown module'. So I installed south first by using easy_install and then 
by apt-get and then updated the system. I also went to settings.py and 
added south in the installed_apps section.

Now when I ran 'python manage.py migrate' command there was an error -
pasting it here -

popo@popo-HP-TouchSmart-tm2-Notebook-PC:~/Django_apps/mysite$ python 
manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 399, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 242, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 284, in execute
self.validate()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 310, in validate
num_errors = get_validation_errors(s, app)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", 
line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 
196, in get_app_errors
self._populate()
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 
75, in _populate
self.load_app(app_name, True)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 
99, in load_app
models = import_module('%s.models' % app_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", 
line 40, in import_module
__import__(name)
  File "/home/popo/Django_apps/mysite/polls/models.py", line 5
Class Question(models.Model):
 ^
SyntaxError: invalid syntax










what can i do to solve this issue. 
Thanks a lot everyone for reading this and helping me out.

-- 
You received this message because you are subscribed to the Google Groups 
"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/ae647a5a-bea1-4c89-9816-4162ddb9809e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Unexpected EOF while calling a stored procedure

2012-10-09 Thread puneet loya
Hi Everyone,

I m facing aproblem while fetching data from MS sql server using a stored 
procedure.

The stored procedure is being called from Django. The problem is, it is not 
fetching data for this particular procedure and all other procedures are 
working fine.

The only error i get is "SyntaxError: unexpected EOF while parsing 
(, line 0)"

There is no detail on the exception. 


I did feel that the data might have special characters in it and that might 
be a problem. I got rid of special characters mainly \n \r \s. 

Did anybody face such a problem while fetching data from the DB?


Thanks :)
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/obvUBu3g7KUJ.
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: sqlite datetime issue with django

2012-10-03 Thread puneet loya
Thank you :) Will check that :)

On Wed, Sep 26, 2012 at 12:35 AM, Bill Freeman <ke1g...@gmail.com> wrote:

> When django reads the data back, does it reconvert it to your
> timezone?  If so, why is it a problem that it is stored as UTC in the
> database?
>
> On Tue, Sep 25, 2012 at 2:19 PM, puneet loya <puneetl...@gmail.com> wrote:
> > Hi,
> >
> > I m having problems with sqlite insertion.
> >
> > When i enter datetime object using django into sqlite, sqlite is
> converting
> > the datetime to UTC and storing it. Hence the datetime inserted in the
> > sqlite db is incorrect.
> >
> > My timezone in UTC+05:30 and the datetime inserted is in UTC.
> >
> >
> > Any suggestions??
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/django-users/-/98E6x3lnvtwJ.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



sqlite datetime issue with django

2012-09-25 Thread puneet loya
Hi,

I m having problems with sqlite insertion.

When i enter datetime object using django into sqlite, sqlite is converting 
the datetime to UTC and storing it. Hence the datetime inserted in the 
sqlite db is incorrect.

My timezone in UTC+05:30 and the datetime inserted is in UTC.


Any suggestions??

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/98E6x3lnvtwJ.
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: Can I simply disable the CSRF? crazy

2012-09-25 Thread puneet loya
Thank you all for your suggestions :) :)

On Mon, Sep 24, 2012 at 7:56 PM, Nicolas Patry <patry.nico...@gmail.com>wrote:

> If you are access to the form (meaning you are in the dom), and if you
> don't mind using jQuery, there is the even simpler:
>
> 
>> $.post("/some/url", $("#someform").serialize(), function(data){
>>   // Do whatever with data
>> })
>
>
> $("#someform").serialize() automatically adds the crsf_token which should
> be contained in your form. This makes a lot easier to validate your form
> via AJAX.
>
> Cheers,
> Nicolas Patry
>
> On Monday, September 24, 2012 4:00:02 PM UTC+2, jondykeman wrote:
>>
>> +1 For doing it right from the beginning.
>>
>> I was tempted to disable when trying to deal with AJAX especially early
>> on. Below is some code with jQuery so that you won't need to manually feed
>> the token through your AJAX.
>>
>> <script type="text/javascript">
>> jQuery(document).ajaxSend(**function(event, xhr, settings) {
>> function getCookie(name) {
>> var cookieValue = null;
>> if (document.cookie && document.cookie != '') {
>> var cookies = document.cookie.split(';');
>> for (var i = 0; i < cookies.length; i++) {
>> var cookie = jQuery.trim(cookies[i]);
>> // Does this cookie string begin with the name we want?
>> if (cookie.substring(0, name.length + 1) == (name + '='))
>> {
>> cookieValue = 
>> decodeURIComponent(cookie.**substring(name.length
>> + 1));
>> break;
>> }
>> }
>> }
>> return cookieValue;
>> }
>> function sameOrigin(url) {
>> // url could be relative or scheme relative or absolute
>> var host = document.location.host; // host + port
>> var protocol = document.location.protocol;
>> var sr_origin = '//' + host;
>> var origin = protocol + sr_origin;
>> // Allow absolute or scheme relative URLs to same origin
>> return (url == origin || url.slice(0, origin.length + 1) ==
>> origin + '/') ||
>> (url == sr_origin || url.slice(0, sr_origin.length + 1) ==
>> sr_origin + '/') ||
>> // or any other URL that isn't scheme relative or absolute
>> i.e relative.
>> !(/^(\/\/|http:|https:).*/.**test(url));
>> }
>> function safeMethod(method) {
>> return (/^(GET|HEAD|OPTIONS|TRACE)$/.**test(method));
>> }
>>
>> if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
>> xhr.setRequestHeader("X-**CSRFToken", getCookie('csrftoken'));
>> }
>> });
>> 
>>
>> On Monday, September 24, 2012 7:07:09 AM UTC-6, Mulianto wrote:
>>>
>>> hi, better use csrf for your application security.
>>>
>>> it is easier to disable it, but security for your app what you will
>>> think after it running later.
>>>
>>> do it correctly now or later .
>>>
>>> Rgds,
>>>
>>> Mulianto
>>>
>>> On Mon, Sep 24, 2012 at 2:56 PM, yati sagade <yati@gmail.com> wrote:
>>>
>>>> Remove {% csrf_token %} from the form AND leave the csrf_exempt
>>>> decorator as it is in the view. Everyone faces challenges while learning a
>>>> new thing. The key is to face it head on and not to move to somewhere you
>>>> think there will be no challenges :)
>>>>
>>>>
>>>> On Mon, Sep 24, 2012 at 1:14 AM, puneet loya <punee...@gmail.com>wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I was trying to disable csrf . I am calling post using ajax.
>>>>>
>>>>> I have used the csrf token placed it below the form.
>>>>>
>>>>> In my views file i m using the csrf exempt.
>>>>>
>>>>> I am still getting the network forbidden error. :(
>>>>>
>>>>> If you require more information i will share it :)
>>>>>
>>>>> On Thursday, 19 August 2010 06:49:02 UTC+5:30, chenge wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 8月18日, 上午4时29分, Rolando Espinoza La Fuente <dark...@gmail.com>
>>>>>> wrote:
>>>>>> > On Tue, Aug 17, 2010 at 8:01 AM, chenge <cheng...@gmail.com>
>>>>

Re: Can I simply disable the CSRF? crazy

2012-09-23 Thread puneet loya
Hi 

I was trying to disable csrf . I am calling post using ajax.

I have used the csrf token placed it below the form.  

In my views file i m using the csrf exempt.

I am still getting the network forbidden error. :(

If you require more information i will share it :) 

On Thursday, 19 August 2010 06:49:02 UTC+5:30, chenge wrote:
>
>
>
> On 8月18日, 上午4时29分, Rolando Espinoza La Fuente  
> wrote: 
> > On Tue, Aug 17, 2010 at 8:01 AM, chenge  wrote: 
> > > I'm new to django. CSRF let me crazy! 
> > 
> > Can't use {% csrf_token %} tag inside your 's? 
> > 
> > See csrf_exempt decorator:
> http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions 
> > 
> > Regards, 
> > 
> > Rolando Espinoza La fuentewww.insophia.com 
>
> Thanks, I decide try flask first, that seems simple. Maybe I'll try 
> the exempt.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/BQ5RpafQK3EJ.
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: looking for help to make build for django web application

2012-09-03 Thread puneet loya
u getting error for distutils.core??

Then download setup tools of python..


On Friday, April 20, 2012 9:12:16 PM UTC+5:30, Prit wrote:
>
> Hello Guys
>
>  is there any one had use the Distutils for  Distributing Python 
> Modules,I am looking for make build or setuptools for django application?
>
>
> I am looking for suggestions ?
>
>
> thanks
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/t8CDxRQ7l7oJ.
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: Trouble installing django

2012-09-02 Thread puneet loya
Solved it :)  Used the easy_install utility of python and the works done :)

It installs Django automatically :)

On Sunday, September 2, 2012 11:55:14 PM UTC+5:30, puneet loya wrote:
>
> I m a starter at python and Django.. 
>
> When i execute the following command.. I get the error 
> python setup.py install 
>
> Traceback (most recent call last): 
>   File "setup.py", line 1, in  
> from distutils.core import setup 
> ImportError: No module named distutils.core 
>
> I have 64-bit windows 7.. How do i get distutils in python for 64-bit 
> OS? 
>
> I searched on internet.. 
> setuptools for python for 64 bit windows OS.. not available..? 
>
> Has anyone faced a similar problem? 
> Please can anyone guide on how to go further? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/I9jcLCFFE00J.
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.



Trouble installing django

2012-09-02 Thread puneet loya
I m a starter at python and Django..

When i execute the following command.. I get the error
python setup.py install

Traceback (most recent call last):
  File "setup.py", line 1, in 
from distutils.core import setup
ImportError: No module named distutils.core

I have 64-bit windows 7.. How do i get distutils in python for 64-bit
OS?

I searched on internet..
setuptools for python for 64 bit windows OS.. not available..?

Has anyone faced a similar problem?
Please can anyone guide on how to go further?

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

2009-08-31 Thread Puneet

Hi,

Can anyone help with this in django with lucene? Is there anyone able
to use this module sucessfully. I am getting this error when I am
trying to search :

Error : 'Manager' object has no attribute 'objects_search'

Thanks,
Puneet
On Aug 25, 7:55 pm, Puneet <er.pu...@gmail.com> wrote:
> Hi,
>
> Does anyone have tried django-lucenemodule for search ??
>
> I am able to compile theluceneand jcc as  required but the module is
> not working properly as it is expected to work.  As mentioned in the
> docs I have added to fields in my model
>
>    objects = models.Manager()
>    objects_search = Manager() # add search manager
>
> But when I say ModelName.save() its not getting indexed withlucene
> and when I say
>
>  ModelName.objects.objects_search(name_first="Spike")
>
> I am getting error that
>
> AttributeError: 'Manager' object has no attribute 'objects_search'
>
> Can any one help me with this ?? Does anyone have a small working
> example ?
>
> Thanks,
> Puneet
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django lucene

2009-08-25 Thread Puneet

Hi,

Does anyone have tried django-lucene module for search ??

I am able to compile the lucene and jcc as  required but the module is
not working properly as it is expected to work.  As mentioned in the
docs I have added to fields in my model

   objects = models.Manager()
   objects_search = Manager() # add search manager

But when I say ModelName.save() its not getting indexed with lucene
and when I say

 ModelName.objects.objects_search(name_first="Spike")

I am getting error that

AttributeError: 'Manager' object has no attribute 'objects_search'

Can any one help me with this ?? Does anyone have a small working
example ?

Thanks,
Puneet

--~--~-~--~~~---~--~~
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: Accessing session variables in template with django

2009-05-23 Thread Puneet

Thanks Daniel,

Its working fine now. :)

On May 23, 1:39 am, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On May 23, 6:34 am, Puneet <look4pun...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> > I am facing issue when I am trying to access session variables in
> > django.
>
> > I am setting the session variable something like :
>
> >  request.session['cityname'] = cityname
> >  c = RequestContext(request, {'current_date': now})
> >  html = t.render(c)
> >  return HttpResponse(html)
>
> > And I am trying to access it like :
>
> > {{ request.session.cityname }}
> > and
> > {{ request.cityname }}
>
> > But it does not seem to be working. Any suggestions ?
>
> > Thanks,
> > Puneet
>
> You need to enable django.core.context_processors.request in the
> CONTEXT_PROCESSORS section settings.py - it's not enabled by default.
> Seehttp://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-c...
> --
> DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Accessing session variables in template with django

2009-05-23 Thread Puneet

Hi All,

I am facing issue when I am trying to access session variables in
django.

I am setting the session variable something like :

 request.session['cityname'] = cityname
 c = RequestContext(request, {'current_date': now})
 html = t.render(c)
 return HttpResponse(html)

And I am trying to access it like :

{{ request.session.cityname }}
and
{{ request.cityname }}

But it does not seem to be working. Any suggestions ?

Thanks,
Puneet



--~--~-~--~~~---~--~~
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: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread Puneet Madaan
P.S ,,, Never use index in name generation, or you will run out of range one
day ;) think of that nightmare in advance... i can only wish further
schlaf süß,
grüß
Puneet

On Tue, Jan 27, 2009 at 10:25 PM, felix <crucialfe...@gmail.com> wrote:

>
> ah, danke dir !
>
> that's exactly what I was looking for
>
> full encodings here:
> http://docs.python.org/library/codecs.html#standard-encodings
>
> actually I guess in this case I would have a series of numbers;
>
> [ content_type_id, object_id, index, width, height ]
>
> rather than a string. I can figure that out, or it would be simple enough
> to join them and do the pack.
> it won't be so long as the example I posted.
>
>
> FYI
> this would be for thumbnails :  if the thumbnail exists the static server
> will serve it, else django will be triggered to build it.
>
> but I wouldn't want to open up the URL so that anybody could request say
>
> for i in range(0,1):
>   get image urls until my server gives up ...
>
>
> but I will design the paths so that it exposes the object ID like so:
>
> %(content_type_id)s_%(object_id)s_%(encoded)s.jpg
>
> so that I can easily delete all thumbs when the object is deleted
>
> currently I create thumbs on demand via template tags.
> this also leaves dead thumbs laying around.
>
>
>
>
>
> On Tue, Jan 27, 2009 at 5:43 PM, Puneet Madaan <puneetmad...@gmail.com>wrote:
>
>> I am assuming that you already have an idea of how your datastring will
>> look like, and what data it is containing... I am considering *"music
>> artist 32L 2L 100 100"* as input data
>> so here is a example...
>>
>> L1 = "music artist 32L 2L 100 100".encode("hex")
>>> L2 = zlib.compress(L1)
>>> L3 = L2.encode("hex")
>>> print L3
>>>
>>
>> L3 can now be taken as URI referencing string.. which in this special case
>> is
>>
>>
>> '789c35c5c10d00200c02c095102aa4f3e8fe336862fcdc7967466e8bf00853ee28454862adfb7308c2ff00401d0b64'
>>
>> and reverse algo for this is also as easy
>>
>>
>>> D1=789c35c5c10d00200c02c095102aa4f3e8fe336862fcdc7967466e8bf00853ee28454862adfb7308c2ff00401d0b64'.decode("hex")
>>> D2 = zlib.decompress(D1)
>>> D3 = D2.decode("hex")
>>>
>>
>> you will get your "music artist 32L 2L 100 100" back
>>
>> And your URL will not send further a psuedo encoded number which is ugly
>> enough for non-developers :D
>> you are free to choose encoding, and can nest them in multiple algos to
>> make the thing more complex
>>
>> greetings,
>> Puneet
>>
>>
>> On Tue, Jan 27, 2009 at 4:48 PM, felix <crucialfe...@gmail.com> wrote:
>>
>>>
>>> there is some hashing function or combination of URL encoding that can do
>>> this :
>>>
>>>
>>> given some parameters :
>>>
>>> 'music' 'artist' 32L 2L 100 100
>>> ( artist id 32, 2nd picture, dimensions 100 x 100 )
>>>
>>> I wish to generate a fake filename eg:
>>>
>>> tartan_ba6e5e06e794f1368ed3ec20b4594eec.png
>>>
>>> and then be able to reverse that filename back into the original
>>> parameters when needed.
>>>
>>> so its either hashing, or compressing the string (to use the most of the
>>> allowable chars a-zA-Z0-9_ ) or something
>>>
>>> hints or pointers anyone ?
>>> thanks
>>>
>>>
>>>
>>> http://crucial-systems.com
>>>
>>>
>>>
>>>
>>
>>
>> --
>> If you spin an oriental man, does he become disoriented?
>> (-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu
>>
>> is der net süß » ε(●̮̮̃•̃)з
>> -PM
>>
>>
>>
>
> >
>


-- 
If you spin an oriental man, does he become disoriented?
(-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu

is der net süß » ε(●̮̮̃•̃)з
-PM

--~--~-~--~~~---~--~~
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: how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread Puneet Madaan
I am assuming that you already have an idea of how your datastring will look
like, and what data it is containing... I am considering *"music artist 32L
2L 100 100"* as input data
so here is a example...

L1 = "music artist 32L 2L 100 100".encode("hex")
> L2 = zlib.compress(L1)
> L3 = L2.encode("hex")
> print L3
>

L3 can now be taken as URI referencing string.. which in this special case
is


'789c35c5c10d00200c02c095102aa4f3e8fe336862fcdc7967466e8bf00853ee28454862adfb7308c2ff00401d0b64'

and reverse algo for this is also as easy

D1=789c35c5c10d00200c02c095102aa4f3e8fe336862fcdc7967466e8bf00853ee28454862adfb7308c2ff00401d0b64'.decode("hex")
> D2 = zlib.decompress(D1)
> D3 = D2.decode("hex")
>

you will get your "music artist 32L 2L 100 100" back

And your URL will not send further a psuedo encoded number which is ugly
enough for non-developers :D
you are free to choose encoding, and can nest them in multiple algos to make
the thing more complex

greetings,
Puneet

On Tue, Jan 27, 2009 at 4:48 PM, felix <crucialfe...@gmail.com> wrote:

>
> there is some hashing function or combination of URL encoding that can do
> this :
>
>
> given some parameters :
>
> 'music' 'artist' 32L 2L 100 100
> ( artist id 32, 2nd picture, dimensions 100 x 100 )
>
> I wish to generate a fake filename eg:
>
> tartan_ba6e5e06e794f1368ed3ec20b4594eec.png
>
> and then be able to reverse that filename back into the original parameters
> when needed.
>
> so its either hashing, or compressing the string (to use the most of the
> allowable chars a-zA-Z0-9_ ) or something
>
> hints or pointers anyone ?
> thanks
>
>
>
> http://crucial-systems.com
>
>
> >
>


-- 
If you spin an oriental man, does he become disoriented?
(-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu

is der net süß » ε(●̮̮̃•̃)з
-PM

--~--~-~--~~~---~--~~
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: Cannot serve static files

2009-01-22 Thread Puneet Madaan
well at my side it works well on both *nix and windoof platforms... here is
what I use on my projects...

settings.py
--
import platform
import os

PROJECT_DIR = os.path.dirname( os.path.abspath(__file__))
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'static')
---

urls.py
-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings

urlpatterns = patterns('',
#urls for your project
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)

where i use a directory named 'static' residing in same folder, where i have
my settings.py   can you please place 'print MEDIA_ROOT' inside your
settings.py and check the terminal the path is spilts out ? because your '-'
convention before '-\media' is sort confusing, and its missing before
manage.py and settings.py  is media folder residing really in the same
directory where settings.py ?

c:\dev
>   -\proj
>  __init__.py
>  manage.py
>  settings.py
>  urls.py
>  -\app
>  -__init__.py
>  -admin.py
>  -models.py
>  -views.py
>  -\adminmedia
>  -\media
>-\css
>  -styles.css
>-\images
>  -\templates
>-base.html
>-index.html
>

if 'print MEDIA_ROOT' spilts out a path different from your media folder,
then you know where is the problem ..

Greetings,
Puneet

On Thu, Jan 22, 2009 at 5:40 PM, john <johnwalla...@gmail.com> wrote:

>
> Thanks but no change.
>
> On Jan 22, 11:30 am, Puneet Madaan <puneetmad...@gmail.com> wrote:
> > beside  href="{MEDIA_URL}css/styles.css">
> > you need to correct settings.py to
> >
> > SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__))
> >
> >
> >
> > On Thu, Jan 22, 2009 at 5:26 PM, john <johnwalla...@gmail.com> wrote:
> >
> > > Thanks but no change.
> >
> > > On Jan 22, 11:02 am, Dj Gilcrease <digitalx...@gmail.com> wrote:
> > > > change
> > > > 
> > > > to
> > > >  href="{MEDIA_URL}css/styles.css">
> >
> > > > Dj Gilcrease
> > > > OpenRPG Developer
> > > > ~~http://www.openrpg.com
> >
> > > > On Thu, Jan 22, 2009 at 8:53 AM, john <johnwalla...@gmail.com>
> wrote:
> >
> > > > > No matter what i do i can't get my css to load. 100% Frustrated
> with
> > > > > Django. My index page loads when i requesthttp://
> 127.0.0.1:8000/but
> > > > > it is not styled. Django dev server returns 404 in console for "GET
> /
> > > > > css/styles.css HTTP/1.1"
> >
> > > > > In my base template i have:
> > > > > 
> >
> > > > > In my urls.py I have:
> > > > > urlpatterns = patterns('',
> > > > > (r'^$', 'proj.app.views.index'),
> > > > > (r'^admin/(.*)', admin.site.root),
> > > > > (r'^media/(?P.*)$', 'django.views.static.serve',
> > > > > {'document_root': settings.MEDIA_ROOT}),
> > > > > )
> >
> > > > > In my settings.py i have (among other things):
> > > > > import os
> > > > > SETTINGS_FILE_FOLDER = os.path.dirname(__file__)
> > > > > MEDIA_ROOT = os.path.join(SETTINGS_FILE_FOLDER, 'media')
> > > > > MEDIA_URL = 'http://127.0.0.1:8000/media/'
> > > > > ADMIN_MEDIA_PREFIX =  'adminmedia'
> >
> > > > > my directory structure in windows is:
> >
> > > > > c:\dev
> > > > >   -\proj
> > > > >  __init__.py
> > > > >  manage.py
> > > > >  settings.py
> > > > >  urls.py
> > > > >  -\app
> > > > >  -__init__.py
> > > > >  -admin.py
> > > > >  -models.py
> > > > >  -views.py
> > > > >  -\adminmedia
> > > > >  -\media
> > > > >-\css
> > > > >  -styles.css
> > > > >-\images
> > > > >  -\templates
> > > > >-base.html
> > > > >-index.html
> >
> > --
> > If you spin an oriental man, does he become disoriented?
> > (-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu
> >
> > is der net süß » ε(●̮̮̃•̃)з
> > -PM
> >
>


-- 
If you spin an oriental man, does he become disoriented?
(-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu

is der net süß » ε(●̮̮̃•̃)з
-PM

--~--~-~--~~~---~--~~
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: Cannot serve static files

2009-01-22 Thread Puneet Madaan
beside 
you need to correct settings.py to

SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__))


On Thu, Jan 22, 2009 at 5:26 PM, john  wrote:

>
> Thanks but no change.
>
> On Jan 22, 11:02 am, Dj Gilcrease  wrote:
> > change
> > 
> > to
> > 
> >
> > Dj Gilcrease
> > OpenRPG Developer
> > ~~http://www.openrpg.com
> >
> > On Thu, Jan 22, 2009 at 8:53 AM, john  wrote:
> >
> > > No matter what i do i can't get my css to load. 100% Frustrated with
> > > Django. My index page loads when i requesthttp://127.0.0.1:8000/but
> > > it is not styled. Django dev server returns 404 in console for "GET /
> > > css/styles.css HTTP/1.1"
> >
> > > In my base template i have:
> > > 
> >
> > > In my urls.py I have:
> > > urlpatterns = patterns('',
> > > (r'^$', 'proj.app.views.index'),
> > > (r'^admin/(.*)', admin.site.root),
> > > (r'^media/(?P.*)$', 'django.views.static.serve',
> > > {'document_root': settings.MEDIA_ROOT}),
> > > )
> >
> > > In my settings.py i have (among other things):
> > > import os
> > > SETTINGS_FILE_FOLDER = os.path.dirname(__file__)
> > > MEDIA_ROOT = os.path.join(SETTINGS_FILE_FOLDER, 'media')
> > > MEDIA_URL = 'http://127.0.0.1:8000/media/'
> > > ADMIN_MEDIA_PREFIX =  'adminmedia'
> >
> > > my directory structure in windows is:
> >
> > > c:\dev
> > >   -\proj
> > >  __init__.py
> > >  manage.py
> > >  settings.py
> > >  urls.py
> > >  -\app
> > >  -__init__.py
> > >  -admin.py
> > >  -models.py
> > >  -views.py
> > >  -\adminmedia
> > >  -\media
> > >-\css
> > >  -styles.css
> > >-\images
> > >  -\templates
> > >-base.html
> > >-index.html
> >
>


-- 
If you spin an oriental man, does he become disoriented?
(-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu

is der net süß » ε(●̮̮̃•̃)з
-PM

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



Re: I don't even know where to begin writing this template-tags

2009-01-21 Thread Puneet Madaan
try this... its complete tutorial which include template tags too.. will
help you to understand

http://www.webmonkey.com/tutorial/Use_Templates_in_Django

greetings,
Puneet

On Wed, Jan 21, 2009 at 2:13 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

>
> On 21 jan, 00:32, Andrew Ingram <a...@andrewingram.net> wrote:
> > I'm building a simple banner/promotion system for a site. Aside from a
> > few date-related fields, a banner consists of:
> > - an image
> > - a target url
> > - the image dimensions
> > - some tags (using django-tagging)
> >
> > I'm trying to figure out how to build a template-tag to allow me to
> > display a number of banners based on their properties.
> >
> > i.e
> >
> > {% get-banners max-width='450' max-height='100' min-height='50'
> > match-any='foo, bar' match-all='homepage' limit='2' as banners %}
> >
> > {% for banner in banners %}
> >   
> > {% endfor %}
> >
> > The only way I can see to do this is to write a hideous parser function,
> > made worse by the fact that almost all of the arguments are optional.
>
> This may help:
> http://www.djangosnippets.org/snippets/1293/
>
>
> >
>


-- 
If you spin an oriental man, does he become disoriented?
(-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu

is der net süß » ε(●̮̮̃•̃)з
-PM

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