Re: effective adding records in Django site admin

2011-10-05 Thread veva...@yandex.ru
Thank You very much! Adding option "save_as = True" to ModelAdmin subclass is exactly what I need. On 4 окт, 13:01, Thomas Orozco wrote: > Regarding your first question, the admin save_as field does exactly this. > Le 4 oct. 2011 07:01, "veva...@yandex.ru" a écrit : -- You received this messag

Re: effective adding records in Django site admin

2011-10-05 Thread veva...@yandex.ru
Thank You very much! Tell me please what directory is to be used to place such extensions On 4 окт, 12:02, Ilian Iliev wrote: > Hi, > > you can always create custom admin page for your models by extending > the default admin. > > -- > eng. Ilian Iliev > Web Software Developer > > Mobile: +359 88

Re: Report tool is supported for django .

2011-10-05 Thread Le Huu Nghia
Thanks so much for your help. On Tue, Oct 4, 2011 at 6:35 PM, BILLION Sébastien < sebastien.bill...@gmail.com> wrote: > Here: > > https://docs.djangoproject.com/en/dev/howto/outputting-pdf/ > > > > BILLION Sébastien > > the Answer to the ultimate question of life, the universe and everything is

Re: Iteration over queryset in a model

2011-10-05 Thread Daniel Roseman
On Wednesday, 5 October 2011 01:27:54 UTC+1, eyscooby wrote: > > new to django/python developement, can't get this one figured out. > > I have a model that has a couple DateFields (issued_date & > completion_date), and I'm trying to return a value with the difference > of the two on each entry

Re: (argh!!) Fwd: Undelivered Mail Returned to Sender

2011-10-05 Thread Kurtis Mullins
+1 Thanks for the fix :) On Tue, Oct 4, 2011 at 9:13 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Nice one - thank you for sorting this out Russell, was driving me a bit > nuts! > On Oct 5, 2011 1:26 AM, "Russell Keith-Magee" > wrote: > > On Wed, Oct 5,

encrypt and decrypt data in django.

2011-10-05 Thread Le Huu Nghia
Dear All, i want to create a table to store information of user , That includes (username , password, ...) this table must be diffrent from admin table. (ex some personal info so on) can you give me an advice which lib of django to encrypt and decrypt , look like the table admin of django.

setting site-name variable

2011-10-05 Thread ANU
1. Can one set "site-name" variable in __init__.py file? How? 2. Is there any method to set globally "site-name" variable so that in the app, no further setting for this variable is needed? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Calling Jython from python script

2011-10-05 Thread Rohini Damle
Hello, I am using python, mod-wsgi, django, apache combination. My views.py script calls a set of python scripts. I also want to call some jython scripts. For this I use cmd " jython script-name" . This works great on django's development server. But on apache, with wsgi, the views.py simply does n

Using Django admin DateTime widget in my app

2011-10-05 Thread Sachin Gupta
Hello Everyone I am totally new to Django and am finding it a fun experience to learn. Actually I need to make a form where I have to accept Date and Time for some sort of appointment. Django admin already has this widget. Will it be possible for me to use that directly? I read in an article t

retrieving data from Cache

2011-10-05 Thread himabindu
HI, I have an issue in django framework. I was trying to develop a progress bar for my application, where the progress depends on files retrieved from the cache. But iam not able to retrieve the files from the cache. CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends

Registering a model in the admin

2011-10-05 Thread Haffi
Hi, I'm registering a new model in the admin but it just won't show up. I'm doing this in production, I added the model to models.py and mirrored the changes in the DB. I registered it in admin.py just as all the other models and restarted Apache but it won't show up and if I try the URL it's suppo

Re: retrieving data from Cache

2011-10-05 Thread Daniel Roseman
On Wednesday, 5 October 2011 09:51:11 UTC+1, himabindu wrote: > > HI, > > I have an issue in django framework. I was trying to develop a > progress bar for my application, where the progress depends on files > retrieved from the cache. But iam not able to retrieve the files from > the cache

Re: Two django apps (models) using same table

2011-10-05 Thread Konstantinos Pachnis
I believe you could also use proxy models in that case. Have a look at https://docs.djangoproject.com/en/1.3/topics/db/models/#proxy-models -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://group

Combining Querysets from different, but similar models

