google app engine suggestion

2012-11-09 Thread Aswani Kumar
hi, i am planning to develop an education related information portal in 
django and google app engine.

my question is google app engine supports python 2.7 but django moving 
towards python 3.x now with django 1.5 the minimum required version of 
python is 2.6. and django 1.6 will be on python 2.7. what will be my future 
if i choose google app engine and django.

i need a PAAS like google app engine so i can concentrate on developing app 
instead of managing servers.

please give me 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/-/yO-kbOlbht8J.
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.



search across models

2013-02-02 Thread Aswani Kumar
hi all, i have a big question. 
how can i perform search queries like on following models

RESTAURANT_TYPES = (
('C', 'Chinese'),
('A', 'American'),
('J', 'Japanese'),
)

class city (models.Model):
name = models.CharField(max_length=200)

class restaurants(models.Model):
name = models.CharField(max_length=456)
city = models.ForeignKey(city)
type = models.CharField(max_length=10, choices=RESTAURANT_TYPES)
is_veg = models.BooleanField(default=True)

search queries:

   1. restaurants in city1
   2. city1 restaurants
   3. Chinese restaurants
   4. Chinese restaurants in city1
   5. vegetarian restaurants in city1
   6. vegetarian american restaurants
   7. and so on...

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




session is not expiring

2013-02-21 Thread Aswani Kumar
i set file based sessions and the sessions are not expiring even after 
closing browser. its the issues in chrome but firefox is good. how can i 
fix it.

here is my config

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)


SESSION_ENGINE = 'django.contrib.sessions.backends.file'

SESSION_EXPIRE_AT_BROWSER_CLOSE = True

SESSION_FILE_PATH = os.getenv("HOME") + '/sessions'

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
..

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




url pattern correct but not working

2013-02-21 Thread Aswani Kumar
my url pattern 

[a-zA-Z0-9]-(?P\d+).html

urls will be like 

news-in-finland-yesterday-festival-3456.html

i want 3456 which is news id.

the regex is correct but not working if i keep it in urls.
url('^[a-zA-Z0-9]-(?P\d+).html$', 'tempa'),

please help...

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




IDE django with perforce

2013-05-29 Thread Aswani Kumar
hi guys,

we are having problem with eclipse 3.8 with pydev perforce plugins on 
ubuntu 13.04

*problem :* after using for few days or unexpected shutdown, eclipse stops 
working i mean opening.

we need perforce with django, can any one tell me whats the best ide for 
django with integrated perforce plugin.

any online step by step tutorial will do good.

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




session is missing on httpresponse redirect to google oauth

2013-11-19 Thread Aswani Kumar
here is my code

@login_required
def gpconnect(request):

if 'code' in request.REQUEST:

# insert google data to db

return render_to_response('social/google.html')
  
else:

rty="https://accounts.google.com/o/oauth2/auth?client_id="+GP_CLIENT_ID+"&response_type=code";
rty += "&scope=https://www.googleapis.com/auth/userinfo.profile 
https://www.googleapis.com/auth/userinfo.email 
htps://www.google.com/m8/feeds/contacts/&redirect_uri="+GP_REDIRECT_URI+"&state=1235dfghjkf123"
return HttpResponseRedirect(rty)


this is working for few and not for few users.
its going to google in the first call by satisfying login required true.
but the user data is missing when the user come back from google after 
authorizing our app and raising login_required.

please help me with any idea.



-- 
You received this message because you are subscribed to the Google Groups 
"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/a5ea5d1d-3dff-48a9-955f-dcff2e3b96ce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.