Re: Announcement: django-quickview 0.3 - putting the nitro in rapid web development

2013-02-28 Thread Thomas Weholt
Packaging python is hard!! Fixed the problem now. pip install django-quickview works. Sorry. Thomas On Thu, Feb 28, 2013 at 5:03 AM, Bino Oetomo wrote: > > > On Feb 28, 2:39 am, Thomas Weholt wrote: >> >> Documentation and tutorial >> athttps://bitbucket.org/weholt/django-quickview/src/fde97

Re: StreamingHttpResponse into a Template

2013-02-28 Thread Stefano Tranquillini
Yes, you are perfectly right about the fact that this is a bad implementation. the fact is that where i host the code it does not support celery (so far). so i've to find out a workaround to be able to process a bunch of external APIs Call (that include the one for sending email). we'll probabl

Use variable in my template?

2013-02-28 Thread Maria
Hello everyone, I have a variable I want to have access to in my Django template. But somehow I can't manage to do that. I got *Django/mytemplates/polls/detail.html (template) *where I want to insert an image: > {% load staticfiles %} > > > > media="screen" /> > > > > > and

IntegrityError after updating to custom user field: django_admin_log still has fk to auth_user

2013-02-28 Thread Ben Roberts
This ring any bells? I updated my existing site to utilize my new Django 1.5 custom user field, and now I can't update anything in Admin because i get the following error: (django_admin_log still has a fk to auth_user, apparently!) Any way to resolve this? Traceback (most recent call last):

Does Django support general reusable UI widgets?

2013-02-28 Thread Dong Wang
It seems "django.forms.widgets" is designed to support only reusable input widgets used in forms, does Django support general reusable UI widgets like tornado.web.UIModule ? Thanks, Dong -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: default filtering model admin (crud) using user obj attribute

2013-02-28 Thread Bino Oetomo
On Thursday, February 28, 2013 2:37:54 PM UTC+7, Bino Oetomo wrote: > > My question is how to make : > 1. Car list : Only show cars with company_id=myuser.company_id > Question #1 is solved > 2. Create/Update : 'Company choice list' locked to the one with > value=myuser.company_id > I Found

problem in displaying data on html

2013-02-28 Thread Avnesh Shakya
hi i have one problem, i want to display data from database on html page all data is displaying but one attribute(university name) which i defined as models.ManyToManyField(University) is not being displyed, it's not generating error but it showing msz on html page- instead of showing universi

Re: problem in displaying data on html

2013-02-28 Thread Roberto López López
If you just output a m2m field that's normal. If you rather prefer to iterate over it and show all the related objects, use a for loop... On 02/28/2013 02:43 PM, Avnesh Shakya wrote: > hi i have one problem, i want to display data from database on html page > all data is displaying but one attri

Re: Use variable in my template?

2013-02-28 Thread Roberto López López
I don't understand exactly what do you mean, but if those images are uploaded by the user (for example, using the admin app), they should be "{{ MEDIA_URL }}{{ marke.marke }}" instead of "{{ STATIC_URL }}images/{{ marke.marke }}.jpg" On 02/28/2013 12:06 PM, Maria wrote: > Hello everyone, > >

Re: Use variable in my template?

2013-02-28 Thread Roberto López López
of course, your model should be something like this: class Marke(models.Model): marke = models.ImageField(upload_to="images/") or wherever you prefer to put your images into the media folder On 02/28/2013 12:06 PM, Maria wrote: > Hello everyone, > > I have a variable I want to have

Re: Does Django support general reusable UI widgets?

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 10:46 AM, Dong Wang wrote: > It seems "django.forms.widgets" is designed to support only reusable input > widgets used in forms, does Django support general reusable UI widgets like > tornado.web.UIModule ? > Yes, Django allows you to define custom template tags that can d

Problem with two databases

