It's also worth looking into the sorl.thumbnail library. This has an
ImageWithThumbnailField that does this work for you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
2008/11/5 Low Kian Seong <[EMAIL PROTECTED]>:
>
> Dear all,
>
> I am using django to write an a web based sales inventory system for
> my client. To this end, I have created two objects in my models which
> is :
>
> Sales and Stock. Everytime a sales is associated with a particular
> stock is crea
Or take a look at photologue. Does all this for you.
http://code.google.com/p/django-photologue/
On Wed, Nov 5, 2008 at 9:02 AM, David Christiansen <[EMAIL PROTECTED]> wrote:
>
> It's also worth looking into the sorl.thumbnail library. This has an
> ImageWithThumbnailField that does this work f
mondonauta schrieb:
> hello, sorry i'm newb so that's y i need your help.
> i made a model... and thanks django, it's very simple... but my
> problem
> is that i want 1 specific field from this model to be split in 3
> choiceFields.
>
Using MultiValueField is not easy. What kind of data do you
On 4 nov, 23:54, John M <[EMAIL PROTECTED]> wrote:
> i have a model for status reports:http://dpaste.com/88760/
>
> The report has 1-N bullet Points, each bullet Point has a category.
>
> What I want to figure out, whats my best way to display this in a
> template, given that the category list is
Hi,
I'm trying to add a to_kml ogr support to geodjango and I'm facing a
problem :
I've added to geom.py the line :
to_kml = string_output(lgdal.OGR_G_ExportToKML, [c_void_p],
str_result=True)
and added to geometrie.py :
@property
def kml(self):
"Returns the KML representation of the
My code is here
http://dpaste.com/88831/
It's not working I really don't know why the other part of the
post_save is not even being executed
On Wed, Nov 5, 2008 at 4:04 PM, Antoni Aloy <[EMAIL PROTECTED]> wrote:
>
> 2008/11/5 Low Kian Seong <[EMAIL PROTECTED]>:
>>
>> Dear all,
>>
>> I am using
Hi,
On Tue, Nov 04, 2008 at 10:56:08PM -0800, MrJogo wrote:
> Awesome! This is INCREDIBLY helpful.
>
> In terms of using it (I'm not too familiar with server stuff), I have
> a few questions (which have to do with Apache, not lighttpd, so you
> might not know). Basically, once I create that handl
Hi Friends,
I'm a newbie to Django, in my application i'm uisng Sqlite3 as my
Database. I've created the models as per my requirement. The database is
succesfully synchronized. After this how can i view the tables (like select
statement in Postgres) to check whether my data is successfully insert
All,
Am new in django, but am just wondering if i wanted to make use of the
nice css files in the admin site in my local project how would i do
that?
Am able to point the media url on my settings.py to the correct admin
css folder, and actually my project is able to pick the css styles,
but what
On Wed, Nov 5, 2008 at 5:41 PM, kele <[EMAIL PROTECTED]> wrote:
>
> the debug flag in settings.py .
>
> what i want to do is to only change the DEBUG varialbe to True when
> just the specific remote address( ip) to send the request .
> cause i do not hope all my users can read the err msg while i
Hi everyone,
In my Django project I’ve on the front page a table where I wish to
load the two newest messages. Then I’ve a link to a message archive
where all messages are listed.
My problem is that I don’t know how to “filter” my list at my front
page so it only extracts the two newest messages
On Nov 5, 11:34 am, Bobo <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> In my Django project I’ve on the front page a table where I wish to
> load the two newest messages. Then I’ve a link to a message archive
> where all messages are listed.
>
> My problem is that I don’t know how to “filter” my l
On Wed, Nov 5, 2008 at 6:34 PM, Bobo <[EMAIL PROTECTED]> wrote:
> In my Django project I've on the front page a table where I wish to
> load the two newest messages. Then I've a link to a message archive
> where all messages are listed.
>
> My problem is that I don't know how to "filter" my list a
the debug flag in settings.py .
what i want to do is to only change the DEBUG varialbe to True when
just the specific remote address( ip) to send the request .
cause i do not hope all my users can read the err msg while i am
coding .
something like this :
if remoteAdd == 192.168.0.1 :
DEB
Hi,
up to now cleaned_data is removed, if the form is invalid.
What is the best way, to get the cleaned data (converted to
python objects) of a form which is invalid?
Example: The form has field for a group. You want to display
the members of the group right to the input widget.
I looked at fo
I would guess that this version:
messages = Message.objects.order_by('-created')[:2]
would be more memory efficient than the:
messages = Message.objects.all()
(and then using |slice:":2" to cut out the top 2)
although, I've done that second one often.
-- joe
On Nov 5, 6:56 am, "Ro
I have a 'Country' model and I have set its 'verbose_plural_name' to
'Countries'. This displays fine in the site administration page
(earlier it showed Countrys there).
There is another model 'Movie' which has a ManyToManyField
'countries'. I am unable to use this field in 'list_filter' for the
m
On Wed, Nov 5, 2008 at 6:30 PM, ammo <[EMAIL PROTECTED]> wrote:
> I have a 'Country' model and I have set its 'verbose_plural_name' to
> 'Countries'. This displays fine in the site administration page
> (earlier it showed Countrys there).
Not sure if this has any relation to your problem, but sho
Hello,
I have the following situation:
1) User goes to a restricted area and is offered a chance to login
(@login_required decorator used)
2) User logs in, and then is automatically returned to this page via ?
next={{ request.path }} in the HTML template
This works fine, after logging in the us
Dear all,
In the quest to build my web sales inventory system, I want to specify
that only stock that are available be listed in the dropdown.
So my question is can I use a custom query to feed the choices for my field?
Thank you.
--
Low Kian Seong
blog: http://lowkster.blogspot.com
--~--~-
Hi everyone,
I’ve a question about the date format in Django.
When I create a message for the users I enter the date in the
database. But when I retrieve the date it come out like this: -mm-
dd. I would like to make it like:
dd mm and the month should be printed with the name of the mont
On Wed, Nov 5, 2008 at 8:23 PM, JoeJ <[EMAIL PROTECTED]> wrote:
> I would guess that this version:
> messages = Message.objects.order_by('-created')[:2]
>
> would be more memory efficient than the:
> messages = Message.objects.all()
> (and then using |slice:":2" to cut out the top 2)
>
> a
On Wed, Nov 5, 2008 at 7:43 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> up to now cleaned_data is removed, if the form is invalid.
>
> What is the best way, to get the cleaned data (converted to
> python objects) of a form which is invalid?
>
> Example: The form has field for a grou
Wiadomość napisana w dniu 2008-11-05, o godz. 15:28, przez Bobo:
> I’ve a question about the date format in Django.
> When I create a message for the users I enter the date in the
> database. But when I retrieve the date it come out like this: -mm-
> dd. I would like to make it like:
> dd mm
> I’ve a question about the date format in Django.
> When I create a message for the users I enter the date in the
> database. But when I retrieve the date it come out like this: -mm-
> dd. I would like to make it like:
> dd mm and the month should be printed with the name of the month,
>
> I'm a newbie to Django, in my application i'm uisng Sqlite3 as my
> Database. I've created the models as per my requirement. The database is
> succesfully synchronized. After this how can i view the tables (like select
> statement in Postgres) to check whether my data is successfully inserted
I use the sqlite manager extension for firefox. Very good.
http://code.google.com/p/sqlite-manager/
/Mattias
From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of sadeesh Arumugam
Sent: den 5 november 2008 11:07
To: django-users@googlegroups.com
Subject: Help regard
thanks for the answer... anyway, my problem is that i already
have a database so i don't really want to change it.
in this case in particular i have a table called 'teachings'
(that should be managed by the model i created)
where all the subjects taught by a professor r stored.
for each subject (i
I see in django.contrib.admin, there are {{ root_path }} and
{{ app_path }} in its base.html.
But if I use them in my template, they are always empty.
What I should do to enable these variables.
Any help is greatly appreciated.
--~--~-~--~~~---~--~~
You received th
Hi,
I have Django running on Apache 2.2 on windows. I am attempting to
use django authentification to secure an apache folder using this
configuration:
AuthType Basic
AuthName "mysite.com"
AuthUserFile /dev/null
AuthBasicAuthoritative Off
Require valid-user
PythonPath
Hi,
I see two solutions:
- be strict: Update the table to contain three columns.
day (0..6), start_hour and end_hour.
--> No need for MultiWidget
- don't be strict: Leave it as a charfield. I guess this field is
only read be humans. This gives you more possibilities:
Mon 15-17. Exce
Hi,
Have you tried to create an empty file and use the filename as AuthUserFile?
Thomas
Matt schrieb:
> Hi,
>
> I have Django running on Apache 2.2 on windows. I am attempting to
> use django authentification to secure an apache folder using this
> configuration:
>
>
>
> AuthType Basic
I want to create a form for a large object that has numerous non-
mandatory fields. I am still learning django, and am missing something
easy I hope. All the examples and docs I see say to redirect after the
form is posted and saved to the db (in my case). What I want is to
leave the form up after
Thanks for all gays' great help. This does help me a lot.
--~--~-~--~~~---~--~~
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 th
Make `update_stock_status` a free function not `Sale` method.
On Wed, Nov 5, 2008 at 12:43, Low Kian Seong <[EMAIL PROTECTED]> wrote:
>
> My code is here
>
> http://dpaste.com/88831/
>
> It's not working I really don't know why the other part of the
> post_save is not even being executed
>
> On W
And how about to ignore `next` param in `create_account` view and explicitly
redirect user to his restricted area?
On Wed, Nov 5, 2008 at 17:12, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
>
> Hello,
>
> I have the following situation:
>
> 1) User goes to a restricted area and is offered a cha
That worked. Thanks!
On Nov 5, 3:41 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Have you tried to create an empty file and use the filename as AuthUserFile?
>
> Thomas
>
> Matt schrieb:
>
>
>
> > Hi,
>
> > I have Django running on Apache 2.2 on windows. I am attempting to
> > use
On Nov 5, 3:54 pm, Peter Bailey <[EMAIL PROTECTED]> wrote:
> I want to create a form for a large object that has numerous non-
> mandatory fields. I am still learning django, and am missing something
> easy I hope. All the examples and docs I see say to redirect after the
> form is posted and save
Well that sounds very logical. Thanks very much. I'll make the changes
and give it a go.
Thanks again,
Peter
On Nov 5, 11:51 am, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Nov 5, 3:54 pm, Peter Bailey <[EMAIL PROTECTED]> wrote:
>
>
>
> > I want to create a form for a large object that has
That is the problem I am trying to solve.
Basically, the restricted area isn't static. A user could be viewing
any number of dynamic pages protected by a sign in page.
If it were simply a static page, it would be trivial to do: return
HttpResponseRedirect("/static_page/")
The ?next= argument is
On Nov 5, 10:08 am, "yuanyun.ken" <[EMAIL PROTECTED]> wrote:
> I see in django.contrib.admin, there are {{ root_path }} and
> {{ app_path }} in its base.html.
> But if I use them in my template, they are always empty.
> What I should do to enable these variables.
Those template variables are very
Hi,
> In the quest to build my web sales inventory system, I want to specify
> that only stock that are available be listed in the dropdown.
>
> So my question is can I use a custom query to feed the choices for my field?
Yes. See ModelChoiceField.queryset here:
http://docs.djangoproject.com/en/
i'm using this method locally and it works great for my needs to be
able to use a little legacy php code in the project:
http://code.djangoproject.com/ticket/2440?replyto=1#comment
when i use my hosting provider (mediatemple) which i believe is
running django via a fast cgi container setup. ove
I'm running through a couple of tutorials and I've hit the same
problem in each one. I feel like I've got the simple models for the /
polls/ tutorial and a /blog/ tutorial (from Webmonkey), but when I
test it out locally, the resulting page shows raw HTML -- the content
is there, but it's showing
Hi Javi,
> Thanks but I'd already tried it. I don't understand why in the
> production server is not added the preceeding slash to the url. My
> urls.py is as follows:
> urlpatterns = patterns('candidateTool.assessmentSystem.views',
> (r'^$', 'index'),
> (r'^enter/$', 'enter'),
> (r'^
Hi all,
I was wondering how feasile it is it to install Django in a user
account without root access. I followed the instruction at:
http://docs.djangoproject.com/en/dev/topics/install/#installing-development-version
But I obviously cant do the following without root access
ln -s `pwd`/django
Hi all,
I'm running a web app at Dreamhost where they only allow fastcgi (no
mod_python). I followed the instructions at the Dreamhost wiki for
setting up Django here: http://wiki.dreamhost.com/index.php/Django and
everything is working great.
The one thing left that I'd like to do is set u
Matt wrote on 11/05/08 16:26:
> Hi,
>
> I have Django running on Apache 2.2 on windows. I am attempting to
> use django authentification to secure an apache folder using this
> configuration:
>
>
>
> AuthType Basic
> AuthName "mysite.com"
> AuthUserFile /dev/null
> AuthBasicAu
Is there a way to have django log 500 errors to a file, and otherwise
log stderr/stdout to a file somewhere?
The problem I'm having right now is that I'm getting a 500 error
instead of 404s when Debug=False. I get 404s as expected when
Debug=True. I can't for the life of me figure out what is bre
> The problem I'm having right now is that I'm getting a 500 error
> instead of 404s when Debug=False. I get 404s as expected when
> Debug=True. I can't for the life of me figure out what is breaking,
> since I don't have any error data to go off.
Django sends you exception logs by mail if you se
I am trying to create an application to help some classmates and myself team
up on journal article reviewing. I have everything working nicely except
being able to create a slug from the title of the journal article and then
using it in urls.py and creating links in templates. The application is
ca
> I feel like I'm missing something simple. I read up on the autoescape
> tags, but I'm not sure that's the solution. Any ideas?
Can you paste your code to dpaste.com and post the link? Any ideas would
be a guess without some further information.
Regards,
Daniel
--~--~-~--~~---
I just realized that I accidentally named the template 400.html not
404.html... d'oh. I definitely need a better way of diagnosing 500
errors.
Thanks to the pointer to the email settings. I will set that up, but
I'm wondering if there's a way to direct django to log those errors
rather than email
I think my problem might be that I'm not saving the slug. When I save a
review I do...
review = Review(.) #< Everything but a slug gets passed as a kwarg
review.save() #<--- Then I save the review.
How do I save the slug when I save the review. Does Django automajically do
thi
Hi,
Ok I'm using the following code to turn my model into JSON:
from django.core import serializers
json = serializers.serialize("json", Event.objects.all()[:5],
fields=('title','date','location'))
Now, this returns JSON like this:
[
{ "pk": 1, "model": "events.event", "fields": {
With simplejson module (that is part of django distribution) you can covert
to JSON any python objects. So create data structure you need and pass it to
simplejson dump/dumps functions.
On Thu, Nov 6, 2008 at 01:17, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ok I'm using the following cod
Noob here...
I have an existing table with two Clob fields. While defining the
model I use TextField as the filed type.
running gives me back the error:
cx_Oracle.DatabaseError: ORA-01754: a table may contain only one
column of type LONG
Well, what I really want are clobs to begin with. It
This looks like you are missing the link between your web server and
the django code. I do not know how dreamhost works but for django to
work you need to tell your web server: "hey server when you get a
request for www.mysite.com don't just try to serve index.html from a
root directory, i want yo
This looks like you are missing the link between your web server and
the django code. I do not know how dreamhost works but for django to
work you need to tell your web server: "hey server when you get a
request for www.mysite.com don't just try to serve index.html from a
root directory, i want yo
On Nov 6, 2008, at 6:11 AM, Delta20 wrote:
>
> I just realized that I accidentally named the template 400.html not
> 404.html... d'oh. I definitely need a better way of diagnosing 500
> errors.
>
> Thanks to the pointer to the email settings. I will set that up, but
> I'm wondering if there's a
with django, is it possible to restrict the calling host of particular
urls to be the localhost?
namely, is there a way to restrict say a set of web services
implemented in django to be only accepted if they are the same domain
as the hosted page?
so if i have a php page on foo.com/bar.php, whic
craic wrote:
> with django, is it possible to restrict the calling host of particular
> urls to be the localhost?
>
> namely, is there a way to restrict say a set of web services
> implemented in django to be only accepted if they are the same domain
> as the hosted page?
>
> so if i have a php pa
On Wed, Nov 5, 2008 at 4:24 PM, craic <[EMAIL PROTECTED]> wrote:
>
> with django, is it possible to restrict the calling host of particular
> urls to be the localhost?
>
> namely, is there a way to restrict say a set of web services
> implemented in django to be only accepted if they are the same
On Nov 6, 11:24 am, craic <[EMAIL PROTECTED]> wrote:
> with django, is it possible to restrict the calling host of particular
> urls to be the localhost?
>
> namely, is there a way to restrict say a set of web services
> implemented in django to be only accepted if they are the same domain
> as
Yes, you need to create the slug in your save() method. Something
like:
class Review(models.Model):
...
def save(self):
# add slug if there isn't one already
if not self.slug:
from django.template.defaultfilters import slugify
self.slug = slugify(self.title
On Nov 3, 12:07 am, JoeJ <[EMAIL PROTECTED]> wrote:
> Are you looking for something like 'django-tracking' ??
> http://code.google.com/p/django-tracking/
>
> I was just perusing this last night, for use on a site of mine.
>
> -- joe
excuse me for late... thank you very much :)
--~--~--
http://wiki.dreamhost.com/index.php/Django
Have you got the .htaccess, dispatch.fcgi etc all set up?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
On Wed, Nov 5, 2008 at 5:54 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Noob here...
>
> I have an existing table with two Clob fields. While defining the
> model I use TextField as the filed type.
>
> running gives me back the error:
>
> cx_Oracle.DatabaseError: ORA-01754: a table may
> when i use my hosting provider (mediatemple) which i believe is
> running django via a fast cgi container setup. overall, the setup
> seems to work, no errors, definately calling php.py, and detects the
> php:file.php tags, but no php is converted into the template output.
> blank text, not even
I'm doing some testruns on Django to find out how it fits me. Until
now: Just great. But - as always - there are some problems you
encounter when you are inexperienced with a specific framework. I've
some Problems at the moment with the built-in Django authentification.
I'm not sure if I'm just no
> The one thing left that I'd like to do is set up Django to run
> continuously, even when there are no http requests. My application
> runs a bunch of periodic background tasks in addition to serving up
> web content, and it seems that after a few minutes with no web
> activity, the app is term
Dear all,
Here is the excerpt of my urls.py
(r'^stocks_edit/(?P\d+)/?$', create_update.update_object,
dict(stock_information,
post_save_redirect="/")),
I can edit the object fine and I expect it to be redirected to
http://localhost/ but it keeps on getting redirected to
http://l
Hmm, it sure doesn't help .. i am still stuck here :(
Does this thing work for anyone else?
- @
On Nov 5, 7:02 pm, "Ronny Haryanto" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 6:30 PM, ammo <[EMAIL PROTECTED]> wrote:
> > I have a 'Country' model and I have set its 'verbose_plural_name'
On Nov 6, 4:00 pm, "DULMANDAKH Sukhbaatar" <[EMAIL PROTECTED]>
wrote:
> > The one thing left that I'd like to do is set up Django to run
> > continuously, even when there are no http requests. My application
> > runs a bunch of periodic background tasks in addition to serving up
> > web conten
On Wed, Nov 5, 2008 at 11:31 PM, ammo <[EMAIL PROTECTED]> wrote:
> Does this thing work for anyone else?
Well, it works fine for me when I use "verbose_name_plural", which is
the correct value and what's listed in the documentation (not
"verbose_plural_name" as you've typed here).
--
"Bureaucr
Hi everyone,
I'm needing to do some internationalization, but can't run
makemessages because I don't have xgettext. I'm running Mac OS X 10.5,
and can't seem to find an installer anywhere for this. I have found
gettext, but not xgettext.
Any help appreciated!
Brandon
--~--~-~--~~
Hi all,
I'm in the process of trying to write an Upload Progress Bar for my app.
I'm using the latest trunk version of Django, mod_python 3.3.1,
Memcached, Apache 2.2.8 prefork, and YUI 2.6.
I cannot seem to access the values stored in the cache during upload
(hoping to retrieve the 'upload
I was not able to successfully compile the latest version of the GNU
gettext tools (0.17) on OS X 10.5, but I was able to grab version
0.14.5-3 using Fink and now I can successfully run django-admin.py
makemessages.
Hope this helps someone!
On Nov 5, 11:43 pm, Brandon Taylor <[EMAIL PROTECTED]>
I'm sure I'm doing this wrong but can't really find an answer in the
docs or by searching.
I have two models (relative to this problem). One is called events,
one is called projects
a portion of models.py for projects looks like this:
from django.db import models
class AlphaEvent(models.Model)
It was typo here, 'verbose_plural_name' value in lowercase works.
Thanks :)
- @
On Nov 6, 10:40 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 11:31 PM, ammo <[EMAIL PROTECTED]> wrote:
> > Does this thing work for anyone else?
>
> Well, it works fine for me when I use "v
81 matches
Mail list logo