Re: Upgrading to 1.9 - Any Easy Guide ?

2016-01-14 Thread Vibhu Rishi
ading on what's changing and how that affects you. > > https://docs.djangoproject.com/en/stable/releases/1.5/ > > > Good luck!! > > > On Tuesday, January 12, 2016 at 10:36:28 AM UTC-2, Vibhu Rishi wrote: >> >> Hi Tom >> >> So essentially you are sa

Re: Upgrading to 1.9 - Any Easy Guide ?

2016-01-12 Thread Vibhu Rishi
Hi Tom So essentially you are saying to go with upgrade to 1.7 - fix issues and then to 1.8 etc ? V. On Jan 11, 2016 11:45 PM, "'Tom Evans' via Django users" < django-users@googlegroups.com> wrote: > On Mon, Jan 11, 2016 at 4:36 PM, Vibhu Rishi > wrote: > >

Upgrading to 1.9 - Any Easy Guide ?

2016-01-11 Thread Vibhu Rishi
Hi I work on a hobby project on and off which is based on django. After a long gap, I picked up the work again. In the meantime, it seems that django has been evolving faster than I have been working. I am currently on 1.6 (which I think i had upgraded from 1.4 or 1.3 as my starting base). However

Implementing a timeline of objects

2015-04-17 Thread Vibhu Rishi
Hi Folks, I am playing around with Django and making a site for my motorcycling group. I am trying to implement a timeline view and thought I would share my thoughts with you and get some feedback. So far, I have a few models which can be user created. A user can add a 'bike' , or a 'place' or a

Alternatives to markup and comments modules

2014-08-08 Thread Vibhu Rishi
I just picked up an old project i was working on ( wasn't working on it for a year almost), and now the comments and markup modules are not working. It seems that they have been depricated in 1.6 ( project was in 1.4 ). What are the current alternatives for these ? Vibhu -- Simplicity is the u

Re: How to pass URL to a view

2014-05-28 Thread Vibhu Rishi
; > > >-Original Message- > >From: django-users@googlegroups.com > >[mailto:django-users@googlegroups.com] On Behalf Of Vibhu Rishi > >Sent: Wednesday, May 28, 2014 4:23 PM > >To: django-users@googlegroups.com > >Subject: How to pass URL to a view > > > >

How to pass URL to a view

2014-05-28 Thread Vibhu Rishi
Hi, Maybe there is a better way to achieve what I am trying - so any suggestion is welcome :) I have a small view. It does nothing much - if the user clicks a button for being interested in something he is looking at - it adds to the table of interested things. e.g. as below : @login_required de

Re: Django authentication by email

2014-05-15 Thread Vibhu Rishi
Hi, django-allauth will work for your needs. Give it a try. http://django-allauth.readthedocs.org/en/latest/ V. On Thu, May 15, 2014 at 5:26 PM, Frankline wrote: > Hi all, > > I am thinking of developing a web application where users will have to > login by their email address instead of usi

Re: Creating an object using Foreign Key for Users but filtered by group

2014-05-05 Thread Vibhu Rishi
r'}) > > user= models.ForeignKey(User) > text = models.TextField(max_length=1000) > date = models.DateField(default=datetime.now()) > > > Le lundi 5 mai 2014 09:52:58 UTC-4, Vibhu Rishi a écrit : > >> Hi >> >> I have Users and based on some require

Creating an object using Foreign Key for Users but filtered by group

2014-05-05 Thread Vibhu Rishi
Hi I have Users and based on some requirements, I have created a few User Groups . e.g. I have a group of moderators. Now, I am trying to create a form where a normal user can message the moderators. So, I have a model to be used by the form something like : class Message(models.Model): mo

Re: FieldError, But Only In Production

2014-02-13 Thread Vibhu Rishi
Seems to me somewhere in the code it is trying to put user into a field instead of treating it as a table. Basic sanity checks : - is the djagno versions on both production and local same ? - same for wsgi and apache ? - syncdb worked fine ? V. On Thu, Feb 13, 2014 at 11:30 AM, Rich Jones wrot