2011-10-05 Thread Steven Smith
I'm working on a site that has a requirement for a "recent activity" feed on the homepage. Usually, I'd just do a MyFoo.objects.order_by('- created') and all would be well. But "activity" is actually from several models. They all have some fields in common, like the timestamp, since they all have t

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Shawn Milochik
Could it be the ADMIN_MEDIA_PREFIX setting? -- 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+unsubscr...@googlegroups.

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Kurtis
I'll give that a shot. I pushed my bucket to the CDN and tried to set that URL manually using: STATIC_URL = 'http://kurtis.s3.amazonaws.com/' Unfortunately, it's still trying to use /static/... Hopefully your idea will work. Thanks! On Oct 5, 9:54 am, Shawn Milochik wrote: > Could it be the ADM

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Kurtis
Okay, two things. 1. I saw I was potentionally using the wrong URL. I believe it should be my CDN URL. Correct me if I'm wrong but the right URL *should* be along the lines of: http://dw2u7t9lse636.cloudfront.net/ 2. I included that ADMIN_MEDIA_PREFIX setting and it did update the URLs for Admin

Re: Thread-safeness of templates

2011-10-05 Thread Brian Bouterse
To add to your example. Default arguments are parsed once by the interpreter, not each time the program is run. Most folks don't desire side effects like this. One way to avoid it is to only use immutable typesin python as keyword arguments (True,

Question about Template

2011-10-05 Thread Tsung-Hsien
I want to put pictures on website and to let each row shows only four pictures, but I write the template which shows each pictures in the same row. the loop within the , I think it should include and add if syntax to do that. How to write the syntax? thanks! {% load static %} {% get_static_prefix

Re: Question about Template

2011-10-05 Thread Tom Evans
On Wed, Oct 5, 2011 at 3:09 PM, Tsung-Hsien wrote: > I want to put pictures on website and to let each row shows only four > pictures, but I write the template which shows each pictures in the > same row. > the loop within the , I think it should include and add if > syntax to do that. > How to w

TimedThrottleFilter: Django logging filter to throttle logging

2011-10-05 Thread Michael Manfre
I recently encountered the problem of underlying IO issues triggering gigs of repeated logs that were compounded by the extra logging. To help improve the signal to noise ratio of the logs and prevent the downward spiral of IO issues causing logging that cause more IO issues, I created a logging fi

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Kurtis
Okay I figured it out. Another slip of mind on my part :) I had to change my CDN url to include '/admin/' since that's the subdirectory my admin media is uploaded to. On Oct 5, 10:07 am, Kurtis wrote: > Okay, two things. > > 1. I saw I was potentionally using the wrong URL. I believe it should >

TemplateView compatible with permission_required decorator?

2011-10-05 Thread Victor Hooi
Hi, I'm attempting to use one of the new class-based TemplateView with the permission_required decorator: @permission_required('foo.count_peas') class Pea(TemplateView): template_name = "pea.html" However, when I do that, I get an error: Exception Type: AttributeError at /someurl/ Exceptio

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread creecode
Hello Kurtis, On Wednesday, October 5, 2011 7:07:16 AM UTC-7, Kurtis wrote: > Unfortunately, and this is probably an issue with Amazon -- I get a an > access denied error when I try to access my files. For example: > > http://dw2u7t9lse636.cloudfront.net/css/base.css That response is most

template designer needed

