Re: Best practice for serving restricted or premium media

2010-04-20 Thread Graham Dumpleton
On Apr 21, 12:09 pm, Brad Buran wrote: > I'm currently researching Django as a potential framework for a web > application I am building.  We plan to make a variety of media (images > and videos) free on our website; however, we want to have some premium > media available only

how to inline formsets dynamically (key points)

2010-04-20 Thread Cesar Devera
hi. I'm working with inline formsets, and I plan to add them dynamically in my application. I did some tests and I found the following key points to handle: 1. my html must contain two hidden fields, named: myinlineformsetname_set-TOTAL_FORMS myinlineformsetname_set-INITIAL_FORMS 2. each new

Best practice for serving restricted or premium media

2010-04-20 Thread Brad Buran
I'm currently researching Django as a potential framework for a web application I am building. We plan to make a variety of media (images and videos) free on our website; however, we want to have some premium media available only when certain criteria are met (e.g. the logged-in user is of a

Why not Django with FastCGI?

2010-04-20 Thread Sven Svenson
I'm new to the Django world but it seems that FastCGI is not the preferred way to deploy a Django application. Why is that? I've had good success using FastCGI with Perl/Catalyst-based applications. Thanks. /sven -- You received this message because you are subscribed to the Google Groups

Re: "Error: cannot import name comments" during syncdb

2010-04-20 Thread Karen Tracey
On Tue, Apr 20, 2010 at 7:15 PM, Peter wrote: > Hi All, this is my first post so be gentle... > > I am getting the error, "Error: cannot import name comments" during > syncdb and validate. There's no traceback, just the above error > message, in red! I've the comments

"Error: cannot import name comments" during syncdb

2010-04-20 Thread Peter
Hi All, this is my first post so be gentle... I am getting the error, "Error: cannot import name comments" during syncdb and validate. There's no traceback, just the above error message, in red! I've the comments system in my apps for a while now, so that's not something new that would have

Re: Generate brochure pdf

2010-04-20 Thread cootetom
django and and pisa are great for creating PDF's because you can combine django's templating engine with pisa's HTML to PDF conversion. Pisa uses the reportlab tool kit. http://pypi.python.org/pypi/pisa/ Example: import ho.pisa as pisa import cStringIO as StringIO from django.template.loader

Re: feed decorator

2010-04-20 Thread Streamweaver
No insights? I'm still plugging away at it but it's not working for some reason. On Apr 18, 11:15 pm, Streamweaver wrote: > I'm having trouble developing a feed decorator. I feel like the > decorator I've come up with should work but isn't and I wanted to ask > if

Extending admin views?

2010-04-20 Thread When ideas fail
If i have an admin form and want to transform some data to another format using AJAX within the form, what is the best way to do this. In a normal form I can do this within the view but is there any way to extend admin views to add new functionality without loosing the default admin view

Extending admin views?

2010-04-20 Thread When ideas fail
If i have an admin form and want to transform some data to another format using AJAX within the form, what is the best way to do this. In a normal form I can do this within the view but is there any way to extend admin views to add new functionality without loosing the default admin view

Re: how to customizing fields in django’s comment app?

2010-04-20 Thread Dmitry Dzhus
Marconi wrote: > How can I customize the django builtin comment app so that the fields > url, email will be ignored and automatically populate the name with > the user's username since I'm only allowing comments from > authenticated users? Derive your own form from the builtin one, add a new

How to get to initial value in admin fieldset?

2010-04-20 Thread Rainy
I'm trying to customize admin template fieldset.html and I need to show field's value without widget. The loop there is: for line in fieldset | for field in line. The widget is shown like this: field.field. I tried field.initial, and various combinations; the only way I found to show dictionary of

Re: middleware question

2010-04-20 Thread Peter Landry
That will add a header to the http response, not an element to the text of the xml output. There may be an easier way to do what you want with a middleware, but the only thing I can think of is to basically prepend your desired xml header to the response text and create a new HttpResponse with

how to customizing fields in django’s comment app?