2013-02-28 Thread MoonWolf
I'm making simple application to manage equipment. I've used django-ldapdb (http://opensource.bolloretelecom.eu/projects/django-ldapdb/) for user management (not for authentication, for which i'm using PAM). After heavy googling i've managed to connect all this together - LDAP as second databa

Re: default filtering model admin (crud) using user obj attribute

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 7:37 AM, Bino Oetomo wrote: > Dear All.. > > Currently I have custom authentication backend, > This backend return user-object with additional attributes > > START > Python 2.7.3 (default, Aug 1 2012, 05:16:07) > [GCC 4.6.3] on linux2 > Type "help", "copyri

Re: Problem with two databases

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 1:45 PM, MoonWolf wrote: > I'm making simple application to manage equipment. I've > used django-ldapdb > (http://opensource.bolloretelecom.eu/projects/django-ldapdb/) for user > management (not for authentication, for which i'm using PAM). After > heavy googling i've manag

Re: Use variable in my template?

2013-02-28 Thread Maria
No I dont have a problem to find the images, i already used a variable to insert images from the static folder. Its just that I cant use my "marke" variable because it is in an external .py file and I would like to learn how to use that external variable in my template. On Thursday, February 28

Re: Use variable in my template?

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 2:40 PM, Maria wrote: > No I dont have a problem to find the images, i already used a variable to > insert images from the static folder. Its just that I cant use my "marke" > variable because it is in an external .py file and I would like to learn how > to use that externa

Re: Announcement: django-quickview 0.3 - putting the nitro in rapid web development

2013-02-28 Thread Tom Evans
On Wed, Feb 27, 2013 at 7:39 PM, Thomas Weholt wrote: > pypi : https://pypi.python.org/pypi/django-quickview/ > Source at https://bitbucket.org/weholt/django-quickview > > Documentation and tutorial at > https://bitbucket.org/weholt/django-quickview/src/fde97a0a0befaeda0ab2317035f8e7cd9c311511/doc

Re: Use variable in my template?

2013-02-28 Thread Bill Freeman
To make a variable visible in a template you must explicitly add it to the template context. In the traditional function based view you pass a Context or RequestContext instance to the template renderer or shortcut. The constructor for the context accepts a mapping (e.g.: a dict) whose keys are th

Re: I need a form that allows users to select from a list of choices, or add a new choice.

2013-02-28 Thread Mark London
Great. Thanks very much! On Wednesday, February 27, 2013 6:13:05 PM UTC-5, Rainy wrote: > > > > > On Wednesday, February 27, 2013 11:28:50 AM UTC-5, Mark London wrote: >> >> I need a widget or a method that allows users to select items from a list >> of choices, or add a new choice. Someone on

Re: Announcement: django-quickview 0.3 - putting the nitro in rapid web development

2013-02-28 Thread Thomas Weholt
On Thu, Feb 28, 2013 at 4:10 PM, Tom Evans wrote: > On Wed, Feb 27, 2013 at 7:39 PM, Thomas Weholt > wrote: >> pypi : https://pypi.python.org/pypi/django-quickview/ >> Source at https://bitbucket.org/weholt/django-quickview >> >> Documentation and tutorial at >> https://bitbucket.org/weholt/djan

Re: Use variable in my template?

2013-02-28 Thread Maria
Can you tell me where exactly to insert that Variable? def detail(request, poll_id): > p = get_object_or_404(Poll, pk=poll_id) > return render_to_response('polls/detail.html', {'poll': p}, > context_instance=RequestContext(request)) > Also, do I have to cr

Re: Use variable in my template?

2013-02-28 Thread Shawn Milochik
On Thu, Feb 28, 2013 at 11:30 AM, Maria wrote: > Can you tell me where exactly to insert that Variable? Have a look at this page in the tutorial: https://docs.djangoproject.com/en/1.5/intro/tutorial03/ See how a variable in the view is added to the context? Exactly like that. -- You received t

Re: Possible bug with Form Wizard and condition_dict?

2013-02-28 Thread Arild Haugstad
When "starting" the wizard, the "current" step is the *first* step. The "first" step is the first in the list of *currently enabled* steps. The list of "currently enabled" steps is constructed by checking each step wrt. condition_dict. In other words; obtaining the current step implicitly runs th

Re: blank and null with Oracle

2013-02-28 Thread Ian
On Wednesday, February 27, 2013 3:31:20 PM UTC-7, Skylar Saveland wrote: > > Some odd behavior with Oracle involving blank and null. > > blank is True on this field: > my_auto = models.AutoField(blank=False, null=False, primary_key=True) > > null is True on this field: > uncles = models.ManyToManyF

Re: Use variable in my template?

2013-02-28 Thread Bill Freeman
In the lines: return render_to_response('polls/detail.html', {'poll': p}, context_instance=RequestContext(request)) you have two choices. Both: return render_to_response('polls/detail.html', {'poll': p, 'marke': marke}, conte

Re: Use variable in my template?

2013-02-28 Thread Bill Freeman
By the way, in your marke.py, the "global" declaration doesn't do what you seem to think, and may be a syntax error. I know that in some other languages, "global" is used to make a variable available to all code. This is not the case in python. Without the "global" declaration, any piece of code

Re: StreamingHttpResponse into a Template

2013-02-28 Thread Sam Solomon
Not sure if this is what you meant by "we'll probably keep the javascript reloading to process junks, waiting for the support of celery", but one option without celery is to have the initial request save a bunch of "PendingEmail" objects in the database and then redirect you to a "send_queued_e

[ANN] Django Endless Pagination v2.0

2013-02-28 Thread Francesco Banconi
Hi all, I just released Endless Pagination v2.0: Django pagination tools supporting Ajax, multiple and lazy pagination, Twitter-style and Digg-style pagination. New features include Python 3 support, Javascript improvements, code clean up and many other bug fixes and changes. If you are interest

Daemonize django server

2013-02-28 Thread Tim Johnson
I'm having a hell of a time getting fastcgi to work on my mac, so for the time being I'll just stick with using the django server. Is it possible to daemonize the server? I would prefer that in some cases. >From https://docs.djangoproject.com/en/dev/ref/django-admin/ I see daemonize as an option

Re: Daemonize django server

2013-02-28 Thread Josh Cartmell
This (http://software.clapper.org/daemonize/) may do what you want and can be installed with homebrew on a mac, but if this is in any way a production setting, I wouldn't do it. The dev server hasn't gone through any security audits and could and probably does have unknown weaknesses in that regar

Re: Daemonize django server

2013-02-28 Thread Tim Johnson
* Josh Cartmell [130228 09:48]: > This (http://software.clapper.org/daemonize/) may do what you want and > can be installed with homebrew on a mac, but if this is in any way a > production setting, I wouldn't do it. The dev server hasn't gone > through any security audits and could and probably d

Wording in Djang Docs: "per instance" vs "every instance"

2013-02-28 Thread Ivo Brodien
Hello, in the Django Docs for Class Based Views[1] it says under the green box: This approach applies the decorator on a per-instance basis. If you want every instance of a view to be decorated, you need to take a different approach. I don't quite get that, since "per instance" and "every insta

Re: Wording in Djang Docs: "per instance" vs "every instance"

2013-02-28 Thread Tomas Neme
> This approach applies the decorator on a per-instance basis. If you want > every instance of a view to be decorated, you need to take a different > approach. This means that with "this approach" you have to apply the decorator in every instance you want modified, that is, every time you have thi

Re: Wording in Djang Docs: "per instance" vs "every instance"

2013-02-28 Thread Ivo Brodien
Thanks Tomas, now I got it! Still the original usage of "per" and "every" sounds strange to me.. it should be more like "per instance within a URL pattern", but I am not a native in English, so nevermind. Thanks! On Feb 28, 2013, at 8:54 PM, Tomas Neme wrote: >> This approach applies the deco

Re: Wording in Djang Docs: "per instance" vs "every instance"

2013-02-28 Thread Tomas Neme
your view class is.. well, that, just a class. Every time you use it in an urlpattern, calling .as_view() a new instance object of that class is created. So the "per instance" should be pretty much self explanatory On Thu, Feb 28, 2013 at 5:04 PM, Ivo Brodien wrote: > Thanks Tomas, > > now I got

Re: Wording in Djang Docs: "per instance" vs "every instance"

2013-02-28 Thread Ivo Brodien
yeah, you are right, now I see it too…I shouldn't start reading django docs at the end of a working day… cheers and thanks again! On Feb 28, 2013, at 9:09 PM, Tomas Neme wrote: > your view class is.. well, that, just a class. > > Every time you use it in an urlpattern, calling .as_view() a new

How to redirect to same page on failed login

2013-02-28 Thread Suneil Rudra
Hi, I'm quite new to using Django, and I've searched around for a while for a solution but haven't really found anything useful. I'm using a context processor to make my login form available from base.html. When I login in with valid details, it redirects me to the the page I logged in from as

Re: How to redirect to same page on failed login

2013-02-28 Thread Rafael E. Ferrero
Are you tried Login Redirect ? 2013/2/28 Suneil Rudra > Hi, I'm quite new to using Django, and I've searched around for a while > for a solution but haven't really found anything useful. > > I'm using a context processor to make my login form available from > base.html. When I login in with vali

Re: How to redirect to same page on failed login

2013-02-28 Thread Suneil Rudra
Do you mean the LOGIN_REDIRECT_URL setting? On Thursday, February 28, 2013 9:01:40 PM UTC, vicherot wrote: > > Are you tried Login Redirect ? > > 2013/2/28 Suneil Rudra > > >> Hi, I'm quite new to using Django, and I've searched around for a while >> for a solution but haven't really found anythi

Re: Daemonize django server

2013-02-28 Thread carlos
you try http://gunicorn.org/ is fast and easy to deploy Cheers On Thu, Feb 28, 2013 at 1:22 PM, Tim Johnson wrote: > * Josh Cartmell [130228 09:48]: > > This (http://software.clapper.org/daemonize/) may do what you want and > > can be installed with homebrew on a mac, but if this is in any wa

Re: Daemonize django server

2013-02-28 Thread Tim Johnson
* carlos [130228 13:15]: > you try http://gunicorn.org/ is fast and easy to deploy > > Cheers Thank you! That looks great. -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google Groups "Dj

Re: Daemonize django server

2013-02-28 Thread Tim Johnson
* carlos [130228 13:15]: > you try http://gunicorn.org/ is fast and easy to deploy :) It was as simple as easy_install gunicorn then switch to the app directory and ran gunicorn_django --daemon --pid djpid --bind=127.0.0.1:8001 I have a daemonized process at localhost:8001 and to shut it dow

Re: default filtering model admin (crud) using user obj attribute

2013-02-28 Thread Bino Oetomo
Dear Tom and all I really appreciate your response On Thursday, February 28, 2013 9:13:56 PM UTC+7, Tom Evans wrote: > > It seems like you are asking how to do multi-tenancy in the stock django > admin? > > Yes, excatly > Multi tenancy is tricky in django. Is there any reason you are not > u

Re: password encryption

2013-02-28 Thread Russell Keith-Magee
Hi Tomas, If you dig into Django's password tools, you'll discover that we use PBKDF2 by default, and have an option to use bcrypt. We also have a pluggable backend that allows you to define your own hashing algorithm if you'd prefer something harder, or if something emerges that supersedes PBKDF2

Problem with 'ModelForm' vs 'Permission'

2013-02-28 Thread Bino Oetomo
Dear All. I've something like this : START- class L2GroupForm(ModelForm): #Try to lock ForeignKey field to single value class Meta: model = L2Group widgets = { 'company_id': TextInput(), } class L2GroupAdmin(admin.ModelAdmin): #Choo

Re: HTML5 Offline apps with Django 1.4

2013-02-28 Thread Russell Keith-Magee
Hi Ranjith, Perhaps I've confused things here -- when you're serving offline HTML5, you need to serve (at least) 2 pages -- a page with html, and a *completely separate* second page containing the manifest. The manifest file has a content type of text/cache-manifest; your HTML is served with a nor

Re: problem in displaying data on html

2013-02-28 Thread Avnesh Shakya
thanks i got it thanks On Thu, Feb 28, 2013 at 7:19 PM, Roberto López López wrote: > > If you just output a m2m field that's normal. If you rather prefer to > iterate over it and show all the related objects, use a for loop... > > > On 02/28/2013 02:43 PM, Avnesh Shakya wrote: > > hi i have o

Re: Best practices for 1.5 configurable user model and profiles

2013-02-28 Thread Russell Keith-Magee
Hi Doug, Shawn has hit the "whys" fairly well -- the three arguments he gave are definitely the top three. Covering authentication via other sources (e.g., OAuth, etc) was another use case (although this use case would also be a candidate for a plugin app) Taking avatar as an example -- I'd frame

error in filling data in dtabase through admin page..

2013-02-28 Thread Avnesh Shakya
hi, i have got one error during adding data in database though admin page, actually it was working fine, but i made some attributes optional, now it's generating error.. i m adding m models.py ,plz help me.. thanks in advance -- You received this message because you are subscribed to the Google

error in filling data in database through admin page

2013-02-28 Thread Avnesh Shakya
hi, i have got one error during adding data in database though admin page, actually it was working fine, but i made some attributes optional, now it's generating error.. i m adding m models.py , error-- " needs to have a value for field "course" before this many-to-many relationship can

Re: 1.5 custom user model: Add User with default UserCreationForm results in "no such table: auth_user"

2013-02-28 Thread Russell Keith-Magee
On Thu, Feb 28, 2013 at 5:11 AM, Eric Psalmond wrote: > "UserCreationForm > > Depends on the > User > m