Hi Amit,
2009/12/9 Amit Sethi
> Hi all , I need some help understanding the mod rewrite module of apache .
> What I wished to do want that i had a comments folder by the name of
> /comments/ . Now i run a django project on /sees and i want all the call to
> /comments/
You can just replace the regex ^/comments/$ with ^/sees/comments/$ within
the urls.py
Why can't you do that?
On Wed, Dec 9, 2009 at 12:10 PM, Amit Sethi wrote:
> Hi all , I need some help understanding the mod rewrite module of apache .
> What I wished to do want that
Hello,
I'm just curious if anyone else has run into this problem using the
twitter app in django-syncr. I looked on the twitter API docs but
didn't find anything.
t.syncTwitterUserTweets('twitteruser')
Traceback (most recent call last):
File "", line 1, in
File
Hi all , I need some help understanding the mod rewrite module of apache .
What I wished to do want that i had a comments folder by the name of
/comments/ . Now i run a django project on /sees and i want all the call to
/comments/ be redirected to /sees/comments and than be handled by the wsgi
On Tue, Dec 8, 2009 at 11:13 PM, saved...@gmail.com wrote:
> Every time I try to access a formset via inlineformset_factory I get
> the following error messages:
>
> Traceback:
> [snip]
> File "/home/luckybs/webapps/django1/lib/python2.5/django/forms/
> models.py" in
On Tue, Dec 8, 2009 at 4:42 PM, Lukas wrote:
> Hi everyone,
>
> i've a problem viewing uploaded files via the admin interface. When I
> try to view the file, everything I get is a ValueError exception:
> invalid literal for int() with base 10...
> I know it goes wrong,
On Tue, Dec 8, 2009 at 1:21 PM, germ wrote:
> > The point is that utf8 can use up to 3 bytes per character...
>
> i appreciate your reply. interesting distinction between bytes and
> chars. i think i still need some more guidance. still not sure how to
> resolve with
Hi, Manu,
Thanks for writing. I tried what you suggested, and the forms were
displayed exactly as I wanted.
However, when I tried to submit the form, it triggered validation errors
for all the fields that were
left blank.
So, the behavior is not quite what I want.
I'm guessing that setting the
heya,
I should probably add an example - we want to add a Title field to the
user form. Ideally, this would appear seamlessly as part of the User
form, next to the name fields, rather than it's own separate sub-
section below. What would be a Django-esque way of achieving that?
Cheers,
Victor
At what point in a modelform's lifecycle does the underlying object
become accessible? Specifically, can I access the underlying object in
a modelform's "clean" method? Or is it only after one does form.save
() with or without commit = False?
I basically need to do some custom validation and
On Sun, Dec 6, 2009 at 9:04 PM, GoSantoni wrote:
> Hi all,
> What does this mean? It doesn't make sense doesn't it? Line 25 isn't
> referring to the PIL...
> Thanks
>
>
I've seen that before. Whatever calculates the line number in the template
isn't getting it right. In
On Fri, Dec 4, 2009 at 6:16 AM, Peter wrote:
> Hi,
>
> I've installed django on an XP box and am trying to work through the
> tutorial.
>
> I got django from svn using the url from the django site:
>
> http://code.djangoproject.com/svn/django/trunk
>
> All is well until I
On Fri, Dec 4, 2009 at 6:04 AM, Andreas Kuntzagk <
andreas.kuntz...@mdc-berlin.de> wrote:
> Hi,
>
> have a (probably simple) problem using ModelForms. I'm following this
> guide:
> http://docs.djangoproject.com/en/1.0/topics/forms/modelforms/
>
> Here are my models:
>
> class Run(models.Model):
>
heya,
Well, now that was a bit silly of me.
I just noticed that I was importing with "from
django.contrib.auth.admin import UserAdmin", but then I was calling
"admin.UserAdmin" below, rather than "UserAdmin". I've fixed that now,
and the "People" app is now appearing in the admin interface. I'm
Every time I try to access a formset via inlineformset_factory I get
the following error messages:
Traceback:
File "/home/luckybs/webapps/django1/lib/python2.5/django/core/handlers/
base.py" in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File
heya,
I'm having issues extending Django's user model via UserProfile, and
then editing this through the admin interface. Essentially, what I
want is to add some extra fields to the User model (I've called this
model "Person"), and be able to edit these along with the normal User
attributes
On Wed, Dec 9, 2009 at 8:28 AM, Phlip wrote:
> Djangoids:
>
> Does the data fixture support automatically generated primary keys?
>
> We need to add a tiny stretch of new data to an existing website. A
> fixture, such as new_data.json, would work great for both the new data
>
Djangoids:
Does the data fixture support automatically generated primary keys?
We need to add a tiny stretch of new data to an existing website. A
fixture, such as new_data.json, would work great for both the new data
and for their new feature's unit tests. Then we would just run
loaddata on the
Whoops, didn't actually try that as I'm not at my normal pc, I just
remembered reading it somewhere.
Thinking about it now, you can actually just do:
{{ my_list|last }}
Pete
On Dec 7, 8:35 pm, Gaffar Overcomes wrote:
> hey pete this does not work :S
> negative index
On Wed, Dec 9, 2009 at 5:07 AM, spool wrote:
> Hi I've got the same problem.
>
> Here's what I'd like to do: I'm trying to create a generic
> "time_series" app, which has models which are inherited by other apps
> but are not functional by themselves. I would like to create
Starting to experience this error on our development server as well.
I'm beginning to think its some conflict in Django itself.
We even started getting other `FieldError`s like:
" FieldError: Cannot resolve keyword 'username' into field. Choices
are: id, username "
Any input would be
On Tue, Dec 8, 2009 at 12:58, Itay Donenhirsch wrote:
> one to many from year to user is same as many to one from a
> user to a year.
>
Yes, but how? :D I can't place a FK on the User...
--
You received this message because you are subscribed to the Google Groups
"Django
Hi everyone,
i've a problem viewing uploaded files via the admin interface. When I
try to view the file, everything I get is a ValueError exception:
invalid literal for int() with base 10...
I know it goes wrong, when your MEDIA_URL is not set correctly.
The link to the file in the admin
Hi I've got the same problem.
Here's what I'd like to do: I'm trying to create a generic
"time_series" app, which has models which are inherited by other apps
but are not functional by themselves. I would like to create test
models in tests.py, and then run unittests on them.
from django.test
I have this structure:
class Album(models.Model):
caption = models.CharField(max_length=500)
def get_album_type(self):
if self.a_set.count() > 0: return 'a'
if self.b_set.count() > 0: return 'b'
def _get_a(self):
return self.a_set.all()[0]
def _get_b(self):
Hi
Does anyone know if its possible to filter a queryset by the count of
it's foreignkey or manytomany set?
For example:
class Y(models.Model):
name = models.CharField(...)
class X(models.Model):
name = models.CharField(...)
y_rec = models.ManyToManyField(Y)
class Z(models.Model):
x =
Excellent thank you.
So the solution is:
from django.db.models import F
X.objects.filter(id = F('new_id'))
Thanks for the help guys.
On 8 Gru, 19:38, Boris Schäling wrote:
> > -Original Message-
> > From: django-users+ow...@googlegroups.com [mailto:django-
> >
> -Original Message-
> From: django-users+ow...@googlegroups.com [mailto:django-
> users+ow...@googlegroups.com] On Behalf Of pbzRPA
> Sent: Tuesday, December 08, 2009 7:19 PM
> To: Django users
> Subject: Filtering queryset using two fields in one model
>
> Hi,
>
> I am not sure if
Assuming you're using Django 1.1, take a look at:
http://docs.djangoproject.com/en/1.1/topics/db/queries/#filters-can-reference-fields-on-the-model
On Dec 8, 2009, at 10:18 AM, pbzRPA wrote:
> Hi,
>
> I am not sure if this is a really stupid question but how can you
> filter a model by
> The point is that utf8 can use up to 3 bytes per character...
i appreciate your reply. interesting distinction between bytes and
chars. i think i still need some more guidance. still not sure how to
resolve with your suggestion to consdier the character set.
i am able to create the django
Hi,
I am not sure if this is a really stupid question but how can you
filter a model by comparing two of it's own fields?
for example:
class X(models.Model):
id = models.IntegerField()
new_id = models.IntegerField()
now I want to say X.objects.filter(id = new_id)
Thanks
--
You received
Am Dienstag, den 08.12.2009, 08:54 -0800 schrieb Jenn Hughes:
> I'm not sure what you mean by box.
»box« in this case means computer or system.
Thanks,
Paul
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
On Dec 8, 2009, at 11:38 AM, Jenn Hughes wrote:
> I checked and no proxy is in place. I tried the other IPs, two
> wouldn't let me assign it and the third went through but gave me the
> same error that I began with. How odd.
>
I suspect there may be some other tiny but very important problem
OK, let's do a little Networking 101.
127.0.0.1 is an unroutable address (that means you'll never see it on
the Internet) that *always* means the local host; in fact it's called
'localhost' in your 'hosts' file. For Linux this is /etc/hosts, for
Windows it's in
Maybe you could just make another url that wasn't password protected.
If the token doesn't get used up in your plan, you have roughly the
same security (not much).
def rss_view(request):
askdmalkdmakds
protected_rss_view = login_required(rss_view)
Hope that helps,
Alex
On Dec 7, 8:57 am,
I'm not sure what you mean by box.
Jenn
On Dec 8, 11:26 am, Tom Evans wrote:
> On Tue, Dec 8, 2009 at 4:18 PM, Jenn Hughes wrote:
> > I gave this a try and I got this error:
> > [jjhug...@silo cms]$ python manage.py runserver 156.56.137.131:8000
> >
I checked and no proxy is in place. I tried the other IPs, two
wouldn't let me assign it and the third went through but gave me the
same error that I began with. How odd.
On Dec 8, 11:24 am, Shawn Milochik wrote:
> I don't think they can prevent you from using it locally.
Just wondeful
Thank you
gaddoz
On 8 Dic, 15:04, Xia Kai(夏恺) wrote:
> Hi~
>
> you can customize your admin interface by overriding default admin functions
> in django/contrib/admin/options.py
>
> These links might be helpful to you:
>
>
On Tue, Dec 8, 2009 at 4:18 PM, Jenn Hughes wrote:
> I gave this a try and I got this error:
> [jjhug...@silo cms]$ python manage.py runserver 156.56.137.131:8000
> Validating models...
> 0 errors found
>
> Django version 1.1.1, using settings 'cms.settings'
> Development server
I don't think they can prevent you from using it locally. The fact that I can
ping the IP address you provided means that it's publicly available. This
either means that your machine has its own direct connection to the Internet,
or ipconfig returned multiple addresses, including the address of
I gave this a try and I got this error:
[jjhug...@silo cms]$ python manage.py runserver 156.56.137.131:8000
Validating models...
0 errors found
Django version 1.1.1, using settings 'cms.settings'
Development server is running at http://156.56.137.131:8000/
Quit the server with CONTROL-C.
Error:
Hi Daniel,
thanks for your reply - yes indeed it was the server restart.
I found it out a while after writing this post, but I still don' know
why a apache restart is needed?
Maybe somebody can give me a short explain
thx a lot ;)
Daniel Roseman schrieb:
> On Dec 8, 1:54 pm, Benjamin Wolf
Sorry, I should have said 'ipconfig' instead of 'ifconfig' if you're running on
Windows, and you mentioned IE so I guess you are. Unless you're running your
Django server on one machine and trying to access it from another, which would
definitely cause the exact problem you're seeing, but
If you run 'ifconfig' on the command line, you will get your IP address. Let's
pretend that your IP address is 192.168.1.105. Try this:
python manage.py runserver 192.168.1.105:8000
See if you can visit http://192.168.1.105:8000 instead.
I don't know what the problem is, but maybe it's
Error on IE:
Internet Explorer cannot display the webpage
Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.
Error on Firefox:
Failed to Connect
Firefox can't establish a connection to the server at
We'll need some more information. What error messages are you getting, if
anything. How do you know the CMS works at all, if it hasn't been run locally?
Have you followed the official tutorial to get a basic understanding of how
Django works? If not, please do:
Hi, I'm new to django and fairly new to programming. I have django
installed (and it give no errors when imported on python). I also have
a cms made and configured. However I cannot anything to come up on the
page when I ran the server and checked http://127.0.0.1:8000/. I have
tried some other
On 8 déc, 13:26, Michael wrote:
> ^ Thanks for that. Have been scratching my head for a while as .id is
> not a field/property for model.user, according to the doco I am
> reading anyway (http://docs.djangoproject.com/en/dev/topics/auth/
> #topics-auth).
When no primary
Bear in mind that the admin has a limited scope. This is intentional. It was
meant to be a friendly replacement for having to hit the Postgres/mySQL command
line interface, and that's about it. It's trivial to create your own form for
dealing with your model which can be customized in any way
On Dec 8, 1:54 pm, Benjamin Wolf wrote:
> Hi there,
>
> I've just put my first little django app online (at webfaction) and I
> have the problem that when I change my database connection in the
> settings.py,
> the application always tries to connect with my old connection data.
>
On Dec 8, 9:28 am, playfire wrote:
> I am using django.forms for my forms and I want to style my
> tags using css. I know I can customize the form template, but how do i
> customize the widget itself? Normally I would do
> and then put the style in my css file but all I have
There used to be an "ne" field lookup (for expressing "not equal to"
conditions).
Now we can do similar things with the "exclude" filters.
But I really think having ne back as a field lookup would help in
situations like when I would like to do a quick:
Issue.objects.get(type__ne='immediate')
Hi~
you can customize your admin interface by overriding default admin functions
in django/contrib/admin/options.py
These links might be helpful to you:
http://www.slideshare.net/road76/customizing-the-django-admin-euro-django-con09
Hi all
I'm pretty new to django and I'm trying to figure out
if it's possible to use the wonderful admin feature filtering by user
data scope.
What I mean? I think that for non admin users could be really nice to
use admin
interface to manage their own data, for example, managing comments,
but
Hi there,
I've just put my first little django app online (at webfaction) and I
have the problem that when I change my database connection in the
settings.py,
the application always tries to connect with my old connection data.
I just got no idea what I could try to fix this, hope you have a
Hi all,
I am reading through the Practical Django Projects 2nd Edition book
and i am now on the weblog entries_index part (page 84) where im
trying to view the weblog entry index but I get an error No FlatPage
matches the given query.
I followed exactly what's written in the book.
Please help,
On Thu, Dec 3, 2009 at 1:24 AM, notcourage wrote:
> def home (request):
>
>if (request.user.is_authenticated()):
>artifacts = Artifact.objects.filter
> (member__exact=request.user.profile.id)
> ...
>else:
> ...
>
> In this case, the user is
You could add a field to store the calculated size, and override the
model's save method to perform the necessary calculation. Something
like:
def save(self, force_insert=False, force_update=False):
self.size_formatted = self.width * self.height // or whatever your
calculation actually is
^ Thanks for that. Have been scratching my head for a while as .id is
not a field/property for model.user, according to the doco I am
reading anyway (http://docs.djangoproject.com/en/dev/topics/auth/
#topics-auth).
I should have just tried .id in the first place : \
... actually you'd think
oopsy, one to many from year to user is same as many to one from a
user to a year.
On Tue, Dec 8, 2009 at 1:57 PM, Itay Donenhirsch wrote:
> hey there,
> why not do one to many from each user to a year? same thing as many to
> one from a year to a user...
> itay
>
>
> On Tue, Dec
hey there,
why not do one to many from each user to a year? same thing as many to
one from a year to a user...
itay
On Tue, Dec 8, 2009 at 1:51 PM, TiNo wrote:
>> TiNo wrote:
>> > On Sun, Nov 15, 2009 at 09:31, Dennis Kaarsemaker
>> > wrote:
>> >
>> >
Hi,
I keep numeric fields like "size", "width", "height" in my database.
In the admin, I want to render them in a friendly format and attach
units like "KiB" or "pixels" to them when showing them in the change
list. I know this could easily be achieved by adding callables such as
"size_formatted"
I am using django.forms for my forms and I want to style my
tags using css. I know I can customize the form template, but how do i
customize the widget itself? Normally I would do
and then put the style in my css file but all I have is
{{ form.fieldname }} to create the widget.
--
You received
>
> TiNo wrote:
> > On Sun, Nov 15, 2009 at 09:31, Dennis Kaarsemaker <
> den...@kaarsemaker.net>wrote:
> >
> >
> >> On za, 2009-11-14 at 15:53 -0800, TiNo wrote:
> >>
> >>
> >>> In my apps, Users of the app participate in a certain Year. I would
> >>> like a Year to continue a ManyToOne
On 8 déc, 01:47, Xbiton wrote:
(snip)
> unfortunately when I try to access the admin interface I recive an
> error saiying me that ther's no template for the apps, even I added
> the template folder ti the TEMPLATE_DIRS.
>
> Now I wondering why, in the debug page
On 7 déc, 18:55, Waqqas Jabbar wrote:
> I want that I could override get/set on a field of my model. I want to
> redirect get/set
> to another field of some other model.
So what you want is not "a field of your model", it's to expose
another field of another model as if
mateusz.szulc wrote:
>>From Django Part 3 tutorial:
> "The 404 view is also called if Django doesn't find a match after
> checking every regular expression in the URLconf."
>
> The 404 default view in django is defined as:
> def page_not_found(request, template_name='404.html'):
>
> How can I
On Dec 8, 2:47 am, GoSantoni wrote:
> Guys, i'm struggling with this problem for more than a week now. My
> goal is to use a queryset filter with a foreign key.
> Issues are
> 1) column generates a list, what is the right way to get the blog id
> for a post? So whether the
On 7 déc, 23:46, germ wrote:
> my platform: django 1.1.1, mysql 5.0.67, python 2.6.2
>
> why does syncdb complain
> CharField cannot have a "max_length" greater than 255 when using
> "unique=True"
>
> when mysql 5.0.67 does allow greater tan 255? is there a way to
>
There are many posibilities:
1. Update the admin template for the app and model and include field
variable into appropriate block
2. Update the form in admin and include the field with editable=false
in widget properties
3. Update the view function and include a new value into template data
On
hi
i use django internationalize documents to translate my project , but when i
use that i just see that only some string are translated and font direction
still is ltr , can any one help me to do it step by step?
--
You received this message because you are subscribed to the Google Groups
71 matches
Mail list logo