django cms without django admin

2011-01-09 Thread vamsy krishna
Hi, I'm trying to set up django-cms-2.0.2 for my site. The problem is we haven't enabled the django admin for security reasons and want to keep it that way. Is there a way to use the cms without the admin interface? Thanks, Vamsy -- You received this message because you are subscribed to the

Re: Class based views and form processing

2011-01-09 Thread Łukasz Rekucki
``CreateView`` includes ``ModelFormMixin``, which is responsible for saving the model form: def form_valid(self, form): self.object = form.save() return super(ModelFormMixin, self).form_valid(form) So, you need to override that method in your subclass: class

Class based views and form processing

2011-01-09 Thread Justin
Hello, I am experimenting with the new class based views coming in 1.3 and am having trouble figuring out when/where to put this code. I want to populate a model's created_by field with the user of the current request. In the old views, I would have done something this: obj =

Re: Model Manager filtering on Boolean causing IntegrityError

2011-01-09 Thread Shantp
For anyone interested, this is the answer provided by the django IRC channel. The admin looks for the first Manager by default. All I had to do was flip the order they showed up in the Model. Even with the admin.py overriding queryset and pointing to the other Manager, the order is important.

Re: how to map admin actions with shortcut keys

2011-01-09 Thread Mikhail Korobov
Hi Rahul, This can be solved using custom javascript. Override ModelAdmin's changelist template ( http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#overriding-admin-templates ) in order to insert the necessary javascript code. On 10 янв, 00:37, rahul jain wrote:

Re: Model Manager filtering on Boolean causing IntegrityError

2011-01-09 Thread Shantp
The reason I mentioned the filtering is if I turn the filter off or filter for only objects where the "verified" Boolean is False instead of True, there is no unique integrity error. I did not have a unique=True attribute in the model at any time and this is happening on a fresh db. I'm pretty

Re: templating best practices in django

2011-01-09 Thread Carles Barrobés
In terms of best practices for Django templates, I recommend that you try to use template inheritance extensively, in similar ways as when you would use subclassing: - Create a base.html template with everything that appears in all your pages (common header and footer, generic html headers...). -

Re: Model Manager filtering on Boolean causing IntegrityError

2011-01-09 Thread Daniel Roseman
On Sunday, January 9, 2011 6:40:17 PM UTC, Shantp wrote: > > I am using a Manager on a model based on a Boolean field to filter the > objects displayed on the site while showing all objects in the admin > unfiltered. The idea is that user's are submitting Locations but I do > not want them to

how to map admin actions with shortcut keys

2011-01-09 Thread rahul jain
How to map admin actions with shortcut keys ? I have an action to perform on rows (objects) which changes the value of one of the columns(fields) to "x" and some to "y" and some to "z". I would like to save some time by not going through the normal route (after selecting the rows, selecting from

Re: Debugging Deeper Into Django

2011-01-09 Thread vikalp sahni
looks like django is incorporating tighter integration with python logging library. do check out. http://docs.djangoproject.com/en/dev/topics/logging/ Though i think its only on development version as of now. more details on logging module can be find out at.

Model Manager filtering on Boolean causing IntegrityError

2011-01-09 Thread Shantp
I am using a Manager on a model based on a Boolean field to filter the objects displayed on the site while showing all objects in the admin unfiltered. The idea is that user's are submitting Locations but I do not want them to show on the site until they have been verified as a valid location

Re: Unable to import middleware class 'facebook.djangofb.FacebookMiddleware' with uncaught exception

2011-01-09 Thread PJ
Confirmed that Django is running 2.6.2, same version that I can >>> import facebook.djangofb >>> on. I saw http://groups.google.com/group/django-users/browse_thread/thread/34f674ab2a083605/fcdc02c143ade43d?lnk=gst=djangofb#fcdc02c143ade43d a while ago, but this was resolved with: garagefan: doh,

Re: Curious 500 errors

2011-01-09 Thread Karen Tracey
On Fri, Jan 7, 2011 at 7:57 PM, Conor wrote: > Hello, I am new to Django and working on integrating it with > MailChimp. I am implementing call back handlers for their Web Hooks. > This should be just views. > > Anyway, I am testing running the dev server and seeing that

Re: Debugging Deeper Into Django

2011-01-09 Thread octopusgrabbus
Would you post more details on the python logging module, like how to configure it? On Jan 8, 2:26 pm, vikalp sahni wrote: > for custom logging you can always your python logging module, which is just > like > log4j. > > Also if you need any specifics regarding db queries

Re: templating best practices in django

2011-01-09 Thread Mark (Nosrednakram)
> 1. Should I great an app only for this purpose, in the sense, an app will > host a header and footer functions (methods) along with their views. Is that > the best practice? You can use {% include "snippet.html" %} or a {% block name %}Default template in your base template that you extend{%