Re: Django with Ubuntu Cloud

2014-01-31 Thread Vibhu Rishi
So - I can use Ubuntu One ( which seems to be like Drop box if I understand it correctly ) as a media file storage? V. On Jan 31, 2014 12:47 PM, "Me Sulphur" wrote: > Django is a fairly flexible web framework. See read more about STATIC and > MEDIA files in Django. The Ubuntu cloud API is docume

Re: Django with Ubuntu Cloud

2014-01-31 Thread Vibhu Rishi
untu Cloud. > > If you're looking for an alternative to S3, then you want OpenStack Swift. > There are Python libraries to talk to Swift stores, and there are Django > file storage backends that will use Swift as well. > > Yours, > Russ Magee %-) > > > > > &

Re: Django with Ubuntu Cloud

2014-01-31 Thread Vibhu Rishi
st changes to your setup? > > Regards, > > Andréas > > > 2014-01-31 Vibhu Rishi : > >> Hi, >> >> Has anyone setup Django with Ubuntu Cloud ? >> >> My primary interest is how to setup the media server. I am primarily >> using Heroku for the

Django with Ubuntu Cloud

2014-01-30 Thread Vibhu Rishi
Hi, Has anyone setup Django with Ubuntu Cloud ? My primary interest is how to setup the media server. I am primarily using Heroku for the hosting of the project, but that does not provide hosting for the static / user uploaded files. So, I am looking at what alternatives I have. There are a lot o

Re: Deploying to Heroku for first time, Dynos is blank, not recognizing Procfile

2014-01-09 Thread Vibhu Rishi
ents therein)? >> Heroku recognises python apps by its presence (although I'm told this is >> not yet 100% reliable - never tried myself). >> >> >> On Tue, Jan 7, 2014 at 9:55 AM, Vibhu Rishi wrote: >> >>> yes. just create a text file with no extens

Re: Deploying to Heroku for first time, Dynos is blank, not recognizing Procfile

2014-01-07 Thread Vibhu Rishi
yes. just create a text file with no extension. Here's mine for reference : $ cat Procfile web: gunicorn qj.wsgi V. On Tue, Jan 7, 2014 at 9:31 AM, Scott Meyers wrote: > Programming newb, Trying to use Heroku for the first time for a Django > app. After I push it to Heroku, the Dynos field is

Re: Embedding images like on Quora

2014-01-06 Thread Vibhu Rishi
run > > On Monday, January 6, 2014 2:48:30 PM UTC+5:30, Vibhu Rishi wrote: >> >> Hi, >> >> Is there a way to have images show up by just pasting a url ? >> >> e.g. on Quora, if i paste a url to an image - http://www.brothersthegame. >> com/core/media/i

Re: Embedding images like on Quora

2014-01-06 Thread Vibhu Rishi
6, 2014 at 2:48 PM, Vibhu Rishi wrote: > Hi, > > Is there a way to have images show up by just pasting a url ? > > e.g. on Quora, if i paste a url to an image - > http://www.brothersthegame.com/core/media/images/brothers_europe05_big.jpg > > it shows up as an image not as

Embedding images like on Quora

2014-01-06 Thread Vibhu Rishi
Hi, Is there a way to have images show up by just pasting a url ? e.g. on Quora, if i paste a url to an image - http://www.brothersthegame.com/core/media/images/brothers_europe05_big.jpg it shows up as an image not as a URL. How can I achieve the same using django ? Regards, Vibhu -- Simplici

Re: How to deploy a django project in the web?

2013-12-24 Thread Vibhu Rishi
Try Heroku https://devcenter.heroku.com/articles/getting-started-with-django Caveat - just found it the hard way - heroku does not support user uploaded files. So, if your project has that you will need to figure out where to host the files. One suggestion given on the heroku site is AWS S3 https:

Re: django-facebook

2013-12-17 Thread Vibhu Rishi
I installed Pillow a few days back - it went fine. $pip install Pillow You need to make sure that you have libraries for png/jpg available. I am not sure if that has to be a pip or a sudo apt-get ( i went the apt-get way ) V. On Tue, Dec 17, 2013 at 6:35 PM, Duncan Bates wrote: > Testing dja

Re: Adding Objects to Query Set

2013-12-17 Thread Vibhu Rishi
ber=request.user), you want to fetch > > Project.objects.filter(projectmember_set__member=request.user). That > > will get you Project objects rather than ProjectMember objects. > > > > On Monday, December 16, 2013 1:47:13 PM UTC, Vibhu Rishi wrote: > > > > > &