2010-04-20 Thread Marconi
How can I customize the django builtin comment app so that the fields url, email will be ignored and automatically populate the name with the user's username since I'm only allowing comments from authenticated users? -- You received this message because you are subscribed to the Google Groups

Re: Base template doesnt get the context

2010-04-20 Thread Thales
You're totally right. I had messed up because I had two template directorys, one in the project root and the other one in the app root. And both had the base.html, but one of them did not have the block categories. Thank you very much for your help. On 20 abr, 11:08, Adam Patterson

middleware question

2010-04-20 Thread Tim Arnold
Hi, I want to serve some raw xml files, but add a stylesheet to the response so the user can view it better. The raw xml begins like this: http://docbook.org/ns/docbook; version="5.0"> etc. I want to create some middleware to serve them like this: http://docbook.org/ns/docbook;

Generate brochure pdf

2010-04-20 Thread Alessandro Ronchi
I need to create some brochures on the fly (with texts and images with different position from my templates) in pdf with django. What's the best solution? Reportlab? I don't have any license problem (I can buy the software if it suites my needs), and I must generate quality pdf (for use in

Re: Saving many to many fields

2010-04-20 Thread Daxal
Haha.Sorrry. I was wondering since my form is made up of only manytomany fields it should even be POST request in the first place :S if the user were to see the form again, I want to be able to populate what he selected previously and be able to update it again (which I think should be an

Anyone using django with XMPP for bots or components?

2010-04-20 Thread Eric Chamberlain
We are looking at adding some realtime features to a project and we are exploring using XMPP for the communication method. Is anyone using django with SleekXMPP or any other XMPP library to make bots or components? -- Eric Chamberlain -- You received this message because you are subscribed

Re: Help with deployment

2010-04-20 Thread Laszlo Antal
Hi, Could you post your ess_wsgi.wsgi file? Thanks lzantal On Tue, Apr 20, 2010 at 9:32 AM, dononyx wrote: > I am a dip**it. I tried to move to mod_wsgi and dusted my website, can > anybody help me figure out what I've done. > NameVirtualHost *:80 > > > ServerName

Re: Saving many to many fields

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 5:28 PM, Daxal wrote: > Hi guys, > > I am trying to save manytomany fields in the database. > It's customary to ask a question.. Saving models: http://docs.djangoproject.com/en/1.1/ref/models/instances/#saving-objects Creating m2m links:

Help with deployment

2010-04-20 Thread dononyx
I am a dip**it. I tried to move to mod_wsgi and dusted my website, can anybody help me figure out what I've done. NameVirtualHost *:80 ServerName www.teachingbystandards.com ServerAlias teachingbystandards.com WSGIScriptAlias / /Library/WebServer/Documents/ess/apache/ ess_wsgi.wsgi

Saving many to many fields

2010-04-20 Thread Daxal
Hi guys, I am trying to save manytomany fields in the database. -- view --- def cvdetails(request, id): if request.method == 'POST': form = cvdbForm(request.POST) if form.is_valid(): *save functions here* request.flash.notice = "Save successful"

Re: creating formset with unknown number of unique forms

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 3:50 PM, Cody Django wrote: > the formset will contain an unknown series of questions.  Each > question contains a unique prompt, integerfield for the value, and a > choicefield with a unique list of items, based on the scope of the > question. > > I

Re: django signal and instace..... HELP!!

2010-04-20 Thread greatlemer
On Apr 20, 11:35 am, Allen Machary wrote: > Hellow.. > I have a problem on django signal and instances. > i have a right some code that runs a function after a certain model is > created but could not use the instace filter > > Help > > def send_sms_notifications(sender,

Re: Email Field

2010-04-20 Thread Shawn Milochik
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py If it's in models (django.db.models) then it's not in django.contrib, just FYI. As for overriding it, you can subclass it, for a start. Shawn On Apr 20, 2010, at 11:00 AM, CrabbyPete wrote: > Where in

Re: Email Field

2010-04-20 Thread ge...@aquarianhouse.com
did you try: email = models.EmailField(max_length=60) On Apr 20, 5:00 pm, CrabbyPete wrote: > Where in the django.contrib is the models.EmailField defined? I have > email address that are longer than 60 characters and I want to see if > I can override it. > > -- > You

Email Field

2010-04-20 Thread CrabbyPete
Where in the django.contrib is the models.EmailField defined? I have email address that are longer than 60 characters and I want to see if I can override it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Atamert Ölçgen
On Tuesday 20 April 2010 17:36:48 Russell Keith-Magee wrote: > Done. Thanks a lot. -- Saygılarımla, Atamert Ölçgen -+- --+ +++ www.muhuk.com mu...@jabber.org A: Because it messes up the order in which people normally read text. Q: Why is

creating formset with unknown number of unique forms

2010-04-20 Thread Cody Django
the formset will contain an unknown series of questions. Each question contains a unique prompt, integerfield for the value, and a choicefield with a unique list of items, based on the scope of the question. I would like to use a formset so I can iterate over each question in the template,

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Russell Keith-Magee
On Tue, Apr 20, 2010 at 10:26 PM, Atamert Ölçgen wrote: > On Tuesday 20 April 2010 16:22:58 Russell Keith-Magee wrote: >> Apologies if your mail has gone unanswered. I've just added your blog >> to the aggregator. > I, also, have sent two e-mails to Jacob regarding community

Re: Chase Paymentech

2010-04-20 Thread Bobby Roberts
Hey Bill - It is my understanding that as long as you do not store credit card information on your servers, PCI compliance is not an issue. Chase, Authorize.net, Paypal, ilovechecks.com etc all have API gateways to handle the transactions via https protocol which satisfies the industry financial

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Atamert Ölçgen
On Tuesday 20 April 2010 16:22:58 Russell Keith-Magee wrote: > Apologies if your mail has gone unanswered. I've just added your blog > to the aggregator. I, also, have sent two e-mails to Jacob regarding community agregator and got no response. Then I decided my blog was too horrible to bother

Re: Multiple instance of the same app

2010-04-20 Thread Bill Freeman
Why not add a "site" field to the model(s)? You can filter for the current site by hand, or have individual model managers for the various sites that you select at the top of the view (maybe in a decorator?). On Mon, Apr 19, 2010 at 1:49 PM, Kepioo wrote: > Hi Ben- i actually

Re: look at about-to-be-run query

2010-04-20 Thread Shawn Milochik
I'm sure there's a better answer than this, but if you need it immediately this get you what you're asking for. Create a custom manager for your class and just define filter() as below: class MyCustomManager(models.Manager): def filter(self, *args, **kwargs): queryset =

Re: Chase Paymentech

2010-04-20 Thread Bill Freeman
Beware! There are a number of security vulnerabilities you can have when handling credit card numbers. There is something called PCI (Payment Card Industry, if I'm not mistaken) compliance, the intent of which is to try to avoid some of the big credit card number stealing hacks that have been in

Re: Cross database join being forced

2010-04-20 Thread Francis Gulotta
Thanks! That worked like a charm. -Francis --- Francis Gulotta wiz...@roborooter.com On Tue, Apr 20, 2010 at 10:06 AM, Tom Evans wrote: > On Tue, Apr 20, 2010 at 3:01 PM, wizard wrote: > > I'm not sure if this is a bug or an example of not

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Jonatan Heyman
Great, thanks :)! No worries, I understand that you have a lot of other stuff to do - like developing a great web framework :). /jonatan On Apr 20, 3:22 pm, Russell Keith-Magee wrote: > On Tue, Apr 20, 2010 at 9:21 PM, Russell Keith-Magee > >

modelForm ordering

2010-04-20 Thread darren
I am not able to figure out how to order the records that fill the drop down list in a model form. On line 112 below, I have attempted to order the Rotation model by player. But, the drop down list that is created for me is not ordered that way. I also tried relocating line 112 to within the

Re: Base template doesnt get the context

2010-04-20 Thread Adam Patterson
the base template should have access to the context. you are doing something wrong. sorry thats not helpful but i do what you are trying to do all the time. simplify the template. you sure its not categories_list or object_list or even category_list instead of categories. On Tue, Apr 20, 2010

Re: Cross database join being forced

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 3:01 PM, wizard wrote: > I'm not sure if this is a bug or an example of not understanding the > documentation. > > I have two models in two different databases. I have a router. I'm > trying to get a list of customers from one model (about 30 records

Re: Attribute in model not in database

2010-04-20 Thread Francis Gulotta
Since it's not a django field it wont be stored in the database and wont be persisted between requests. It does seem to be accecpted practice however to use variables in your classes for your own uses. Your list will be available to all your own functions and views like you would expect. -Francis

look at about-to-be-run query

2010-04-20 Thread Jim
Hello. I have a query that is failing and I'd like to look at it. (I'm trying to do full-text searches in postgresql 8.2, so I'm using extra with both select and where clauses, so it is reasonably complex). I know how to see prior queries with connection.queries. But is there a way to get the

Cross database join being forced

2010-04-20 Thread wizard
I'm not sure if this is a bug or an example of not understanding the documentation. I have two models in two different databases. I have a router. I'm trying to get a list of customers from one model (about 30 records worth) and filter for records with that customer in the the other. Here are my

Attribute in model not in database

2010-04-20 Thread Odd
I have this model: class MyModel(models.Model): name = models.CharField(max_length=100) myList=[] If I add values to myList, for how long will it be available there? Is this a bad approach? Thanks! Odd-R. -- You received this message because you are subscribed to the Google

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Russell Keith-Magee
On Tue, Apr 20, 2010 at 9:21 PM, Russell Keith-Magee wrote: > On Tue, Apr 20, 2010 at 3:48 PM, Jonatan Heyman wrote: >> Hi! >> >> I wonder how to go about to get your blog included in the Django >> community aggregator? I've written one Django post so

Re: Getting a Blog included in the Django community aggregator

2010-04-20 Thread Russell Keith-Magee
On Tue, Apr 20, 2010 at 3:48 PM, Jonatan Heyman wrote: > Hi! > > I wonder how to go about to get your blog included in the Django > community aggregator? I've written one Django post so far, and have > two other posts laying in the pipeline to be posted. I've sent an e- >

Is there any way to create char data type in django.

2010-04-20 Thread Huang Stanley
Hi all: I try to find all fields but only IPAddressField is char data type, but it's a fix-length char data type for 15 characters. Is there any field that I can use for this purpose. PS. I use django 1.2 beta 1 on Ubuntu. Thanks for your kindly assistance. regards, Stanley Huang -- You

django signal and instace..... HELP!!

2010-04-20 Thread Allen Machary
Hellow.. I have a problem on django signal and instances. i have a right some code that runs a function after a certain model is created but could not use the instace filter Help def send_sms_notifications(sender, instance, created, **kwargs): #get sender, instance, created # TODO: Lookup

Getting a Blog included in the Django community aggregator

2010-04-20 Thread Jonatan Heyman
Hi! I wonder how to go about to get your blog included in the Django community aggregator? I've written one Django post so far, and have two other posts laying in the pipeline to be posted. I've sent an e- mail to jacob at jacobian, as stated on the community page, twice with about two months in

Re: Base template doesnt get the context

2010-04-20 Thread Thales
The other templates doesnt override the categories block... Its just like: {% extends "base.html" %} {% block content %} some content here {% endblock %} I mean, the base template should be receiving the context? Or do I have to find another solution? I could put a include on the base template

broken pipe and javascript xmlhttprequest

2010-04-20 Thread }--o
Hi, could someone explain me why do I get a broken pipe when I call some urls asynchronously from javascript, but works fine for synchronous calls? I use django-piston to create a simple read api that I call using something like var req = new XMLHttpRequest(); req.open('GET',

Re: where I can find good django video tutorial?

2010-04-20 Thread Adnan Sadzak
Hi Hussain, You can find some django videos here: http://showmedo.com/videotutorials/django Adnan On Tue, Apr 20, 2010 at 9:29 AM, Hussain Deikna wrote: > Hi , relay I am very happy to enjoy this group , I need some help, I am > new in using django and I am glad to use

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
Thanks Tom, it's exactly what I was looking for. Cheers, Alan On Apr 20, 9:54 am, Tom Evans wrote: > On Tue, Apr 20, 2010 at 8:57 AM, Alan wrote: > > I will try a partial answer to myself. > > > I notice in httpd.conf that alias has the same

Re: 'ModelChoiceField' object has no attribute 'objects'

2010-04-20 Thread victor
thx,i really ignored the problem. further study need for me. On Apr 20, 5:06 pm, Tom Evans wrote: > On Tue, Apr 20, 2010 at 10:01 AM, victor wrote: > > i have a model and relative form as following: > > class contactTitleForm(forms.ModelForm): > >    

Re: Admin inline extra field

2010-04-20 Thread derek
On Apr 19, 2:07 am, nulvinge wrote: > I managed to solve it. > > part of my model was: > class Hour(models.Model): >     store   = models.ForeignKey('Store', unique=True) > > And it shouldn't have been unique. > Hmm, maybe there should be some warning message to clarify this or

Re: 'ModelChoiceField' object has no attribute 'objects'

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 10:01 AM, victor wrote: > i have a model and relative form as following: > class contactTitleForm(forms.ModelForm): >    titleType = forms.ChoiceField(label=_('Title Type'), choices = > contact_property_type.items(), >

'ModelChoiceField' object has no attribute 'objects'

2010-04-20 Thread victor
i have a model and relative form as following: class contactTitleForm(forms.ModelForm): titleType = forms.ChoiceField(label=_('Title Type'), choices = contact_property_type.items(), widget=forms.Select(attrs={'class':'mustin {required:true}'})) contact =

Re: link not in urls.py but showing folders content

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 8:57 AM, Alan wrote: > I will try a partial answer to myself. > > I notice in httpd.conf that alias has the same name for the folder re > outputs. So if I go to http://localhost/target/ (re uploads), this will > show the files in the folder uploads.

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
I will try a partial answer to myself. I notice in httpd.conf that alias has the same name for the folder re outputs. So if I go to http://localhost/target/ (re uploads), this will show the files in the folder uploads. Fine. But still, I don't want this behaviour, I mean, I do what to refer to

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
I will try a partial answer to myself. I notice in httpd.conf that alias has the same name for the folder re outputs. So if I go to http://localhost/target/ (re uploads), this will show the files in the folder uploads. Fine. But still, I don't want this behaviour, I mean, I do what to refer to

Re: Django - Java RPC?

2010-04-20 Thread jani.mono...@gmail.com
> > >http://code.google.com/p/modwsgi/wiki/IssuesWithPickleModule > > You are misunderstanding the mod_wsgi documentation. That only applies > to data types specified inside the actual WSGI script file. It doesn't > apply to data types specified elsewhere in standard Python modules. > > In

link not in urls.py but showing folders content

2010-04-20 Thread Alan
Hi there, It's a project started almost 2 years ago, and now we are doing some improvements. However, by chance I found something very bizarre. Let's say my site url is "http://localhost/;. I have to "folders" 'uploads' and 'outputs' that are giving the permissions in my httpd.conf file and for

where I can find good django video tutorial?

2010-04-20 Thread Hussain Deikna
Hi , relay I am very happy to enjoy this group , I need some help, I am new in using django and I am glad to use it, but relay I want to understand django from a-z and from A-Z , I need if some one know where I can find good django video tutorial , thank you for your attention ,bye -- You

Re: I need django open-source project to newspaper

2010-04-20 Thread Hussain Deikna
Hi, Thank you so much, for your attention. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Here is a tutorial for adding a plus sign for custom dropdown box in custom admin pages

2010-04-20 Thread Asim Yuksel
If you registered your models with adminCreate a widgets.py and put the following code there from django.template.loader import render_to_string from ivl.views import * def SelectWidgetWithPopUp(url): class SelectWithPopUp(forms.Select): def render(self, name, *args, **kwargs):