i need to pass " & " as query e.g q=larsen & turbo
urlencode does not works as finally its as good as without it for
above eg.
please suggest.
--
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@goog
i have to do basic text manipulations at times .. which is a better
way.. to do so in template or return a result only after doing so from
views ??
--
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
which one is faster or considered better in terms of performance ?
--
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+un
i have installed django 1.4 previously and want to install django-
norel now.. should i unisntall django 1.4 first .. is it necessary
--
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.
hi
i defined three models and put them in /appname/models/ a.py, b.py,
c.py. and a __init__.py in which i import all classes defined inside
a.py/b.py/c.py.
when i try to do a ./manage.py sqll appname at prompt , it simply
passes of without any output.
what could be possibly done to debug it .. i
can we write one app inside some another django-app .
please suggest any reference or articles
--
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, se
hi
is there any way to limit the number of instances that can be attached
to a m2m field.
e.g
author = models.manytomany(Book)
i want to limit the max number of book objects that can be attached to
author.
How to go about this.
--
You received this message because you are subscribed to the Googl
hi
how can i have this:
client_groups = models.ForeignKey(User, to_field="groups")
it din worked
--
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,
ave very limited experience customizing the Admin application and
> have only used this method through a normal Form.
>
>
>
>
>
>
>
> On Thu, Jun 7, 2012 at 7:56 AM, vijay shanker wrote:
> > hi
> > is there any way to limit the number of instances that can be a
hi
i have this model Client_Order
i want to do some manipulation each time a new pakg is added to this
field.
i used m2m_changed signal, but it cant distinguish between existing
instances attached and the newly added ones.
both post_add and pre_add show the same number of instances .. i.e if
a.b w
hi
i am trying to do this:
class PakageInfoForm(BaseInlineFormSet):
class Meta:
model = PakageInfo
exclude = ['client_sda',]
this doesn works ..
how to exclude any field from BaseInlineFormSet ..
--
You received this message because you are subscribed to the Google Groups
"Dj
hi
i want to know pros and cons associated with running raw sql queries
over django's ORM .
googled it out but couldn find many useful links.
--
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@googl
hi
i tried overriding change_form to add a extra button along side history
button in django admin section.. on local machine it works fine but on
server it gives me this error.
I have no clear idea what went wrong and how to fix it .
Environment:
Request Method: GET
Request URL: http://108.16
hi
i have this model called charity
___
from django.db import models
from settings import DEFAULT_CHARITY_NAME as deafult_charity_name
class GetDefaultInstance(models.Manager):
def get_default_instance(self):
return
super(Charity,self).get_quer
Hi
I have two models, a Customer model and a WishListItem model (which stores
products). I have option of either having a ManyToManyField in Customer to
WishListItem, or I can have a customer ForeignKey to customer for each
WishListItem.
Which one will be more efficient ?
Thanks
--
You recei
Hi
I have these two models Cart and CartItem,
class Cart(models.Model):
cart_id = models.CharField(max_length=50, null=False)
customer= models.ForeignKey(Customer,null=True,blank=True)
cartitems = models.ManyToManyField(CartItem,null=True)
applied_
Hi
I have these two models Cart and CartItem,
class Cart(models.Model):
cart_id = models.CharField(max_length=
50, null=False)
customer= models.ForeignKey(Customer,null=True,blank=True)
cartitems = models.ManyToManyField(CartItem,null=True)
applied
er*the
relation is cleared.
m2m_changed calls the handle_something function with different
kwargs['action'] value which can help you differentiate between them.
On Friday, June 8, 2012 7:24:34 PM UTC+5:30, vijay shanker wrote:
>
> hi
> i have this model Client_Order
&
Hi
I am using django version 1.4.3
I am using two signals in my models.py
one is m2m_changed, so i can have a counter field (numcounter) of number of
m2m fields attached, and another is post_save so i can decide whether to
have a OneToOneField (cartrule, is to be applied only if there are more
t
Hi
I am using django version 1.4.3
I am using two signals in my models.py
one is m2m_changed, so i can have a counter field (numcounter) of number of
m2m fields attached, and another is post_save so i can decide whether to
have a OneToOneField (cartrule, is to be applied only if there are more
t
Thanks Evans.That was helpful. :)
On Thursday, February 7, 2013 7:54:36 PM UTC+5:30, Tom Evans wrote:
>
> On Thu, Feb 7, 2013 at 1:54 PM, vijay shanker
> >
> wrote:
> > Hi
> > I am using django version 1.4.3
> > I am using two signals in my models.py
> &
further, i tried putting a sender argument in receiver, but the sender , i
found (by set_trace) is Cart_cartitems, how can i import this when its only a intermediary model
that django's creating.
On Friday, February 8, 2013 11:26:47 AM UTC+5:30, vijay shanker wrote:
>
> Thanks Eva
do u have the pdf ?
will u share it at some place (or please mail it to me deont...@gmail.com)
On Thursday, February 7, 2013 11:40:01 PM UTC+5:30, Mayukh Mukherjee wrote:
>
> I'd recommend two scoops of django.
> It's a little more intermediate level but it's a gem.
>
> Sent from my iPhone
>
> On
write a custom manager and use it whenever you want to do use other
database:
https://docs.djangoproject.com/en/1.3/topics/db/multi-db/#using-get-query-set-with-multiple-databases
On Thursday, February 7, 2013 7:08:40 PM UTC+5:30, girishms wrote:
>
> Hi All,
> Is it possible to set db connectio
handled the case there itself
thanks tran.
:)
On Thursday, February 7, 2013 2:33:46 PM UTC+5:30, Huu Da Tran wrote:
>
> You could overwrite the save() method... or if you are populating from a
> form, overwrite the clean() method.
>
> On Thursday, February 7, 2013 3:23:54 AM UTC-5
yes that was it. thanks a ton. ;)
On Friday, February 8, 2013 5:21:19 PM UTC+5:30, Martin J. Laubach wrote:
>
> further, i tried putting a sender argument in receiver, but the sender , i
>> found (by set_trace) is Cart_cartitems, how can i import this > 'shoppingcart.models.Cart_cartitems'> when
we can delete all obsolete ContentType entries manually.
>>>for each in ContentType.objects.filter(app_label=appname): each.delete()
thanks
On Friday, May 4, 2007 8:42:51 PM UTC+5:30, Jens Diemer wrote:
>
>
> I have delete some app models. So, in the internal django tables
> "django_content_type
Hi
I have a model called Place, which is like this:
class Place(models.Model):
state = models.CharField(max_lengh=50, choices=STATE_CHOICES)
city = models.Charfield(max_length=50)
I want to populate select choices for repective city for state in admin,
when the user selects t
hi
i wrote a function for producing tuples of all model names, which is this:
from django.contrib.contenttypes.models import ContentType
from django.db.models.loading import get_model
def get_all_models():
return tuple([(each.__module__+'.'+each.__name__,each.__name__) for
each in [each.mode
pening.
On Monday, February 11, 2013 4:29:44 PM UTC+5:30, vijay shanker wrote:
>
> hi
> i wrote a function for producing tuples of all model names, which is this:
> from django.contrib.contenttypes.models import ContentType
> from django.db.models.loading import get_model
>
>
Hi
I have few models in a app called shoppingcart.
I can find contenttypes associated with this model with this:
>>>ct = ContentType.objects.filter(app_label='shoppingcart')
>>>ct
[, , ,
]
but when i try ct[0].model_class() it returns the model class on shell but
gives me a NoneType when i try
yes u right .. my bad
On Friday, February 8, 2013 6:28:20 PM UTC+5:30, Tom Evans wrote:
>
> On Fri, Feb 8, 2013 at 10:13 AM, vijay shanker
> >
> wrote:
> > do u have the pdf ?
> > will u share it at some place (or please mail it to me
> > deon...@gmail.com)
d you a free copy. Drop us a note at and
>>> we'll get it to you within 72 hours.
>>>
>> Best regards,
>>
>> W.
>>
>> Dne pátek, 8. února 2013 11:13:11 UTC+1 vijay shanker napsal(a):
>>>
>>> do u have the pdf ?
>>>
hey siddhartha i have similar problem, i created dynamic option with ajax
calls and getting the same error
"select a valid choice. xyz is not available choices , how did you solved
it?"
On Tuesday, December 11, 2012 5:09:48 PM UTC+5:30, siddharth56660 wrote:
>
> Hi,
>
> I am facing problem in h
hey all
I have a model which is as such:
*in models.py*
class ConditionSet(models.Model):
model_name =models.CharField(max_length=50)
model_attribute =models.CharField(max_length=50)
operator =models.CharField(max_length=50,
choices=OPERATORS)
val
hey all
I have a model which is as such:
*in models.py*
class ConditionSet(models.Model):
model_name =models.CharField(max_length=
50)
model_attribute =models.CharField(max_length=50)
operator =models.CharField(max_length=50,
choices=OPERATORS)
val
super(ConditionSetAdminForm,self).clean()
if 'model_attribute' in self._errors:
self.cleaned_data['model_attribute'] =
self.data['model_attribute']
del self._errors['model_attribute']
return self.cleaned_data
jus
code is getting executed when Django validates it's models. Hence,
Cartprobably has not been validated yet and it's model class is
None.
On Monday, February 11, 2013 4:29:44 PM UTC+5:30, vijay shanker wrote:
>
> hi
> i wrote a function for producing tuples of all model n
hey, i want to write a shopping cart app, please provide some inputs,
useful information, suggestions etc for doing it right .
thanks
--
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
hi
i have a django form like this:
class AddArtistForm(forms.Form):
fname = forms.CharField()
lname = forms.CharField()
profession = forms.CharField()
dob = forms.DateField()
i want to display errors as this
{% for field in form %}
{{field}}
# error associated with ab
On Sunday, April 21, 2013 10:58:47 PM UTC+5:30, vijay shanker wrote:
>
> hi
>
> i have a django form like this:
>
> class AddArtistForm(forms.Form):
> fname = forms.CharField()
> lname = forms.CharField()
> profession = forms.CharField()
> dob = f
yess that does it.
thanks
On Sun, Apr 21, 2013 at 11:57 PM, vijay shanker wrote:
>
>
> On Sunday, April 21, 2013 10:58:47 PM UTC+5:30, vijay shanker wrote:
>>
>> hi
>>
>> i have a django form like this:
>>
>> class AddArtistForm(forms.Form):
You are looking for "break"
On Wednesday, June 26, 2013 8:39:58 PM UTC+5:30, Harjot Mann wrote:
>
> What are the methods to break forloop?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emai
}} Logout
{% else %}
Login
Signup
{% endif %}
*the problem i am facing are:*
*
*
*1. when the user signs up, password stored are not encrypted, ( though i
am overriding save() to do so above)*
*2. though i provide correct password, request.user.is_authenticated doe
On Thursday, July 4, 2013 11:30:06 PM UTC+5:30, vijay shanker wrote:
>
> *Hi*
> *I am using django 1.5 and created my own user model by AUTH_USER_MODEL=
> 'account.User' in settings.*
>
> *my user model is like this:*
>
> from django.db import models
> f
Hey all
I am trying to make a simple ajax call to show items retrieved from
database.
I am displaying bunch of fields like a text input for keyword and radio
button for filter in a form like this:
{% csrf_token %}
Search
am writing a e-commerce application where different people can have stores
with urls like this: www.store-one.saas.com, www.store-two.saas.com, and so
on.
These domains have to be generated automatically when a user signs up for
store.
I have read somewhere that www.saas.com/store-one can be
Hi i used formsets in generic FormView like this:
class RequestRecommendationView(FormView):
template_name = "account/stepfour.html"
form_class = formset_factory(StepFourForm)
def form_valid(self,form):
print form.is_valid()
cleaned_data = form.cleaned_data
# r
Hi
I am trying to insert images in between of text (basically an article with
images interspersed in between) with django's TextField so that i can add
and position the image in the TextField box in admin.I tried tinymce's
tinymce_models.HTMLField() for body field of my Article model but it did
; http://goromlagche.in/
>
>
> On Mon, Dec 23, 2013 at 3:11 PM, vijay shanker wrote:
>
>> Hi
>> I am trying to insert images in between of text (basically an article
>> with images interspersed in between) with django's TextField so that i can
>>
Hi
I was pondering over using livefyre's comment on my site (to have something
similar to disqus). I am inquisitive about how it fared for people who had
already used it, i.e can i get total comments count, can i collect user
information of people who use it to comment upon, what are the pros a
I have to code this scenario:
Some user comes to fill a form and while user is at it, session expires;
User tries to submit form, as session has expired it will take him to login
page after which he is rediredted to form page with a prefilled form with
data he filled previously.
my propsed s
52 matches
Mail list logo