Re: Adding Objects to Query Set

2013-12-17 Thread Vibhu Rishi
r 16, 2013 1:47:13 PM UTC, Vibhu Rishi wrote: >> >> Hi >> >> I am not able to figure this out. I want to add objects to a query set. >> >> I have 2 models : >> 1. Projects which is basically a list of projects. I have a field which >> defi

Re: Adding Objects to Query Set

2013-12-16 Thread Vibhu Rishi
> projects = Project.objects.filter(owner=request.user).all() > member_projects = ProjectMember.objects.filter(member = > request.user).exclude(project__owner=request.user).all() > total_projects = projects + member_projects > > > On Mon, Dec 16, 2013 at 8:47 AM, Vibhu Rishi wrote: > &

Re: Adding Objects to Query Set

2013-12-16 Thread Vibhu Rishi
Hi Sebastian, Not really. I want the list of project objects which is coming ok by filtering on the user object. I checked it from commandline, and I am getting it correctly. The problem is the 2nd table. I want to get the projects from the 1st table when the user is a member as specified in the

Adding Objects to Query Set

2013-12-16 Thread Vibhu Rishi
Hi I am not able to figure this out. I want to add objects to a query set. I have 2 models : 1. Projects which is basically a list of projects. I have a field which defines the owner of the project. e.g. : class Project(models.Model): ... owner = models.ForeignKey(User) 2. ProjectMember

Displaying images in comments/text fields

2013-12-13 Thread Vibhu Rishi
I want to show images in comments or text fields. I looked at markdown - and while it is quite cool for text formatting, it is quite archaic for image display. Also it does not do any resizing so some large images go out of bounds. So, can you guys guide me to some good template filter utility wh

Re: python virtual environment

2013-12-05 Thread Vibhu Rishi
so, for an existing project, how do i update the manage.py file ? create a new project in 1.6 and copy it over ? V. On Thu, Dec 5, 2013 at 9:58 PM, Timothy W. Cook wrote: > > > > On Thu, Dec 5, 2013 at 2:09 PM, Vibhu Rishi wrote: > >> I am getting the same error whe

Re: python virtual environment

2013-12-05 Thread Vibhu Rishi
I am getting the same error when I did an upgrade of Django to 1.6 . Reverted back to 1.5 and it seems to work, but i am still searching for a solution for this to work with 1.6 V. On Fri, Nov 29, 2013 at 11:14 PM, tino wrote: > > > Hello > > I am trying to run a project that was setup in anot

Re: Email Templates and the full website URL

2013-12-02 Thread Vibhu Rishi
te a custom template tag. > > > On Fri, Nov 29, 2013 at 2:55 PM, Rafael E. Ferrero < > rafael.ferr...@gmail.com> wrote: > >> Good work!! >> >> >> >> 2013/11/29 Vibhu Rishi >> >>> Thanks for the links. I had done the google searches

Re: Email Templates and the full website URL

2013-11-29 Thread Vibhu Rishi
Nov 29, 2013 at 4:26 PM, Rafael E. Ferrero wrote: > > https://docs.djangoproject.com/en/dev/ref/contrib/sites/#getting-the-current-domain-for-full-urls > > > 2013/11/29 Vibhu Rishi > >> hi, >> >> I have a setup where I have a project details page, and I can do

Email Templates and the full website URL

2013-11-29 Thread Vibhu Rishi
hi, I have a setup where I have a project details page, and I can do a "send email" which should send the email with the URL. Email is working fine. The problem is that i am getting a relative url in the tempalte I have the following in the html email template : {{ project }} This give me a UR

