Hi all,
I do not find any help page on migrating existing function based views
(defined in views.py of django app) to class based views in django.1.3
pointers and help appreciated.
regards,
KM
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
Hi guys,
I have a legacy Django project to maintain, and now my job is to port some part
of the admin view from MySQL backend to MongoDB.
AFAIK the mongodb as Model backend for django isn't exactly mature
yet, I am thinking of writing customized admin views while using
PyMongo as mongodb driver.
In your settings file
http://docs.djangoproject.com/en/dev/topics/settings/
On Thu, May 12, 2011 at 10:20 AM, pankaj sharma
wrote:
> hello friends, i want to use haystack for my website,
> but i am having too many problems to install it.
> in the dowumentation it is telling to add haystack to ur
I am using built-in Django admin. In my models.py file password field
is defined:
password = models.CharField(max_length=64)
I just can`t see password type field for models.
On 11 Maj, 20:26, Shawn Milochik wrote:
> It sounds like you're not using the built-in Django admin, which would
> m
hello friends, i want to use haystack for my website,
but i am having too many problems to install it.
in the dowumentation it is telling to add haystack to ur installed
apps. now it it telling to do "HAYSTACK_SITECONF =
'myproject.search_sites'"
now where should i type this i dont have any idea ab
Hi all,
I need to override error messages (like for required fields) directly in
Models, I don't wanna duplicate code declaring some fields again in forms,
and in some cases I don't even create the forms, just using generic views
for model...
I was looking for a solution to change the default erro
Ramiro Morales:
Yep! Wowza! That did it. Thank you very much! Moving forward again!
Pax!
BobG
On May 11, 8:24 pm, Ramiro Morales wrote:
> On Wed, May 11, 2011 at 8:39 PM, BobG wrote:
> > I'm stuck on something that seems pretty
> > simple: "Customize the admin look and feel." I am unable to c
I had try it , but it did't work .
return render_to_response('account/login.html')
these code is invoke when the http post method is 'get'
but my problem is 'POST'
I add django.contrib.csrf.middleware.CsrfResponseMiddleware to my settings
and it can work
but I think this is not the best solution
2
On Wed, May 11, 2011 at 8:39 PM, BobG wrote:
> I'm stuck on something that seems pretty
> simple: "Customize the admin look and feel." I am unable to change
> "Django administration" at the top of the page.
>
> Here is the questionable line of code in settings.py:
> TEMPLATE_DIRS = ("/home/bob/Dja
Django users:
It is time to ask for help. I'm a newbie working the tutorial. I'm
using Linux Mint, Python 2.6, and Django 1.3. So far, everything has
been working smoothly, but I'm stuck on something that seems pretty
simple: "Customize the admin look and feel." I am unable to change
"Django admin
Hello,
I'm trying to use a custom javascript file in the admin app with Media:
class MyAdmin(admin.ModelAdmin):
class Media:
js = ('js/my.js',)
the problem is that after installing the staticfiles app (in
INSTALLED_APPS) and after setting STATIC_URL = '/media/', the admin
app is un
solved this by moving it to the model clean() method, and using
imagefield.file.open() and imagefield.file.read() to get the data for
computing the other fields.
On Wed, May 11, 2011 at 1:28 PM, Brian Craft wrote:
> I have a model with an imagefield, and some fields that are computed
> from the i
On 05/11/2011 05:26 PM, Nan wrote:
Yeah, I'm aware of the distinction between the types -- just wasn't
paying enough attention when I added the default and the filter, and
had to back up and take a second look when the filter started throwing
exceptions. So basically it's a weird artifact of how
Yeah, I'm aware of the distinction between the types -- just wasn't
paying enough attention when I added the default and the filter, and
had to back up and take a second look when the filter started throwing
exceptions. So basically it's a weird artifact of how defaults are
handled by the ORM?
On
> Me again. Still helping clients TDD despite obese databases.
[localhost] run: python manage.py test --settings=test_settings my_app
--verbosity=0
--
Ran 2 tests in 0.018s
OK
Eat my vapor trail, b-words! Here's how I did it:
U
Thanks !!!
Now it works great!
On 10 Mag, 00:29, Ulrich Petri wrote:
> > message = "Comment was was added to '%s' by '%s': \n\n%s" % (self.post,
> > self.author, self.body)
>
> Most likely your users are posting utf-8 data which you are trying to insert
> into a byte string .
>
> To fix this c
I have a model with an imagefield, and some fields that are computed
from the image. I'm trying to override the "save" method to fill in
the other fields.
When I test this in the admin, there are two problems: first, the path
(mymodel.image.path) doesn't honor the upload_to setting on the field.
I
I'm trying to understand the best way to redirect a user to their
profile once they successfully login to the application.
I'm using django-profiles to manage a custom user profile. By default,
the redirect url is specified in settings.py as LOGIN_REDIRECT_URL.
However, the url entry in the django
I got a model using django-taggit. It works great when I add tags in
the admin, but when the tags are added in code ( they're read from the
EXIF-data in a photo, the keywords part ) - nothing is shown in the
admin change form tag-field for the model. I can see the values are
stored correctly when I
BTW you can find some example views and how to use them in the tests!
Iván
On Wed, May 11, 2011 at 3:50 PM, DK wrote:
> Fantastic piece of work. I will try to dive into.
> DK
>
> On May 11, 8:02 pm, Iván Raskovsky wrote:
>> On Wed, May 11, 2011 at 1:29 PM, DK wrote:
>> > What is a proper wa
On 05/11/2011 03:01 PM, Nan wrote:
Using Django 1.2.3, I recently declared a DecimalField on a model, and
it happily accepts a float as its default value, but it won't filter
on a float (it throws a TypeError instead). Is there a reason for
this inconsistency?
DecimalField subclasses Field, w
Using Django 1.2.3, I recently declared a DecimalField on a model, and
it happily accepts a float as its default value, but it won't filter
on a float (it throws a TypeError instead). Is there a reason for
this inconsistency?
--
You received this message because you are subscribed to the Google
Fantastic piece of work. I will try to dive into.
DK
On May 11, 8:02 pm, Iván Raskovsky wrote:
> On Wed, May 11, 2011 at 1:29 PM, DK wrote:
> > What is a proper way to handle formsets with new class based views?
> > Should I use standard forms views like CreateView, I did not saw any
> > views d
It sounds like you're not using the built-in Django admin, which would
make your life easier.
Assuming you want to do it the hard way, you can just use a
PasswordInput widget.
http://docs.djangoproject.com/en/1.3/ref/forms/widgets/
--
You received this message because you are subscribed to t
Hi all,
this is my first post on this group so be gentle ;)
I`ve crated a model class and an admin site. My model Users has
password field. How can I rewrite it to be a password field and to get
stars when I`am typing password (when creating a new user by admin
site)?
Sorry for my English but it
On Wed, May 11, 2011 at 1:29 PM, DK wrote:
> What is a proper way to handle formsets with new class based views?
> Should I use standard forms views like CreateView, I did not saw any
> views dedicated to handle formsets.
Hi DK. I've faced the same issue some weeks ago, and I decided to make
my o
What is a proper way to handle formsets with new class based views?
Should I use standard forms views like CreateView, I did not saw any
views dedicated to handle formsets.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
Hi!
In a tabular inline, i want that the added items can't be changed or
deleted. I'm ok with the `can_delete` option, but setting
`readonly_fields` will also turn the form entry at the bottom to be
readonly too. There's another problem with some more fields that I
need to display in this form, li
Djangoists:
Me again. Still helping clients TDD despite obese databases.
Right now the test suite takes a minute to build a database with >20
models (and lots of fields in each one), then load a mere 7,000
records. Yes I will cut down on the records, but building the
database, in sqlite3 :memory:
I want to show tags used in a model in my admin.py file, to be able to
sort by tag etc. but it crashes with "Caught AttributeError while
rendering: 'TaggableManager' object has no attribute 'flatchoices'" if
I add 'tags' to list_filter in my ModelAdmin.
How can I use django-taggit in the admin rel
On Wed, May 11, 2011 at 1:14 AM, Colin Corbett wrote:
> Thanks! Solved:
>
> In models.py:
>
> class OurProducts(models.Model):
> code = models.CharField(max_length=60)
> name = models.CharField(max_length=80)
> price = models.DecimalField (max_digits=8, decimal_places=2)
>
> def combined_pric
On 05/11/2011 09:57 AM, Venkatraman S wrote:
My response is more along the lines of performance gain - why not use
asynchronous logging? I havent used logging extensively, but is the
default logging scheme in scheme synchronous?
-V
This was already answered by a couple of people yesterday
On Tue, May 10, 2011 at 11:42 PM, Shawn Milochik wrote:
>
> Assuming performance won't be a major concern, I'd like to decorate all my
> views automatically. My first thought was middleware, but since it handles
> requests and responses, I don't think it's the right layer. Does anyone know
> the
On Wed, May 11, 2011 at 3:24 PM, Daniel Roseman wrote:
> On Wednesday, May 11, 2011 2:17:07 PM UTC+1, Marc Aymerich wrote:
>>
>> Hi,
>> I want to do a form that displays a list of elements that can be selected
>> with a checkbox and then submit the selected elements, but I haven't found
>> any cod
On Wednesday, May 11, 2011 2:17:07 PM UTC+1, Marc Aymerich wrote:
>
> Hi,
> I want to do a form that displays a list of elements that can be selected
> with a checkbox and then submit the selected elements, but I haven't found
> any code sample for this. I'll apreciate if someone can give me a l
Hi,
I want to do a form that displays a list of elements that can be selected
with a checkbox and then submit the selected elements, but I haven't found
any code sample for this. I'll apreciate if someone can give me a link to an
example or any advice on this!
Many thanks!
--
Marc
--
You receiv
You can run your tests with their own --settings parameter with the specific
variations you want to test under.
On May 10, 2011 5:21 PM, "Brian Craft" wrote:
I would like unit tests that do file manipulations to run with a
different storage "location", so they're not manipulating real app
files.
On 11/05/2011 11:47, Henrik Genssen wrote:
> you should try week_day instead
> http://docs.djangoproject.com/en/dev/ref/models/querysets/#week-day
>
> regards
> Henrik
Henrik,
thanks, it works. I don't know how I missed that.
Regards,
Benedict
--
You received this message because you are sub
you should try week_day instead
http://docs.djangoproject.com/en/dev/ref/models/querysets/#week-day
regards
Henrik
>reply to message:
>date: 11.05.2011 11:38:40
>from: "Benedict Verheyen"
>to: django-users@googlegroups.com
>subject: [] Filtering on weekday
>
>Hi,
>
>
>I've developed a calltracki
Hi all,
If you plan to attend, you could save quite a bit on registration fees!
The end of Early bird is on May 12th, Friday, 23:59:59 CEST. We'd like
to ask to you to forward this post to anyone that you feel may be
interested.
We have an amazing lineup of tutorials, events and talks. We have s
Hi,
I've developed a calltracking app and I would want to know how many calls we
have
on Monday, Tuesday and so on.
I would like to filter on weekdays as specified in the date module as
date.weekday()
Is there an easy way to do this?
I've tried this:
c=Call.objects.filter(date_created__day=3)
On Wed, May 11, 2011 at 10:21 AM, Daniel Roseman wrote:
> On Wednesday, May 11, 2011 7:50:16 AM UTC+1, Brian wrote:
>>
>> Sure - it's just that bit more convenient and readable to use the ORM
>> approach. If I get the chance, I must try substituting direct calls to
>> psycopg and see if that makes
Hello,
My DEF is not displaying on the Admin Form.
models.py =
class OurProducts(models.Model):
code = models.CharField(max_length=60)
price = models.DecimalField (max_digits=8, decimal_places=2)
def combined_price(self):
from decimal import Decimal
return round(self.price * Decim
On Wednesday, May 11, 2011 7:50:16 AM UTC+1, Brian wrote:
>
> Sure - it's just that bit more convenient and readable to use the ORM
> approach. If I get the chance, I must try substituting direct calls to
> psycopg and see if that makes it significantly faster again. I'd guess
> there's maybe an
Thanks! Solved:
In models.py:
class OurProducts(models.Model):
code = models.CharField(max_length=60)
name = models.CharField(max_length=80)
price = models.DecimalField (max_digits=8, decimal_places=2)
def combined_price(self):
from decimal import Decimal
return round(self.price
45 matches
Mail list logo