Re: urls.py and login forms

2012-03-08 Thread vikalp sahni
Hi, Here what i can see is you have added a prefix in your pattern, urlpatterns = patterns(*'myapp.views'*, url(r'^login/$','django.contrib.auth.views.login'),) This ideally should be. urlpatterns = patterns(*''*, url(r'^login/$','django.contrib.auth.views.login'),) As the prefix is applied

Re: django admin login

2012-03-14 Thread vikalp sahni
You have to check your SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if not cookies will not properly set and hence login will not be allowed) the best would be to use some host entry like example.com 127.0.0.1 and then use that in SESSION_COOKIE_DOMAIN and for accessing

Re: django admin login

2012-03-14 Thread vikalp sahni
peruser again: >> >> ./manage.py createsuperuser >> >> >> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni <vikalpsa...@gmail.com>wrote: >> >>> You have to check your >>> >>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "local

Re: django admin login

2012-03-15 Thread vikalp sahni
, 2012 at 11:32 PM, dummyman dummyman <tempo...@gmail.com>wrote: > >> hi >> >> i got this error msg >> >> Please enter a correct username and password. Note that both fields are >> case-sensitive. >> >> >> On Wed, Mar 14, 2012 at 11:21 PM,

Re: dropping ForeignKey not reflected in admin

2012-06-15 Thread vikalp sahni
strange, I hope you are checking the right model and right admin. Can you check you have traces for that field on your admin.py Regards, //Vikalp On Fri, Jun 15, 2012 at 11:37 PM, Larry Martell wrote: > I have a table that had a ForeignKey reference. In the admin

Re: Locating the Django admin Page

2013-02-10 Thread vikalp sahni
I hope you have settled up admin contrib app properly on your settings.py https://docs.djangoproject.com/en/dev/ref/contrib/admin/ On Sunday, February 10, 2013, Thota Madhu Sudhan Rao wrote: > I am running apache tomcat server in Amazon EC2 and running django > application > The admin page of

Re: django admin site and debug

2011-05-03 Thread vikalp sahni
are you using it on any webserver or on django management server (manage.py runserver) at some port?? it can happen if in any of your urls.py you have mentioned something specefic to DEBUG variable. But its quite a strage behaviour. more inputs on your installation or how you are running will be

Re: how to use jquery for date picker

2011-05-04 Thread vikalp sahni
http://jqueryui.com/demos/datepicker/ Furthermore i think, this is not the right list for Jquery related queries. Regards, //Vikalp On Wed, May 4, 2011 at 4:15 PM, GKR wrote: > how to use jquery for date picker > > please help > > -- > You received this message because

Re: how to use jquery for date picker

2011-05-04 Thread vikalp sahni
are you planing to use that in place of django current date time picker widget?? Which means are you looking to change the behaviour of Django Form, DateTimeField to use Jquery?? I would suggest not to change default datepickerwidget, as it works like a charm in admin forms. You should though

Re: Allow only one record in admin.ModelAdmin !

2011-05-04 Thread vikalp sahni
sorry, didn't get you. << I need just only to limit to one record >> is it something like you want one user to add only one record to certain table from admin?? On Wed, May 4, 2011 at 10:41 AM, Toninho Nunes wrote: > Hi, > > I have a table named Config, I need just

Re: hidden rows common elements also visible on list filters

2011-05-05 Thread vikalp sahni
How have you made rows hidden?? if you talking about admin, You can control by overriding querset method for that particular table admin. Example: class sometableAdmin: def queryset(self, request): if(whatevercond): return super(, self).queryset(request)

Re: poll problem

2011-06-13 Thread vikalp sahni
This is for Admin functionality of django. It basically tells about how to replace 'Django Administration' or 'Django' keyword from admin pages to '' to basically personalize the look and feel of django admin pages. Though this is just a UI related change which will not effect the functionality

Re: Problem in accepting values from a form in a template . How to debug this ?

2011-06-14 Thread vikalp sahni
Page Not Found or 404, basically doesn't have any relation with template of form. Just check if you have the URL that you are trying to hit in urls.py, as 404 happens when the URL you are trying to access is not configured or not available on your webapp. Regards //Vikalp On Tue, Jun 14, 2011

Re: reqquest.user is not defined

2011-07-21 Thread vikalp sahni
If There is no user request.user holds. AnonymousUser Object. if you user request.user.is_authenticated() it should give False in case user if not logged_in, and you can load your page accordingly. Regards, //Vikalp On Thu, Jul 21, 2011 at 11:52 AM, bahare hoseini wrote:

Re: Replace Admin Site Foreign Key Field/Dropdown with Textbox?