Re: How do I display the human readable name of a choice?

2013-11-28 Thread Vibhu Rishi
you just need to enclose it in a get__display and it will display it in the template file. in your example below, you will need to show it as follows in your templates html file: object.get_state_display where object is whatever the object name you have passed via the view. Hope this helps. V.

Re: How to fix URL link redirecting from login?

2013-11-24 Thread Vibhu Rishi
Its the @login_required decorator. https://docs.djangoproject.com/en/1.2/topics/auth/#the-login-required-decorator V. On Sun, Nov 24, 2013 at 3:46 PM, Timothy W. Cook wrote: > Check in the docs for the instructions on decorating your views to > restrict to authenticated users. This also talks

Re: Django 1.6 error at creating project

2013-11-14 Thread Vibhu Rishi
ndows > OS I fired up a Virtual Machine with Ubuntu and everything is working > fine. > > So I'm testing my code in the Virtual box. > > Thanks for your time! > > Ferdy > > On Sunday, November 10, 2013 5:22:01 AM UTC-6, Vibhu Rishi wrote: >> >> Do

Re: Django 1.6 error at creating project

2013-11-10 Thread Vibhu Rishi
Do you have both versions of django installed ? That could cause the issue. I suggest that you make a virtual environment ( https://pypi.python.org/pypi/virtualenv ) and do a pip install of django. This will let you work on different versions of django on the same machine. Vibhu On Sun, Nov 10,

Re: Google Maps with Routes

2013-11-10 Thread Vibhu Rishi
h-python > > > personally, I have used osmand to capture gpx track data and then upload > them to openstreet map and create a bike route > or http://www.gpsvisualizer.com/ if you want just to plot your track > > > On Sun, Nov 10, 2013 at 6:22 AM, Vibhu Rishi wrote: > >

Google Maps with Routes

2013-11-09 Thread Vibhu Rishi
Hi Guys, As a hobby project I am working on a website for my motorycle touring group ( A very early alpha is on http://www.bikenomads.co.in ) I am working on the trip module and one of the things I want to work on is a graphical trip route. I checked a few google map modules for django and they

Re: how start work in django after installation in ubuntu

2013-10-03 Thread Vibhu Rishi
First of all, i suggest you start working in django in a virtualenv. This helps as you can have your own virtual env for installing additional django modules. if you want to host and check it on the web, i suggest you checkout this page : https://devcenter.heroku.com/articles/getting-started-with-d

Re: Two sets of registration with django-registration

2013-10-02 Thread Vibhu Rishi
implementation. vibhu On Tue, Sep 24, 2013 at 7:32 AM, Vibhu Rishi wrote: > Thanks for the pointer. Will check out all auth. > > V. > > > On Tue, Sep 24, 2013 at 4:03 AM, Kamil Gałuszka wrote: > >> >> Of course. >> >> First of all I would recommend you usin

Re: custom if tag

2013-09-28 Thread Vibhu Rishi
Hi Alagappan, The assignment_tag worked perfectly for me ! Thanks! Vibhu On Tue, Sep 24, 2013 at 1:01 AM, Alagappan wrote: > You can implement has_applied as a filter instead of a template tag. > https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters

Re: Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
save_user to actually do what you want. > > And that is it. Is just that simple > > Cheers > Kamil > > > > > On Monday, September 23, 2013 7:32:38 PM UTC+2, Vibhu Rishi wrote: >> >> Hi, >> >> I have 2 types of users with different views of th

custom if tag

2013-09-23 Thread Vibhu Rishi
Hi, My scenario is that users would have applied for some job opening. I need to do something like the following in my templates : {% if has_applied opening user %} You have applied {% else %} Click to apply {% endif %} However, so far i have been using templatetags and got the following only: {

Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
Hi, I have 2 types of users with different views of the same page . Using django-registration, I have been able to setup all the signup/password change etc for one level of users - say students. Now I want to have another set of registrations for Teachers. Is there a way to achieve that ? Vibhu

Re: Login not working.

2013-09-07 Thread Vibhu Rishi
Hi Nigel, You could also try using django-registration . I found that it made a lot of the things I was trying with user login/registration easier. Vibhu On Fri, Sep 6, 2013 at 8:05 PM, Nigel Legg wrote: > I have removed the form.is_valid check and renamed the view, this now > works (except

Re: Django-registration reset password templates not getting picked up

2013-09-03 Thread Vibhu Rishi
project template > folder and not in an app templates folder. > > K > > > > On Monday, September 2, 2013 7:01:30 PM UTC-7, Vibhu Rishi wrote: >> >> Essentially the below should work (and is working for all) as I have the >> following template l

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
Essentially the below should work (and is working for all) as I have the following template loader: TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) Vibhu On Tue, Sep 3, 2013 at 7:21 AM, Vibhu Rishi

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
On Monday, September 2, 2013 9:42:50 AM UTC-7, Vibhu Rishi wrote: > >> >> So far, all the other template html files get picked up - except the ones >> related to the password management ones. >> >> Vibhu >> > -- > You received this message because yo

Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
eset_form.html > > In /my_project/my_project/settings.py > > PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) > > TEMPLATE_DIRS = ( > os.path.join(PROJECT_ROOT, 'templates_global') > ) > > The templates were all copied > from django.con

Django-registration reset password templates not getting picked up

2013-08-31 Thread Vibhu Rishi
I am getting a bit of a problem with django-registration django-registration was installed in a venv using pip. I have version 1.0 of django-registration and 1.5.1 of Django . I have the templates/registration directory with the templates for the pages that are to display the different pages. logi

Re: Simple Static Content Site on Heroku?

2013-06-16 Thread Vibhu Rishi
In this case - do you even need django ? A html site with just bootstrap for the response ux will be enough. Vibhu On Sun, Jun 16, 2013 at 7:32 PM, Vincent Fulco wrote: > Fairly new to the framework and have been reading a ton of material. > > While I have found a couple of great git repos usin

Re: Can't open any other view except default "It Worked!" page......

2013-05-04 Thread Vibhu Rishi
Did you : 1. add the polls app to the INSTALLED_APP? 2. modify the urls.py as mentioned below to go to the polls ? Vibhu On Sun, May 5, 2013 at 7:42 AM, Russell Keith-Magee wrote: > > If all you're getting is the "It worked!" page, then it means your urls.py > hasn't been configured correctly.

Re: Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
I tried this but when I click submit, the page goes to http://127.0.0.1:8000/account/login/ . i suppose once the login part finishes it is supposed to go to the LOGIN_REDIRECT_URL setting. Vibhu On Wed, Apr 17, 2013 at 9:38 PM, Gabriel [SGT] wrote: > > still trying to figure out the login part

Re: Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
update: logout seems to be working if i change the logout url pattern to : (r'^logout/$', 'logout', {'template_name':'homepage/index.html', 'next_page':'/'}), still trying to figure out the login part. Vibhu On Wed, Apr 17, 20

Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
Hi, I am trying to figure out if i can get away with creating the login.html and logout.html files ? The scenario is this: - I have a navigation bar which has the username/password field in it . I am using the example at : http://twitter.github.io/bootstrap/examples/hero.html - I want the user to

Re: Trouble with CSS/Static Files

2013-04-04 Thread Vibhu Rishi
loy it. However, the problem I was getting was on my local system. Vibhu On Fri, Apr 5, 2013 at 4:00 AM, CJ Milholland wrote: > Have you ran > > $ manage.py collectstatic > > On Thursday, April 4, 2013 12:49:11 AM UTC-7, Vibhu Rishi wrote: >> >> I am not sure where I am g

Re: Trouble with CSS/Static Files

2013-04-04 Thread Vibhu Rishi
g ! Thanks for the tip for going up a directory else i would still be floundering ! Vibhu On Thu, Apr 4, 2013 at 7:24 PM, Tom Evans wrote: > On Thu, Apr 4, 2013 at 8:49 AM, Vibhu Rishi wrote: > > I am not sure where I am going wrong, but the CSS files are just not > getting >

Re: Trouble with CSS/Static Files

2013-04-04 Thread Vibhu Rishi
Hi Jack, Template is fine as the Hello World is getting rendered correctly. I also get the 200 for / Vibhu On Thu, Apr 4, 2013 at 6:33 PM, Jacky Tedy wrote: > it looks like you don't have the right template ! You sure you have the > right path? > > > 2013/4/4 Vibhu Rishi

Trouble with CSS/Static Files

2013-04-04 Thread Vibhu Rishi
I am not sure where I am going wrong, but the CSS files are just not getting picked up. I have just started a project and am using the dev server with the runserver command. Here's my relevant settings.py : STATIC_ROOT = os.path.join(os.path.dirname(__file__),'/static/') STATIC_URL = '/static/'

[Heroku] App crashing on unidle

2013-03-07 Thread Vibhu Rishi
Hi I have not done any update to my django site in the last couple of weeks. However, suddenly, about 2 days back, it is crashing repeatedly. If I stop and start the web service from the heroku.com site, it starts again. If check logs from the command line ( heroku logs ) it starts after sometime.

Re: virtualenv setup

2013-01-04 Thread Vibhu Rishi
Hi Phil, What OS are you running on ? for ubuntu, you need to have an extra parameter while creating the venv like : $ virtualenv venv --distribute --no-site-packages After that source the environment and pip install the packages pip install Django psycopg2 dj-database-url I would suggest you tr

Re: Get objects sorted by time of last comment

2013-01-04 Thread Vibhu Rishi
add comment timestamp to the post model data. then the query could become much simpler in the sense that I only need to get post objects, and sort by last_comment_time field. Vibhu On Wed, Jan 2, 2013 at 8:45 PM, akaariai wrote: > On 2 tammi, 08:50, Vibhu Rishi wrote: > > Hi All, >

Get objects sorted by time of last comment

2013-01-01 Thread Vibhu Rishi
Hi All, A very happy new year to you all ! I am working on a website I am making as my hobby project. It is to do with motorcycle touring. I have done some initial work on it, and incrementally making changes as and when I can. I am trying to figure out the following issue : 1. I have a forum o

Re: Happy new year

2013-01-01 Thread Vibhu Rishi
Happy new year from India ! Keep Djangoing ! V. On Wed, Jan 2, 2013 at 4:56 AM, Elena Williams wrote: > Happy New Year from to all the Djangonauts from stonking hot Australia! > > I hope everyone's Django projects are awesome and plentiful this year! > > Go you smart, creative Django folk! > -

Re: views on one page

2012-11-15 Thread Vibhu Rishi
I don't think you can use 2 views on the same page. what you can do is pass 2 values to the same page to display. so in the 2nd view you will do as follows: return render_to_response("kundendaten.html", { 'row': row,'current_date': now }, context_instance=RequestContext(request)) and make sure t

Re: django - adding a counter for every ManyToMany field added

2012-11-13 Thread Vibhu Rishi
Would this not work : count = i.objects.filter(activities=Activity).count() Where you would put the count in a for loop for the Activity and iterate over it. V. On Wed, Nov 14, 2012 at 5:05 AM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > I'm not sure I understand. Do you want

Re: Forbidden (403)

2012-11-12 Thread Vibhu Rishi
When is it that you are getting the 403 ? On Mon, Nov 12, 2012 at 7:30 PM, Nebros wrote: > I know this is an old problem with many answers... but no one helps me. ^^ > what i have: > > Settings > MIDDLEWARE_CLASSES = ( > 'django.middleware.csrf.CsrfViewMiddle

Re: What is the easy way to install DJango?

2012-08-15 Thread Vibhu Rishi
Hi, If you are new to Django and are just getting around to learn it, I recommend using BitNami Django stack for windows. http://bitnami.org/stack/djangostack So far, it has been the easiest to install on the windows machine. Vibhu On Wednesday, 15 August 2012 14:06:33 UTC+5:30, Thato wrote: