how to have admin not generate insert command for a particular field?

2012-06-10 Thread ali alizadeh
hi how to have admin not generate insert command for a particular field, so that the field gets its value at database level. I tried adding `editable=False` to field options of that particular field in my model, but no luck. also i don't want to use `default` field option. I need the field to take

Re: Custom tag inside a block tag. Django templates

2012-06-10 Thread Даниил Рыжков
Can you please submit error you get? {{ var }} is for varaibles, not for tags. 2012/6/11 David Gómez > Hello everyone. > > In Django 1.2.5 I had something like: > > {% block contact %} > rel="stylesheet" /> > {% endblock %} > > Where custom_tag returns a single url. Now, in Django 1.4 this is n

Re: Graphs for my Django Application

2012-06-10 Thread Tanveer Ali Sha
Thank you Kenneth for your rule, I am fresher and this tip may help me alot...:) On Mon, Jun 11, 2012 at 11:14 AM, kenneth gonsalves wrote: > On Mon, 2012-06-11 at 11:06 +0530, Tanveer Ali Sha wrote: > > Anyone knows about Django-Chartit..?? > > Is it good to make use of this for my applicat

Re: Graphs for my Django Application

2012-06-10 Thread kenneth gonsalves
On Mon, 2012-06-11 at 11:06 +0530, Tanveer Ali Sha wrote: > Anyone knows about Django-Chartit..?? > Is it good to make use of this for my application?? my rule of thumb - if an app has not had a commit in the last 3 months, approach with care. (caveat I have not used the app) -- re

Re: Graphs for my Django Application

2012-06-10 Thread Tanveer Ali Sha
Hey...!! Anyone knows about Django-Chartit..?? Is it good to make use of this for my application?? Thank Yo..:) On Sat, Jun 9, 2012 at 4:12 PM, Tanveer Ali Sha wrote: > Thank You one and all..:) > > > On Fri, Jun 8, 2012 at 11:14 PM, bobhaugen wrote: > >> http://d

Custom tag inside a block tag. Django templates

2012-06-10 Thread David Gómez
Hello everyone. In Django 1.2.5 I had something like: {% block contact %} {% endblock %} Where custom_tag returns a single url. Now, in Django 1.4 this is not working and I have to change {% custom_tag %} for {{ custom_tag }} in order to make it work. Why? Best regards, David Gómez. -- You

RE: Request.Method Query !

2012-06-10 Thread king king
What you expected sounds like restful style. I do remember that bitbucket provides a django middleware "django-piston". I think this may fit your needs -Original Message- From: vinod kumar Sent: 2012/6/10 18:32 To: Django users Subject: Request.Method Query ! Hey All, I have a small dou

Re: django form, android post

2012-06-10 Thread 罗健忠
I think use "post" method is usually correct and here is a article for how to choose from "post" and "get": http://www.w3.org/2001/tag/doc/whenToUseGet.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Using middleware to catch custom exceptions in views

2012-06-10 Thread Daniel Swarbrick
I have a number of views that can raise a custom exception when something unexpected happens (in this particular case, when a back end server TCP socket connection fails). I'd like to use middleware to catch this exception, inject an error message into request, and then render the page as per n

Re: django form, android post

2012-06-10 Thread şahin mersin
is this "get" method send image file? method="get" -- 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...@googl

Re: django form, android post

2012-06-10 Thread Timothy Makobu
The data will be in the request.POST dict http://djangobook.com/en/2.0/chapter07/ On Sun, Jun 10, 2012 at 10:31 PM, electrocoder wrote: > Hi. I want send data in django html form. What is use metod ? > > -- > You received this message because you are subscribed to the Google Groups > "Django user

Re: Migration error

2012-06-10 Thread Hendrik Speidel
Hi again, can you verify that there are two migration scripts in your migrations folder? if yes, did you run manage.py migrate after the initial fake migration? if not, i speculate, that you ran south only after you already changed the models to include the aa column. South needs to know the i

Re: Migration error

2012-06-10 Thread Raitucarp
Remember that I using sqlite3. -- 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/-/_AylyCZQ0yEJ. To post to this group, send email to django-users@googlegroups

django form, android post

2012-06-10 Thread electrocoder
Hi. I want send data in django html form. What is use metod ? -- 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/-/-f52MHM1LkIJ. To post to this group, send emai

Re: Migration error

2012-06-10 Thread Raitucarp
@henzk I still get the error, when access admin: DatabaseError at /admin/ngobrol/ngobrol/ no such column: ngobrol_ngobrol.aa -- 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.co

Re: Migration error