2010-08-08 Thread vikalp sahni
You can also hide that field which inturn will not load it on page by using "fields" attribute in admin class for that particular model and specify all the fields required to be shown on change list page. Just omit the Foreign Key field in the "fields" list in case u don't need it in admin.

Re: limit a view for an ip address only

2010-08-12 Thread vikalp sahni
using request.META['REMOTE_ADDR'] and the passing ur request through custom middleware might solve your problem Ex: You can have a standard user let say "internal" which you can put into your request if it comes from internal IP inside middleware. from django.contrib.auth import login,

Re: AttributeError for ModelForm

2010-08-14 Thread vikalp sahni
As you are using Multi Table Inheritance, Django docs says you should give "related_name" attribute to all your sub classes fields where relation is tried to establish. You can try changing ur Question Model to: class Question(QItem): answerObject = models.OneToOneField("AnswerObject",

Re: REST XML + HTML API suggestions

2010-09-21 Thread vikalp sahni
Hi, You might want to have a look at django-piston. http://bitbucket.org/jespern/django-piston/wiki/Home Its a nice project to give rest full interface to your models. And for some specific logic also you can tweak the handlers to get desired results. Regards, //Vikalp On Tue, Sep 21, 2010

Re: Can I install Django on my Webserver?

2010-09-27 Thread vikalp sahni
Yeah you can, most of the shared web hostings provide either of Passegener Fast CGI WSGI Modules to run python web apps. you need to check which one is installed for you and use the respective config. Regards, //Vikalp On Mon, Sep 27, 2010 at 12:58 PM, McFarlane wrote: > Hello,

Re: Saving images in django

2010-11-10 Thread vikalp sahni
If you are using apache. you can simple disable the indexing of files. in your apache conf directory directive. This will give forbidden 403 if u try to access the directory from apache. hence no files are seen. Options -Indexes I hope this helps. Regards

Re: How can I set a flatpage to be my homepage?

2010-11-21 Thread vikalp sahni
Hi, If i understood ur question properly you need a URL rewrite. you can try either Apache Rewrite (1st Preference) or you can also import a django app "django.contrib.redirects" which will help u in redirecting URL's Regards //Vikalp On Sun, Nov 21, 2010 at 4:18 PM, mongoose

Re: How to customize admin's save button functionality?

2010-03-29 Thread vikalp sahni
You can override a method called "save_model" inside your model admin class, this will be called whenever you hit save button of admin for a particular class. You can write your custom logic in this method. ex def save_model(self, request, obj, form, change): Your Logic Regards,

Re: Debugging Deeper Into Django

2011-01-08 Thread vikalp sahni
for custom logging you can always your python logging module, which is just like log4j. Also if you need any specifics regarding db queries etc. you can try out. Django Debug Toolbar: https://github.com/robhudson/django-debug-toolbar Hope it helps. Regards, //Vikalp On Sun, Jan 9, 2011 at

Re: Debugging Deeper Into Django

2011-01-09 Thread vikalp sahni
/logging.html Regards, //Vikalp On Sun, Jan 9, 2011 at 7:48 PM, octopusgrabbus <old_road_f...@verizon.net>wrote: > Would you post more details on the python logging module, like how to > configure it? > > On Jan 8, 2:26 pm, vikalp sahni <vikalpsa...@gmail.com> wrote: > &

Re: interface admin

2011-03-07 Thread vikalp sahni
check out. django-admin-tools https://bitbucket.org/izi/django-admin-tools/wiki/Home it might help you. Regards, //Vikalp On Mon, Mar 7, 2011 at 6:44 PM, galbourn wrote: > I started in Django and I have a question. > Is it possible to generate different admin

Re: When do we stop using Django admin?

2011-03-07 Thread vikalp sahni
Hi, Django Admin is nicely structured to give you lot of flixibility. We have tweaked around admin using all possible features and with good mingling of MIDDLEWARE, AUTH_BACKENDS and STORAGE one can achive a lot of integrations and customizations. have a look at these slides, it brings more

Re: When do we stop using Django admin?

2011-03-07 Thread vikalp sahni
restricting say a foreign > key lookup to just the data they are allowed to access etc. > > Ajai > > On Mar 7, 11:57 pm, vikalp sahni <vikalpsa...@gmail.com> wrote: > > Hi, > > > > Django Admin is nicely structured to give you lot of flixibility. > >

Re: Error on django program with django-socialregistration....

2011-03-21 Thread vikalp sahni
https://github.com/facebook/python-sdk You have to use this. As the method giving error is implemented on Facebook Python-SDK. Regards //Vikalp On Mon, Mar 21, 2011 at 4:15 PM, Calvin Spealman wrote: > Do you possibly have a module or package in your project named