hi,
i just noticed that the css is interpreted differently between my
development environment on my local machine and the deployment on the
server.
locally i run the django project trough runserver and on production im
using wsgi with apache.
the proportions are all right but everything is bigge
2009/11/26 andreas schmid :
> hi,
>
> i just noticed that the css is interpreted differently between my
> development environment on my local machine and the deployment on the
> server.
>
> locally i run the django project trough runserver and on production im
> using wsgi with apache.
>
> the prop
Just a small update: the DynamicModels way as described on the wiki
doesn't work (it also says that it only works in Django 0.96, so
yeah..).
If anyone has any idea how to do this, I would be very thankful!
On Nov 24, 2:35 pm, Kevin Renskers wrote:
> Hi all,
>
> In my Django project I want to h
On Thu, Nov 26, 2009 at 9:56 AM, Kevin Renskers wrote:
> Just a small update: the DynamicModels way as described on the wiki
> doesn't work (it also says that it only works in Django 0.96, so
> yeah..).
>
> If anyone has any idea how to do this, I would be very thankful!
>
>
> On Nov 24, 2:35 pm,
Hi,
I'm developing an application with several services/modules, every module
is structured into several apps. I'm planning to use the following
directory structure:
project/
module1/
app1 (!)
app2
app3
module2/
app1 (!)
app4
app5
Both modules contain an applica
Hi Matthias ,
Thank you, I went for option 1 and it works perfectly!
Funny, the add_to_class function basically does "setattr(cls, name,
value)". So I had the right solution, only you have to do this after
class creation, not inside its __init__ function. Good to know, will
blog about this :)
Ag
rebus_ wrote:
> 2009/11/26 andreas schmid :
>
>> hi,
>>
>> i just noticed that the css is interpreted differently between my
>> development environment on my local machine and the deployment on the
>> server.
>>
>> locally i run the django project trough runserver and on production im
>> using w
Hi,
On 25 Nov., 16:14, Tom Evans wrote:
> On Mon, Nov 23, 2009 at 3:57 PM, Benjamin Wohlwend wrote:
>
> > From a
> > technical view, both the client and the server couldn't care less if
> > the form fields are visible or not, they process them all the same.
>
> If that was true, then you would be
On Thu, Nov 26, 2009 at 2:01 AM, Javier Guerra wrote:
> On Wed, Nov 25, 2009 at 3:07 PM, S.Selvam wrote:
> > I need to show some data as a chart.
> >
> > I would like to achieve a high quality rendering.
> >
> > Is reportlab or matplotlib enough ?
>
> reportlab allows you to generate PDFs, which
Hi there,
I need another decimalField / floatField format (',' instaed of '.')
I've found this:
http://groups.google.com/group/django-users/browse_thread/thread/9ff4db80932d334f
But I ask myself if there isn't a simpler method for such a common task.
(Like setting the input format for a datefiel
Hi,
I have been going through the permission documentation and i know i
can assign users with permissions like this,
*
request.user.user_permissions.add(1)
*
But having 100 or more permissions i find this method a bit weird. Is
not there a way to say,
*
request.user.user_permissions.add('auth.d
I have models directory with several files in it (models/__init__.py,
models/main.py, ...)
I have basic "Article" model and many models derived from it. So, I
would like to place them into separate file: models/article.py
But I also have several models ("Image" and "Section") which contain
ForeignK
On Nov 26, 10:01 am, Denis Cheremisov
wrote:
> I have models directory with several files in it (models/__init__.py,
> models/main.py, ...)
> I have basic "Article" model and many models derived from it. So, I
> would like to place them into separate file: models/article.py
> But I also have sever
I'm using the standard Django comment framework on Django 1.1. My
template uses »render_comment_form for ...« to display a comment form.
What I'd like to do is to prepopulate the name and email fields on the
form from request.user iff the request is authenticated, but I don't
see how to get at the
Thank's for the reply. I do use tortoise and I tried what you
suggested: nothing happened. Now I look at the patch file I think
maybe it was generated by git (which I am not familiar with). The
first few lines of the patch file (downloaded from django source) are:
diff --git a/django/contrib/admin
Oh, thanks, that works!
On 26 ноя, 13:03, Daniel Roseman wrote:
> On Nov 26, 10:01 am, Denis Cheremisov
> wrote:
>
> > I have models directory with several files in it (models/__init__.py,
> > models/main.py, ...)
> > I have basic "Article" model and many models derived from it. So, I
> > would
Hi there.
I’m not able to figure out how to solve in a simple and clean way the
following problem.
Basically what I want to do is to edit the instances of the following
model:
Models.py
class Seller(models.Model):
brand = models.CharField(max_length=250)
...
slug = models.SlugField(uniqu
On Thu, Nov 26, 2009 at 2:35 AM, fallhunter wrote:
> i have this code in my tests.py:
>
> from models import *
>
> and in the models.py I have a signal handler and register it with
>
> post_save.connect( post_save_note, sender=Note )
>
> and when i run test with ./manage.py test main
>
> I found
On Thu, 26 Nov 2009 10:18:44 +0100
Marcus Weseloh wrote:
> [...] but are there other areas in Django that rely on
> applications having unique names? Do I need to ditch the Python-style
> namespacing and resort to module1_app1, module2_app1 application names?
Answering my own question: at least
Can someone help me out with this. Is this possible?
I have created a simple custom tag that replace the tag with a
javascript.
My tag look like this {{ " "|putMap:".."}}. It takes
only argument and will replace the tag with GoogleMapAPI.
2009/11/26 paulh :
> Thank's for the reply. I do use tortoise and I tried what you
> suggested: nothing happened. Now I look at the patch file I think
> maybe it was generated by git (which I am not familiar with). The
> first few lines of the patch file (downloaded from django source) are:
>
> dif
Hi Karen,
thanks again for your reply.
I use Aptana with pydev extension.
Debugging the app shows the following for search:
dict: {u'caption': u'f\\xfcr', u'showold': False}
and for qs:
str: für
although it seems to be � instead of ASCII 252 - but this could be,
because I am sitting on a MAC
whil
rebus_ wrote:
>> diff --git a/django/contrib/admin/media/js/admin/
>> RelatedObjectLookups.js b/django/contrib/admin/media/js/admin/
>> RelatedObjectLookups.js
>> index 1bc78f8..3941752 100644
>> --- a/django/contrib/admin/media/js/admin/RelatedObjectLookups.js
>> +++ b/django/contrib/admin/media/j
I'm using Django 1.0.3, Apache 2.2, Python 2.5 and Ubuntu 9.04 (a
recent upgrade).
When I try to delete an image (specifically I'm deleting an instance
of a photo model that contains an imagefield) I get an OSError,
"[Errno 1] Operation not permitted"
The first thing I tried was checking the perm
As it turned out, I hadn't managed to get mod_python to work with
Python 2.5 properly.
I found these instructions
http://www.briggs.net.nz/log/2007/04/20/mod_python-and-python25/
for going from 2.4 to 2.5 and adapted them for going from 2.6 to 2.5.
After that, the python version began showing up
> When I try to delete an image (specifically I'm deleting an instance
> of a photo model that contains an imagefield) I get an OSError,
> "[Errno 1] Operation not permitted"
>
> The first thing I tried was checking the permissions in Ubuntu,
> they're set to allow write access for everyone.
>
>
philip.bar...@impaerospace.com wrote:
> I tried editing django/core/files/storage.py to output the results of
> an os.access() check to show that I did have write access to the image
> file immediately before attempting the os.remove. It showed that I had
> write access to the image file.
>
You
In my report generating view I have this (snip):
if tablename == 'Area':
areas = Area.objects.all()
data.append(['Code','Name','Description'])
for area in areas:
data.append([
Paragraph(area.area, normalstyle, bulletText=None),
Paragraph(
I have a Ticket model that has a Requirement foreign key. The problem
is, there could be hundreds of requirements. Offering the user a drop
down combo box of requirements to choose from isn't the best option.
So how would you let the user select one record from a large
selection? What UI widget(s)
hi,
i have a question about retrieving related objects avoiding double entries.
actually i have 3 models:
topics
projects
technologies
the projects model has foreignkeys to topics and technologies. i have a
view for the topic detail like this:
def topic_detail(request, slug):
Isn't it a known thing, that template tags are hard to debug? Did I
miss something?
On Nov 11, 11:13 am, pihentagy wrote:
> Hi all!
>
> I am not satisfied with the error handling inside custom template
> tags.
> To demonstrate it, I cooked a mini useless app, which can be
> downloaded here:
>
> W
Hi,
> I have a Ticket model that has a Requirement foreign key. The problem
> is, there could be hundreds of requirements. Offering the user a drop
> down combo box of requirements to choose from isn't the best option.
> So how would you let the user select one record from a large
> selection? Wha
Thanks. No, I'm not talking about the admin interface - sorry I should
have made that clear. I'm talking about the front end UI.
On Nov 26, 9:11 am, Michel Thadeu Sabchuk wrote:
> Hi,
>
> > I have a Ticket model that has a Requirement foreign key. The problem
> > is, there could be hundreds of re
Those are good points. I am inclined to think the Django developers
think along the same lines (that is why they suggest to "Avoid using
null on string-based fields such as CharField and TextField unless you
have an excellent reason")
Thus I am also inclined to think that CharField, ImageField etc
Stodge wrote:
> Offering the user a drop
> down combo box of requirements to choose from isn't the best option.
Rant: combo box /means/ a text entry widget plus dropdown menu "combo".
For some reason web developers in particular seem prone to using it to
mean a dropdown alone (html forms sadly l
I had a fruitless discussion with a fellow coder today. Summarily, we
have a model for students that will keep growing with time. I mean to
say the number of records in the database will keep growing, and no
rows are going to be deleted.
Now, students fall in one category or the other, and this is
On Sat, Nov 21, 2009 at 4:09 PM, Carlos Ricardo Santos <
carlosricardosan...@gmail.com> wrote:
> I used this approach, was explained on "Learning website development with
> Django book", give a look there:
> *
> *
> *
> *
> *style.css *file:
> *
> *
> .tag-cloud-0 { font-size: 100%; }
> .tag-cloud
On Thu, Nov 26, 2009 at 2:25 PM, chefsmart wrote:
> Those are good points. I am inclined to think the Django developers
> think along the same lines (that is why they suggest to "Avoid using
> null on string-based fields such as CharField and TextField unless you
> have an excellent reason")
>
>
On Thu, Nov 26, 2009 at 2:35 PM, chefsmart wrote:
> I had a fruitless discussion with a fellow coder today. Summarily, we
> have a model for students that will keep growing with time. I mean to
> say the number of records in the database will keep growing, and no
> rows are going to be deleted.
>
On Thu, Nov 26, 2009 at 7:03 AM, Hinnack wrote:
> Hi Karen,
>
> thanks again for your reply.
> I use Aptana with pydev extension.
> Debugging the app shows the following for search:
> dict: {u'caption': u'f\\xfcr', u'showold': False}
>
>
That's confusing to me, because other than having an extra \
Hi all,
Sorry for bothering you with something that is probably fairly
straight forward but I cant seem to find the solution myself.
I am using Google Checkout on my site. It calls one of my pages after
processing an order. It posts XML. Django seems to evaluate the XML
into a QueryDict, with rat
On Nov 26, 3:55 pm, Chris wrote:
> Hi all,
>
> Sorry for bothering you with something that is probably fairly
> straight forward but I cant seem to find the solution myself.
>
> I am using Google Checkout on my site. It calls one of my pages after
> processing an order. It posts XML. Django seems
On Thu, Nov 26, 2009 at 5:49 AM, pinco wrote:
> Hi there.
>
> I’m not able to figure out how to solve in a simple and clean way the
> following problem.
> Basically what I want to do is to edit the instances of the following
> model:
>
> Models.py
> class Seller(models.Model):
>brand = models
Hello everyone,
I'd like to write the django error page (when debug == true) to a file
and return a page with that link instead of the actual page. The reason
I'd like to do this is to be able to debug a facebook app because fb
seams to filter/block the error page. Does anyone know how to do th
Yes, I did mean '=' rather than ':'. I have been doing too much JSON
lately...
Here is an example of the output from 'str(request.POST)':
\r\nhttp://checkout.google.com/schema/2";
serial-number="707751054951378-5-1">\r\n NEW\r\n CHARGEABLE\r\n NEW\r\n
REVIEWING\r\n 2009-11-26T14:39:21.900
I ran 'ps aux | grep apache' which showed that apache was running
under the www-data user account.
I granted the idmsaccess group create and delete permission for both
the file in question and the directory containing it.
The following is a line from /etc/group
idmsaccess:x:1003:ase,www-data,mys
On 26 Nov 2009, at 16:55 , Chris wrote:
> Hi all,
>
> Sorry for bothering you with something that is probably fairly
> straight forward but I cant seem to find the solution myself.
>
> I am using Google Checkout on my site. It calls one of my pages after
> processing an order. It posts XML. Djang
Awesome, that looks like it. Thanks.
On Nov 26, 4:01 pm, Masklinn wrote:
> On 26 Nov 2009, at 16:55 , Chris wrote:
>
> > Hi all,
>
> > Sorry for bothering you with something that is probably fairly
> > straight forward but I cant seem to find the solution myself.
>
> > I am using Google Checkout
On Thu, Nov 26, 2009 at 8:40 AM, adelaide_mike
wrote:
> In my report generating view I have this (snip):
>
> if tablename == 'Area':
>areas = Area.objects.all()
>data.append(['Code','Name','Description'])
>for area in areas:
>data.append([
>Paragraph
On Thu, Nov 26, 2009 at 9:09 AM, pihentagy wrote:
> Isn't it a known thing, that template tags are hard to debug? Did I
> miss something?
>
I don't know, but your original message makes it a little too hard to try to
help probably. You say the actual location of the error is missing, but in
ord
Unlike the render_to_response shortcut, generic views only accepts a
single template name, not a list of templates.
These views could be improved by accepting multiple templates and the
compatibility wouldn't be affected.
One reason that this could be useful: having a categorized news
listing tha
philip.bar...@impaerospace.com wrote:
> I ran 'ps aux | grep apache' which showed that apache was running
> under the www-data user account.
Okay. (Aside: Note that you can use something like mod_wsgi in daemon
mode or mod_fcgid to run django processes under a separate user account
to the main apa
hi,
I'm generating, using ModelForm, a form from a Restaurant model, which
has a Country field.
Country has a 'code' and a 'name' fields.
When the form is created in my template, the values of the select
options are the Country ids. How can I replace them by the Country
'code' values. Is it possib
I have a model that has two fields (Django 1.1.1)
class FooBar(models.Model):
foo = models.ForeignKey('Foo')
bar = models.ForeignKey('Bar')
class Meta:
unique_together = (('foo','bar'),)
When is_valid is called in my view and the combination of fields
already exists (eg uniqu
On Thu, Nov 26, 2009 at 12:37 PM, cerberos wrote:
> I have a model that has two fields (Django 1.1.1)
>
> class FooBar(models.Model):
>foo = models.ForeignKey('Foo')
>bar = models.ForeignKey('Bar')
>
>class Meta:
>unique_together = (('foo','bar'),)
>
> When is_valid is called
in your IncidentForm definition set reporter to a ModelChoiceField
(User.objects.all(), widget=forms.HiddenInput())
then it should work out ok. I usually hide fk fields to a user if i
want the current request.user object, because I don't want to allow
the possibility for it to be changed.
On Nov
On Nov 26, 11:19 am, David De La Harpe Golden
wrote:
> philip.bar...@impaerospace.com wrote:
> > -rwxrwxrwt 1 ase idmsaccess 480836 2009-09-29 09:45 J0484_-
> > _2009-03-04_006.jpg
> > drwsrwsrwt 3 ase idmsaccess 12288 2009-09-11 02:58 dar
>
> > To me it looks like both the file and the directo
I want it to be possible to be changed. But I also want the initial selection
to be the current user.
So this isn't really a solution. Thanks anyway.
On Nov 26, 2009, at 10:27 AM, esatterwh...@wi.rr.com wrote:
> in your IncidentForm definition set reporter to a ModelChoiceField
> (User.object
OK, this did lead me to the solution though.
It seems that, for the ForeignKeyField the initial value should be the primary
key of the record and not the object referenced. So changing
>> form = IncidentForm(initial={
>>'reporter': request.user,
to
>> form = IncidentForm(initial
On Sat, Nov 21, 2009 at 7:09 AM, Carlos Ricardo Santos <
carlosricardosan...@gmail.com> wrote:
>
>
>>
>> Obviously I can't use that number in font-size (150pt is too big) and
>> I have to make a proportion (150 -> 20pt, 1 -> 5pt, 50 ~>10pt and so
>> on).
>>
>> How can I accomplish that?
>>
>>
What
When I order over a ManyToMany relationship, certain records will not
appear. The record which disappears changes depending on the order by
which I sort it. Specifically:
>>> Listing.objects.order_by("book__courses")
gives me Listings with id's (5, 1, 3, 5, 2, 4), and
>>> Listing.objects.order_
P.S. id == 6 disappears in ascending and id == 3 disappears in
descending.
It's not a surprise that id == 5 is duplicated because it is the only
Listing__book which has a relationship with two courses, the rest have
a relationship with only one. That part does look suspicious to me
though, as if t
On Thu, Nov 26, 2009 at 9:37 AM, cerberos wrote:
> I have a model that has two fields (Django 1.1.1)
>
> class FooBar(models.Model):
>foo = models.ForeignKey('Foo')
>bar = models.ForeignKey('Bar')
>
>class Meta:
>unique_together = (('foo','bar'),)
>
> When is_valid is called i
You might also check out pycha?
S.Selvam wrote:
> On Thu, Nov 26, 2009 at 2:01 AM, Javier Guerra wrote:
>
> > On Wed, Nov 25, 2009 at 3:07 PM, S.Selvam wrote:
> > > I need to show some data as a chart.
> > >
> > > I would like to achieve a high quality rendering.
> > >
> > > Is reportlab or mat
My problem is the error handling of django in templatetags, not the
specific dummy error, which I programmed:
@register.simple_tag
def current_time():
1/0
return unicode(datetime.datetime.now())
What annoys me, that you cannot find the line number of the error,
just a message, tha
Greetings,
I have two tables: Student and Grade in a one to many relationship.
The Grade table has a field named "grade" which has integers from 0 to
5.
I want to count how many grades of each type each Student has. For
this I'm using a query similar to:
Students.objects.order_by('grades__grade').
You're primary question is a little tough, ther are a couple of ways
to go. I just wanted to mention that your slug might not be unique
the way you have it and you could get IntegrityError. Also, your
get_absolute_url would be better served with permalink. Your primary
question, well, I'm just a
I'm able to configure Cherokee to run my Django project correctly,
using the included wizard. The problem is, if an exception is thrown,
Cherokee just shows a "Unhandled Exception" page. I figured out that
if I run fcgi with debug=true, then I get a stacktrace from Flup, but
I wanted the default Dj
i've seen notes in some django documentation that implies that using /
admin/ for non-trusted users is not a good idea. which is unfortunate
since it seems like the admin interface is about 95% of what i want
for my users to be able to view and manipulate their sales
transactions data over the web.
Yep, still a bad idea. Permissions are by table not by row. Use
generic views for basic CRUD.
Count László de Almásy wrote:
> i've seen notes in some django documentation that implies that using /
> admin/ for non-trusted users is not a good idea. which is unfortunate
> since it seems like the a
Hi.. I'm a newbie and I have a question about rendering webpage and
executing a tag/filter
I'm reading a string value that is stored in my database. This string
the main content of my webpage and it contains contents like
javascript, css styling, and django template tags/filters.
After I load str
On Thu, Nov 26, 2009 at 6:02 PM, KONTRA, Gergely wrote:
> My problem is the error handling of django in templatetags, not the
> specific dummy error, which I programmed:
>
> @register.simple_tag
> def current_time():
>1/0
>return unicode(datetime.datetime.now())
>
> What annoys me,
ok, fair enough. does generic views have the machinery to replicate
the admin interface?
On Nov 26, 7:28 pm, Skylar Saveland wrote:
> Yep, still a bad idea. Permissions are by table not by row. Use
> generic views for basic CRUD.
>
> Count László de Almásy wrote:
>
>
>
> > i've seen notes in so
You should take a look at Arecibo which has been used by a few
Facebook apps for that very readson. It has full Django libraries and
if you don't use it a full example of how to use middleware to process
an error.
http://areciboapp.com
--
Andy McKay
www.clearwind.ca
On 2009-11-26, at
You are passing through None to reportlab, not a string. Follow the
traceback and you will find the line in your code where the error
occurs.
--
Andy McKay
www.clearwind.ca
On 2009-11-26, at 5:40 AM, adelaide_mike
wrote:
> In my report generating view I have this (snip):
>
> if tabl
> Can anyone tell me how I can load the content and execute/render the
> javascript, css styling, template tags/filters?
You really shouldn't be doing this. One string is everything on your
page? You can use the Template library to re-render a template and
that's discussed in the templating d
What's the easiest way to have error lists describe fields using their
labels instead of their names? Thanks in advance.
--
Yang Zhang
http://www.mit.edu/~y_z/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Nov 27, 11:50 am, Count László de Almásy wrote:
> ok, fair enough. does generic views have the machinery to replicate
> the admin interface?
Generic views take most of the pain out of CRUD, and also take care of
producing and validating forms. You can also steal some of the nice
javascript w
> I don't
> believe you can do inline formsets with generic views, which is
> unfortunate, but it's not hard with a simple custom view.
well, perhaps not automagically, but you can just send extra_context
and then do a little bit of custom work ``if request.method == POST``.
--
You received this
> each user has their own table in the
> db for transactions, and they can do whatever they want to their own
> data. i wouldn't want them to be able to touch anyone else's tables,
> but it seems like django has a permissions system to restrict that.
ha, reading lists on mobile ... I didn't even s
On Nov 27, 1:27 am, Yang Zhang wrote:
> What's the easiest way to have error lists describe fields using their
> labels instead of their names? Thanks in advance.
I don't think that I understand your question. Is there something to
it that isn't covered in
http://docs.djangoproject.com/en/dev/
hello,
if you set the admin email address and the necessary email parameters
in your config file then django will send an email with all the
details to the admin when an exception is thrown. would this be
sufficient?
konstantin
On Nov 26, 11:15 am, Gabriel Rossetti
wrote:
> Hello everyone,
>
>
>
> I'm reading a string value that is stored in my database. This string
> the main content of my webpage and it contains contents like
> javascript, css styling, and django template tags/filters.
>
> After I load string value by {{ stringValue|safe }} filter, everything
> is added to the page ju
One final question if I may (well I hope its the last).
In my standard report generating view I need to use Arial font (for
example).
I have studied the reportlab docs (Paragraphs chapter) for hours and
tried all sorts of guesses as to how to do it. Nothing I have tried
works. My fault. Now in
> Paragraph(rack.nick, normalstyle, bulletText=None),
Yep, rack.nick is None here it would seem. Like Karen said, don't
have nullable CharField if you can help it; blank=True is good and
then and empty will be "". I have a dirty hack for you that should
'work'.
Paragraph( rack.nick if rack
Wiadomość napisana w dniu 2009-11-27, o godz. 00:31, przez
hcarvalhoalves:
> I'm able to configure Cherokee to run my Django project correctly,
> using the included wizard. The problem is, if an exception is thrown,
> Cherokee just shows a "Unhandled Exception" page. I figured out that
> if I ru
86 matches
Mail list logo