2012-06-10 Thread Hendrik Speidel
Hi Raitucarp, you can use the convert_to_south command to convert an existing app (with existing database tables) to south. In your case a manage.py migrate ngobrol 0001 --fake followed by a "manage.py migrate ngobrol" should fix your issue (given that you ran south initially, before changin

Migration error

2012-06-10 Thread Raitucarp
'ENGINE': 'django.db.backends.sqlite3' I have a model such this: class Ngobrol(models.Model): title = models.CharField(max_length=200, blank = True) message = models.TextField('Message') linkp = models.URLField(max_length=255, blank = True) meta_data = models.Text

Re: Request.Method Query !

2012-06-10 Thread Timothy Makobu
https://groups.google.com/forum/?fromgroups#!topic/django-developers/dxI4qVzrBY4 On Sun, Jun 10, 2012 at 7:34 PM, Ejah wrote: > If you want to add something, you will probably use a form and in it's > template you can specify that the method is 'post'. Similar for put, > get etc. > Hth > > On 10

Re: Request.Method Query !

2012-06-10 Thread Ejah
If you want to add something, you will probably use a form and in it's template you can specify that the method is 'post'. Similar for put, get etc. Hth On 10 jun, 16:36, vinod kumar wrote: > Dear   Timothy Makobu, > > Thanks for your explanation. I got the part which you explained. My doubt > is

Setting a GenericForeignKey results to a FieldNotFoundError

2012-06-10 Thread Salvatore Iovene
Hi, I'm using django-reviews in my site. Sometimes, reviewed items will be merged by an admin, so, whenever I merge Item B to Item A, I also move all the reviews of B to A. I do it this way: ReviewedItem.objects.filter(gear = slave).update(objec

Re: Request.Method Query !

2012-06-10 Thread vinod kumar
Dear Timothy Makobu, Thanks for your explanation. I got the part which you explained. My doubt is : on the browser we just give the url and the respective functions will be called on back end and output is returned out. If I want to GET the details of some nodes, I will just give the url as (let

Re: How to access HttpRequest from urls.py in Django? or better way.

2012-06-10 Thread Jinxing Ding
Sorry! I using request.GET['category'] 在 Jun 10, 2012,9:19 PM, Daniel Roseman 写道: > On Sunday, 10 June 2012 05:21:08 UTC+1, losingle wrote: > > news_info_dict should be > news_info_dict = { > 'queryset':News.published.filter(category= > request.category).all(), > 'date_field': 'pub_d

Re: Request.Method Query !

2012-06-10 Thread Timothy Makobu
If im understanding your question correctly ... Django determines the request method itself and populates a dict with the method name in the request object. So if you want to handle data submitted via HTTP POST, request.POST will contain the data. For example: def data_handler(request): if req

Re: How to access HttpRequest from urls.py in Django? or better way.

2012-06-10 Thread Daniel Roseman
On Sunday, 10 June 2012 05:21:08 UTC+1, losingle wrote: > > > news_info_dict should be > news_info_dict = { > 'queryset':News.published.filter(category= > request.category).all(), > 'date_field': 'pub_date', > } > > I couldn't find a way to access the HttpRequest (request) object > t

Re: Using the django.contrib.auth User in my model - database error

2012-06-10 Thread xTalisman
I just used an sqlite3 and sqlitemanager which is a sqlite front-end , I am guessing it should not be too difficult to drop all tables with a script too. On Sunday, June 10, 2012 12:48:46 PM UTC+3, liuxi...@live.cn wrote: > > how to drop all the database tables? > > On 6月4日, 下午5时36分, bruno des

Re: Using the django.contrib.auth User in my model - database error

2012-06-10 Thread liuxian...@live.cn
how to drop all the database tables? On 6月4日, 下午5时36分, bruno desthuilliers wrote: > On Jun 4, 11:01 am, xTalisman wrote: > > > Solved : > > I dropped all the database tables (including the contib.auth ones) and ran > > syncdb, suddenly everything was fine. odd , but is working now . > > Well, ni

database error no such column

2012-06-10 Thread liuxian...@live.cn
when I've got my model.py like below: from django.db import models from django.core.files import File import datetime from django.utils import timezone class Video(models.Model): title = models.CharField(max_length = 200) pub_date = models.DateTimeField('date published') video = model

Request.Method Query !

2012-06-10 Thread vinod kumar
Hey All, I have a small doubt. I can see in views that I can check the request.method and accordingly write my code to perform the operation for get/put/.. respectively. And in urls.py, the url reg. expression is assigned to concerned functions. But how do u give the request method i.e.get or put

How to access HttpRequest from urls.py in Django? or better way.

2012-06-10 Thread losingle
I need access HttpRequest from urls.py news_info_dict = { 'queryset': News.published.all(), 'date_field': 'pub_date', } news_info_month_dict = { 'queryset': News.published.all(), 'date_field': 'pub_date', 'month_format': '%m', } urlpatterns = patterns('django.views.gen