2011-10-05 Thread ApogeeGMail
Good Morning: I am looking for a Django template designer for a very short project. I will need 5 pages, the design is done( using Photoshop). I will need a set of templates to implement the layouts. I will provide the graphic elements. Please contact me off list. Thanks. Richard Smith mail

Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Chris G
I want to create a simple data entry form on a web page that shows all the columns of a database across the page (there aren't many columns, they will fit!) and a number of rows down the page. I.e. I want a data entry form that looks like MS Access 'tabular' format, as follows:- Col1Row1C

Permission_require decorator, and redirecting to Login Page

2011-10-05 Thread Victor Hooi
heya, I'm using the permission-required decorator with the inbuilt login view. When I login as a user who has the appropriate permissions, it logs in fine, and all is good. When I try to login as a user with valid credentials but lacking the appropriate permission, it simply keeps redirecting

Re: Combining Querysets from different, but similar models

2011-10-05 Thread Javier Guerra Giraldez
On Wed, Oct 5, 2011 at 8:37 AM, Steven Smith wrote: > What's the cheapest way to do my queries and mix the results into one > feed? I'd say to do it in Python. a simpler case: you have two querysets and want a single 'feed' with results of one query followed by the other: from itertools imp

Re: Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Brett Epps
Hi Chris, Once you've defined a model for your data, you can use a ModelForm [1] to automatically generate a form for that model. You might also want to check out the admin site [2], which displays data in a tabular format similar to what you describe. 1. https://docs.djangoproject.com/en/dev/to

Re: Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Daniel Roseman
On Wednesday, 5 October 2011 15:44:23 UTC+1, Chris Green wrote: > > I want to create a simple data entry form on a web page that shows all > the columns of a database across the page (there aren't many columns, > they will fit!) and a number of rows down the page. > > I.e. I want a data entry form

Re: Combining Querysets from different, but similar models

2011-10-05 Thread Brett Epps
I had a similar need and solved it with a separate table of activity feed items. Here's the code for the Item model: class Item(models.Model): object_id = models.PositiveIntegerField(db_index=True) content_type = models.ForeignKey(ContentType) content_object = generic

Re: Registering a model in the admin

2011-10-05 Thread Brett Epps
Could you show us the contents of your admin.py file? Did you remember to call admin.site.register(ModelClass, ModelClassAdmin) for that model? Brett On 10/5/11 6:09 AM, "Haffi" wrote: >Hi, I'm registering a new model in the admin but it just won't show >up. I'm doing this in production, I ad

Alternative to Decorators for Class-Based View

2011-10-05 Thread Kurtis
Hey, What's the best way to go about doing things for class-based views such as requiring logins? In the function-based views it was easy to use decorators. Should I just replace the functionality that I would previously have put into decorators into abstract classes that I extend? If so, can som

Re: encrypt and decrypt data in django.

2011-10-05 Thread Brett Epps
Hi Nghia, The common pattern is to extend django.contrib.auth.models.User by creating your own "profile" model with the fields you need [1]. Then you can set the AUTH_PROFILE_MODULE setting and access the profile from User objects through the User.get_profile method. The Python standard libra

Re: effective adding records in Django site admin

2011-10-05 Thread shacker
If you want the ability to make copies of multiple records at once, or just want the "copy" option to appear at the top of the object list instead of having to click through into each record, it's pretty easy to set up an Admin Action. Here's one I use in a system that lets staffers duplicate C

Re: setting site-name variable

2011-10-05 Thread Brett Epps
Which "site-name" variable are you referring to? Usually you'll want to place global settings in your settings.py file. Then you can access them elsewhere like this: from django.conf import settings print settings.[name of setting] Also, you might be interested in the sites framework [1], which

Re: template designer needed

2011-10-05 Thread David Koblas
Have you considered 99designs? --david On 10/5/11 7:38 AM, ApogeeGMail wrote: Good Morning: I am looking for a Django template designer for a very short project. I will need 5 pages, the design is done( using Photoshop). I will need a set of templates to implement the layouts. I will provi

Re: Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 03:13:08PM +, Brett Epps wrote: > Hi Chris, > > Once you've defined a model for your data, you can use a ModelForm [1] to > automatically generate a form for that model. > > You might also want to check out the admin site [2], which displays data > in a tabular format

Re: template designer needed

2011-10-05 Thread ApogeeGMail
David: I did not. I did just look at the site. I am not sure this would work. I already have a design, which the team has approved. I just need the templates for DJango. Richard On Oct 5, 2011, at 11:44 AM, David Koblas wrote: > Have you considered 99designs? > > --david > > On 10/5/11 7:38

Re: template designer needed

2011-10-05 Thread NISA BALAKRISHNAN
david: send me the design. r u checking someone for slicing psd to html or is it just to design the template structure- the division of base templates and their inheritance for the ones that extend. On Wed, Oct 5, 2011 at 9:43 PM, ApogeeGMail wrote: > David: > > I did not. I did just look at the

Re: Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Andre Terra
I've only skimmed this thread, but I recommend django-form-utils[1] if what you want is to write nicely formatted forms with little to no headache at all. [1] https://bitbucket.org/carljm/django-form-utils/overview Cheers, AT On Wed, Oct 5, 2011 at 1:05 PM, Chris G wrote: > On Wed, Oct 05, 20

Re: Randomly clearing database tables

2011-10-05 Thread Ian Kelly
On Tue, Oct 4, 2011 at 2:28 PM, msbuck wrote: > Below is the settings. I am fairly new to python unit testing so my > understanding of things could be better. But right now, if I select > Run As -> Python Unit Test will my project is selected, it runs all of > my Django tests and clobbers my worki

Re: Alternative to Decorators for Class-Based View

2011-10-05 Thread Dan Gentry
In the docs there a paragraph or two about this. Basically, one must decorate the dispatch method instead. See this link for the details. https://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-the-class Good luck! On Oct 5, 11:42 am, Kurtis wrote: > Hey, > > What's the bes

Re: TemplateView compatible with permission_required decorator?

2011-10-05 Thread Dan Gentry
Instead, you should decorate the dispatch method in the class-based view. See the docs here: https://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-the-class On Oct 5, 10:27 am, Victor Hooi wrote: > Hi, > > I'm attempting to use one of the new class-based TemplateView with

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Andre Terra
I may be dreaming, but IIRC ADMIN_MEDIA_PREFIX is on its way to deprecation, so some googling might be in order. Cheers, AT On Wed, Oct 5, 2011 at 11:07 AM, Kurtis wrote: > Okay, two things. > > 1. I saw I was potentionally using the wrong URL. I believe it should > be my CDN URL. Correct me i

Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread Micky Hulse
Not sure if this will be of any help, but I switched from django-storages to this: I switched mostly because SORL was not working well with my S3 buckets... CuddlyBuddly has this:

Re: Calling Jython from python script

2011-10-05 Thread Bill Freeman
Have you tried using the full path for both jython and for the script? Does jython also need classpath set up? Maybe you should provide the full path to a shell script that sets up the path, the class path and cd's to where the script is, then does: jython script-name Are you sure that you wa

Re: Calling Jython from python script

2011-10-05 Thread Charles Cossé
Doubt I can be much help, but are you running via os.system("jythong ...")? If so, then I'd substitute something else (python itself?) for jython and confirm that that much works .. then carry on ... -Charles On Wed, Oct 5, 2011 at 12:54 PM, Bill Freeman wrote: > Have you tried using the full p

Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
I'm an experienced programmer (started around 1971 or so!) and I've done lots of things over the years, much of my background is in Unix (Solaris). In the last few years I have done quite a lot of web related stuff. I'm trying to get my mind round django. I have it installed on my unbuntu server,

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Cal Leeming [Simplicity Media Ltd]
Hi Chris, I'm assuming that you don't have any experience with Python?? Also - have you read the intro overview, as that pretty much answers your questions, unless I'm missing something https://docs.djangoproject.com/en/1.3/intro/overview/ Cal On Wed, Oct 5, 2011 at 8:55 PM, Chris G wrote: >

Re: encrypt and decrypt data in django.

2011-10-05 Thread arapaho
The docs say to set up a table with a one-to-one relationship to the admin user table On Oct 5, 7:34 am, Le Huu Nghia wrote: > Dear All, > > i want to create a table to store information of user , > That includes (username , password, ...)  this table must be diffrent > from admin table. > (e

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Yaşar Arabacı
This documentation goes over deployment of django: https://docs.djangoproject.com/en/1.3/howto/deployment/ 2011/10/5 Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> > Hi Chris, > > I'm assuming that you don't have any experience with Python?? > > Also - have you read th

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Javier Guerra Giraldez
On Wed, Oct 5, 2011 at 2:55 PM, Chris G wrote: > I'm trying to get my mind round django.  I have it installed on my > unbuntu server, it works, I've worked through tutorials 1 and 2 and a > bit of 3.  I can get the admin screens up and the basics of the polls > example work. just finish the tutor

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Ivan Ivanov
На Wed, 5 Oct 2011 15:02:13 -0500 Javier Guerra Giraldez написа: > about how to write, check the paragraph about the MTV architecture: If you are familier with MVC (Model, View, Controller), MTV is the same but with different component names. -- You received this message because you are subscr

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Javier Guerra Giraldez
On Wed, Oct 5, 2011 at 3:20 PM, Ivan Ivanov wrote: >> about how to write, check the paragraph about the MTV architecture: > > If you are familier with MVC (Model, View, Controller), MTV is the same > but with different component names. sorry, but no. a Django view is way different from an MVC vi

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Peter Herndon
On Oct 5, 2011, at 3:55 PM, Chris G wrote: > > However two rather basic things still elude me:- > >Where/how do I actually start creating the top level/page of a web >site? Do I just open vi and create some HTML and embed django >code? That seems unlikely but I can't see anywhere

Tizicjxzajhkztxz

2011-10-05 Thread Simone Dalla
U  -- Simone Dalla Responsabile Servizi Informatici Comune di Zola Predosa tel. 0516161662 cel. 3290179546 email: sda...@comune.zolapredosa.bo.it skype: simone.dalla -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 08:58:10PM +0100, Cal Leeming [Simplicity Media Ltd] wrote: >Hi Chris, >I'm assuming that you don't have any experience with Python?? No/yes, I *do* have Python experience, it's my language of choice for scripts which require a bit more than basic shell scripting.

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 11:02:03PM +0300, Yaşar Arabacı wrote: >This documentation goes over deployment of >django: [1]https://docs.djangoproject.com/en/1.3/howto/deployment/ > Ah, brilliant, thanks, that certainly answers my question about how to use it with apache. -- Chris Green --

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 03:02:13PM -0500, Javier Guerra Giraldez wrote: > On Wed, Oct 5, 2011 at 2:55 PM, Chris G wrote: > > I'm trying to get my mind round django.  I have it installed on my > > unbuntu server, it works, I've worked through tutorials 1 and 2 and a > > bit of 3.  I can get the adm

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote: > > On Oct 5, 2011, at 3:55 PM, Chris G wrote: > > > > However two rather basic things still elude me:- > > > >Where/how do I actually start creating the top level/page of a web > >site? Do I just open vi and create some HT

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Kurtis Mullins
I just wanted to put my 2 cents in. #django on Freenode is a great place to get real-time help with simple questions. On Oct 5, 2011, at 6:02 PM, Chris G wrote: > On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote: >> >> On Oct 5, 2011, at 3:55 PM, Chris G wrote: >>> >>> However tw

Re: [Django 1.3] django.views.generic.TemplateView example

2011-10-05 Thread Micky Hulse
Ack! Russ, I missed this e-mail! I am so sorry for the late reply! Thanks so much for helping me out, I really appreciate it. :) On Fri, Sep 30, 2011 at 9:08 PM, Russell Keith-Magee wrote: > There's no need to subclass TemplateView and provide your own implementation > of get_context_data() - th

Earn 25$ to add Email Notification support to Django-Userena

2011-10-05 Thread Rich Jones
Hey all! I've opened a 25$ gig on Gun.io to add Email Notification support to Django-Userena. First person to get a pull request accepted will earn the money! http://gun.io/open/11/add-email-notifcations-to-django-userena-umessages Thought you guys might be interested in earning a quick bit of m

@transaction.commit_on_success, not getting expected results

2011-10-05 Thread robinne
Based on Django 1.3 documentation for transactions, it seems you can have all or nothing updates of database calls within a view. I am not getting the expected behavior and it seems there must be an "autocommit" global setting somewhere that I need to set to false. Does anyone know of such a settin

Django image upload

2011-10-05 Thread Ian
Hey Everyone, I'm new to django, but I love it so far! I'm trying to figure out how to upload an image (restrict it to images only) and resave it as a different name. Eventually, I'll want to upload it to S3, but for now, I'm just testing it on my computer with runserver (so I'm not sure where it

Re: @transaction.commit_on_success, not getting expected results

2011-10-05 Thread Javier Guerra Giraldez
On Wed, Oct 5, 2011 at 8:15 PM, robinne wrote: > @transaction.commit_on_success > def Test(request): >    try: >        member = request.user.get_profile() >        Credit.objects.create(CreditDate=datetime.datetime.now(), > Member=member, CreditAmount=25) >        Credit.objects.create(CreditDate

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread kenneth gonsalves
On Wed, 2011-10-05 at 23:02 +0100, Chris G wrote: > OK, so there isn't a single simple answer. However it would still be > really nice to see a complete two or three page django site with a > database behind it fully implemented as an example. > > this is as simple as it gets https://bitbucket.

post_add signal for non m2m

2011-10-05 Thread bino oetomo
Dear All .. I read https://docs.djangoproject.com/en/1.2/topics/signals/ Looks like there is no "post_add" signal can be catched by listener function. Is that true ? I need to do some jobs each time a record is added to a model. This model is not m2m, it's just a parent or child of one-2-many