Re: Auth Login well documented but elusive

2011-07-05 Thread Tom Evans
On Tue, Jul 5, 2011 at 2:10 AM, TuckFrance wrote: > Having problems with getting login to work even though it's well > documented. The pages for success, invalid, and no info provided > aren't getting used at all. Instead, clicking login always redirects > to /login which is not what I want. Any i

Re: forcing authentication without a password

2011-07-05 Thread Tom Evans
On Mon, Jul 4, 2011 at 10:15 PM, Josh Stratton wrote: > I've setup my authentication system to use the standard name/password with > good results, but some of the users are coming directly from Google Apps > with an OpenID I've authenticated by hand.  What I'd like is if they are > authenticated f

Re: Confusing path example for mod_wsgi?

2011-07-05 Thread bruno desthuilliers
On Jul 4, 9:51 pm, candlerb wrote: > OK, that's what wasn't clear to me in the documentation. For some > reason, I can refer to 'bar' by itself when using runserver, but with > wsgi I need to add /path/to and /path/to/foo to sys.path (or else > refer to 'foo.bar' everywhere). This has to do with

Re: Confusing path example for mod_wsgi?

2011-07-05 Thread bruno desthuilliers
On Jul 4, 9:51 pm, candlerb wrote: > On Jul 4, 4:29 pm, Tom Evans wrote: > > > The only reliable and approved way to access your > > settings is: > > >   from django.conf import settings > > Excellent, that makes it a lot tidier. I think this should be written in big bold letters everywhere in

Re: Setting up EC2 for Django

2011-07-05 Thread DrBloodmoney
On Sat, Jul 2, 2011 at 10:14 AM, Soviet wrote: > Hello > I need to set up EC2 instance to run Django+Python+PostgreSQL+Apache > +Solr+nginx+Mercurial etc. This is all black magic for me - I was only > using shared hosting like webfaction, where everything is dumb- > friendly :). But you know, "the

Re: Questions on markdown

2011-07-05 Thread DrBloodmoney
On Mon, Jul 4, 2011 at 2:22 PM, Petite Abeille wrote: > > On Jul 4, 2011, at 8:08 PM, leo wrote: > >> what i want is > > To quote the friendly manual: > > "When you do want to insert a break tag using Markdown, you end a line > with two or more spaces, then type return." > > http://daringfirebal

Re: Confusing path example for mod_wsgi?

2011-07-05 Thread candlerb
Thanks Tom and Bruno for all the help - my project looks much cleaner now. -- 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-

Related model getting autocomplete="off"

2011-07-05 Thread candlerb
I have an Admin view on a model which has related (child) models. I have extra=1. It displays like this: [Child1] [Child2] [ ] + Add another Foo I have jQuery autocomplete attached to those model fields. All is fine, except: when I click on 'Add another Foo', the dynamically added field has

django tests and namespaced reversed urls

2011-07-05 Thread Mateusz Harasymczuk
I have a problem with tests and namespaced reversed urls. It fails tests. However when running a server they works properly. I have tried #urls.py url(r'^', include('ns.urls', namespace="ns"), name="ns"), #ns/urls.py url(r'name/$', NameView.as_view(), name='home'), #template.html {% url ns:home

Re: change values in "select list"

2011-07-05 Thread Geoff Kuenning
On Jul 4, 11:10 pm, Tom Evans wrote: > All of this is explained in the docs. Read the docs. He did; he said he did in his previous posting. But although the docs are far better than many, I'm not sure I've _ever_ seen documentation that answered every question perfectly. Add that to the fact

Re: change values in "select list"

2011-07-05 Thread Geoff Kuenning
On Jul 5, 2:00 am, Andre Terra wrote: > For what it's worth, it will do you good to name everything in > English, even if it's not your native language. Python's keywords are > in English (if, while, for, class, return, break...) and sticking to > one language makes the code easier to maintain (

Re: ModelForm save call with data and instance

2011-07-05 Thread bruno desthuilliers
On Jul 5, 8:17 am, Constantine wrote: > def view(request) >     form = MyForm(request.POST, instance = MyModel(myfiled = 1)) >     if form.is_valid(): >         obj = form.save() > > but POST will NEVER merged with instance i've looked through stack: (snip) > in doesn't populate instance with clea

Re: change values in "select list"

2011-07-05 Thread Andre Terra
If he's going to ask around for help and show code, then English is the language of choice, for the simple reason that more developers speak it. As his questions grow in complexity (which is to be expected) so will the burden of having to figure out the German words. As for the python keywords, sh

Re: Related model getting autocomplete="off"

2011-07-05 Thread candlerb
Sorry, please ignore this question. All rows get autocomplete="off", and it doesn't make adifference. The problem than autocomplete() doesn't work like live(): if you call autocomplete() and then later add a new field to the DOM, that new field doesn't get autocomplete enabled. -- You received

Multiple Databases

2011-07-05 Thread Nick
Hi, I'm evaluating django for a project, though i haven't used it previously. I have used pylons,sqlalchemy,elixir,formalchemy etc in the past so am at least familiar, if a little rusty with that but i would like to try django for all the it provides. I've read through the docs and googled for a bi

Re: Questions on markdown

2011-07-05 Thread Derek
On Jul 5, 12:03 pm, DrBloodmoney wrote: > On Mon, Jul 4, 2011 at 2:22 PM, Petite Abeille > wrote: > > > On Jul 4, 2011, at 8:08 PM, leo wrote: > > >> what i want is > > > To quote the friendly manual: > > > "When you do want to insert a break tag using Markdown, you end a > > line with two or

Help How to append or join db.StringProperty(required=True) + string or global variable

2011-07-05 Thread ddghl
Help guys i need append or join django title = db.StringProperty(required=True) now is {{ article.title }} => "Bla bla bla" but i need {{ article.title + string or global variable }} maybe someone knows :working: -- View this message in context: http://old.nabble.com/Help

Re: change values in "select list"

2011-07-05 Thread Tom Evans
On Tue, Jul 5, 2011 at 12:53 PM, Geoff Kuenning wrote: > > > On Jul 4, 11:10 pm, Tom Evans wrote: > >> All of this is explained in the docs. Read the docs. > > He did; he said he did in his previous posting.  But although the docs > are far better than many, I'm not sure I've _ever_ seen document

Re: Help How to append or join db.StringProperty(required=True) + string or global variable

2011-07-05 Thread bruno desthuilliers
On Jul 5, 3:32 pm, ddghl wrote: > Help guys i need append or join django  title = > db.StringProperty(required=True)     db.StringProperty is not Django - are you sure you're at the right place ? But anyway, assuming you're using Django's templating system > now is {{ article.title }}  => "Bl

Re: Questions on markdown

2011-07-05 Thread bruno desthuilliers
On Jul 5, 3:23 pm, Derek wrote: > > Good news: you're using Python and text processing is easy in Python. > Bad news:  even if you're using Python, you still have to know how to > use it ;) Good news: you sometimes don't have anything to do - except, of course, reading the FineManual(tm) and u

Re: Questions on markdown

2011-07-05 Thread leo
thank you all good news, with your help, I found a way to achieve my goal. on the way to what i want. On 2011-7-5 23:04, bruno desthuilliers wrote: On Jul 5, 3:23 pm, Derek wrote: Good news: you're using Python and text processing is easy in Python. Bad news: even if you're using Python, yo

Re: Auth Login well documented but elusive

2011-07-05 Thread TuckFrance
Oh okay I think that makes sense. So I need to rename my view and use that name at the end. I'll try this out tonight and let you know. Thanks! On Jul 5, 2:42 am, Tom Evans wrote: > On Tue, Jul 5, 2011 at 2:10 AM, TuckFrance wrote: > > Having problems with getting login to work even though it's

Model IPAddressField not validating?

2011-07-05 Thread candlerb
I have a model defined as follows with an IPAddressField: class Nas(models.Model): name = models.CharField(max_length=128) ip = models.IPAddressField('IP Address', max_length=15, unique=True) nas_type = models.CharField('NAS Type', max_length=32, blank=True) huntgroup = models

Re: Managing objects spred among several tables/databases.

2011-07-05 Thread Hummingbird
Can anybody pl. share his/her experience on this issue? Thanks. On Jul 2, 10:39 am, Hummingbird wrote: > Hi ! > I have a similar situation. > (disclaimer:-- I have tried turbogears & web2py before. > But could not find the following functionality there. > So I have signed-in here to see whether I

Re: Model IPAddressField not validating?

2011-07-05 Thread Tom Evans
On Tue, Jul 5, 2011 at 5:14 PM, candlerb wrote: > I have a model defined as follows with an IPAddressField: > > > class Nas(models.Model): >    name = models.CharField(max_length=128) >    ip = models.IPAddressField('IP Address', max_length=15, > unique=True) >    nas_type = models.CharField(

Implementation of sso with django auth.

2011-07-05 Thread Ricardob
I'm trying to implement single sign-on using only django auth. Let's assume two django projects, on different sub-domains: site.com(auth) and app1.site.com(app1) The auth table in site.com is master. site.com handles: login, logout, account registration, etc. site.com sets SESSION_COOKIE_DOMAIN t

Re: Model IPAddressField not validating?

2011-07-05 Thread Tim Shaffer
Django trunk also contains validate_ipv6_address and validate_ipv46_address. But as of 1.3 I think it only validates ipv4 -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/

Re: Model IPAddressField not validating?

2011-07-05 Thread candlerb
On Jul 5, 5:34 pm, Tom Evans wrote: > from django.core.validators import validate_ipv4_address > ... >     ip = models.IPAddressField(..., validators=[validate_ipv4_address]) This works perfectly, thank you. (Maybe worth a note in ref/models/ fields.html though?) Cheers, Brian. -- You receive

Dreamhost Virtualenv Question

2011-07-05 Thread Jeremy
Hello, I'm completely new to Django and the concept of virtualenv. I'm trying to set up a web site and add in third party applications such as the zinnia blogging app, but having some issues. I believe that I've set up the virtualenv correctly, but could someone walk me through detailed steps as t

Avoid DB hit while using messages

2011-07-05 Thread Venkatraman S
I am showing messages using the messaging framework; so i check if there are any messages in my base.html (i.e, {% if messages %} ) and if yes i show the messages with suitable styling. Messages are being rendered fine and i do not have any problem with that. But i see that , accessing 'messages'

Re: Dreamhost Virtualenv Question

2011-07-05 Thread Oscar Carballal
Take a look to this article i wrote a couple of months ago blog.oscarcp.com/?p=167 its about installing django 1.3 on dreamhost, it may help you Enviado desde mi HTC El 05/07/2011 20:13, "Jeremy" escribió: > Hello, I'm completely new to Django and the concept of virtualenv. > I'm trying to set up

Help-Multiple Databases

2011-07-05 Thread Lycan
Hello, I am kind of new to Django and am trying to understand multi-db. Does anyone know where i can download a complete working example of django project implementing multi-db? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Complex Query help - get items from the org to which the user belongs

2011-07-05 Thread Venkatraman S
I tried asking around in IRC, and stumbled on a few possible solutions, would be great if someone shed some more light: I have the following models: class Organization(models.Model): name= models.CharField(max_length=100, blank=False) class Employees(models.Model): org

django/python performance vs play/java

2011-07-05 Thread drakkan
Hi, I did a small test app that basically render a web page and do 3 queries to the database (these queries are needed to fetch some data displayed on the web page). I deployed this app with nginx+uswgi here is the relevant nginx conf: location / { uwsgi_pass 127.0.0.1:49152;

Re: Dreamhost Virtualenv Question

2011-07-05 Thread Shawn Milochik
On Tue, Jul 5, 2011 at 2:10 PM, Jeremy wrote: > Hello, I'm completely new to Django and the concept of virtualenv. > I'm trying to set up a web site and add in third party applications > such as the zinnia blogging app, but having some issues.  I believe > that I've set up the virtualenv correctly

Re: Help-Multiple Databases

2011-07-05 Thread Shawn Milochik
On Tue, Jul 5, 2011 at 2:57 PM, Lycan wrote: > Hello, > I am kind of new to Django and am trying to understand multi-db. Does > anyone know where i can download a complete working example of django > project implementing multi-db? > > Thanks > Check github and bitbucket. You can search by keyword

Re: Dreamhost Virtualenv Question

2011-07-05 Thread bruno desthuilliers
I can only second Shawn here. FWIW, virtualenv is just a way to have different (more or less) isolated *Python* environments on a same system, and has no notion of a "Django project". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Complex Query help - get items from the org to which the user belongs

2011-07-05 Thread Marc Aymerich
On Tue, Jul 5, 2011 at 9:06 PM, Venkatraman S wrote: > I tried asking around in IRC, and stumbled on a few possible solutions, > would be great if someone shed some more light: > > I have the following models: > > class Organization(models.Model): > name= models.CharField(max_le

Re: django/python performance vs play/java

2011-07-05 Thread bruno desthuilliers
On 5 juil, 21:54, drakkan wrote: (snip) > or django/python is simply much slower than java? According to most benchmarks, Python (that is: current canonical implementation of...) is indeed way "slower" than Java (idem), that's a fact. FWIW, according to the same benchmarks, Java is slower than

Re: ANN: django-iadmin

2011-07-05 Thread Tomáš Ehrlich
Hi Sax, thanks for your work, i've already put it into my project. Unfortunately, I've got this error when accessing change_list view. Some apps works fine, but some of them shows this exception: File "/usr/lib/python2.6/dist-packages/django/contrib/admin/views/ main.py" in __init__ 81.

Re: django/python performance vs play/java

2011-07-05 Thread Maksymus007
Of course Java IS faster by a few factors then Python. I switched recently to Play development from django and I also noticed different. Moreover Play uses many mature tools, like JPA/Hibernate, ehcache etc which are called industrial standards. One more thing - Play! uses its own build-in http ser

Re: ANN: django-iadmin

2011-07-05 Thread sax
Ciao Tomáš, which version of django are you using ? did you compare your settings with the one into the testprj app ? You can find the issue tracker at https://github.com/saxix/django-iadmin/issues?sort=created&direction=desc&state=open let me know as i can help you sax 2011/7/5 Tomáš Ehrlich

Re: ANN: django-iadmin

2011-07-05 Thread Tomáš Ehrlich
I'm using latest Django svn checkout. I've just solved this problem, although still don't understand it. Problem was with models simply registered to admin like: admin.site.register(TaggedItem) So, I created simple model admin and it works: class TaggedItemAdmin(admin.ModelAdmin): pass ad

Re: Dreamhost Virtualenv Question

2011-07-05 Thread Jeremy
AHHH, that makes a little more sense. I'm trying to install apps from Github. Things like Pinax, and different individual blogging apps so that I can "plug" them into one Django project to give it multiple bits of social functionality. Obviously I'm having a lot of trouble (some of it being that

Re: django/python performance vs play/java

2011-07-05 Thread Xavier Ordoquy
Hi, Install Django debug toolbar and have a look at what's wrong with your application. My numbers are very different from yours. I just ran some tests and I am around 350 req/s with 4 sql queries. I'm a on dual core (4 virtual cores), using gunicorn/mysql with debug turned off, 4 workers proce

I need to do reports, and I would like reports that are integrated with django admin.

2011-07-05 Thread Kase
I have no problem to make my pages with reports of objects, but I like that are integrated with django admin, in the same tuple in the object list. i dont know if exist extention, but one of these reports is complex = / I have an object, insurance, customer, policy, policy_year and a i need a r

Re: ANN: django-iadmin

2011-07-05 Thread Tomáš Ehrlich
Hi Sax, I've found, where is a problem, but it's much more complicated. I've just filled issue: https://github.com/saxix/django-iadmin/issues/2 Hope we'll fix it soon, need to go sleep now On 5 čnc, 23:18, Tomáš Ehrlich wrote: > I'm using latest Django svn checkout. > > I've just solved this pro

Re: Setting up EC2 for Django

2011-07-05 Thread Nate Aune
If you don't need SSH access to the machines that power this whole setup, you can use DjangoZoom, our one-click Django deployment and hosting service. It's built on top of Amazon and uses Nginx, PostgreSQL and as of a few days ago, we also now support Mercurial. The only gotcha might be Solr whi

Odp: Re: Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-05 Thread galgal
I made it in that way, and it works: def get_fieldsets(self, request, obj=None): if obj: if request.user.id == 1: return self.declared_fieldsets else: if obj.get_profile().type==1: return ( (

Django admin - change permissions list

2011-07-05 Thread galgal
Is there any possibility to change permissions list in user edit page? I don't wan't to show all of permissions for example admin log entry or auth group etc. How can I modify a main queryset to exclude some of it? -- You received this message because you are subscribed to the Google Groups "D

Re: django/python performance vs play/java

2011-07-05 Thread Jonas Geiregat
We all know python is slower in raw execution speed than it's brother Java but I can't imagine it to be _that_ slow. Maybe there's something wrong with the queries you perform. Django's ORM is know for it's 'hidden execution' of queries. Some more insight in your querying code might be useful

Re: django/python performance vs play/java

2011-07-05 Thread drakkan
Hi, thanks for your comments, I installed django-debug toolbar and I can confirm I'm doing similar queries from both django and play. The query I do with hibernate in play should be slower since I'm doing a left outer join while django do an inner join, since the field on which I join cannot be nu

Re: Django admin - change permissions list

2011-07-05 Thread Michał Sawicz
Dnia 2011-07-05, wto o godzinie 15:16 -0700, galgal pisze: > Is there any possibility to change permissions list in user edit page? > I don't wan't to show all of permissions for example admin log entry > or auth group etc. How can I modify a main queryset to exclude some of > it? Override ModelA

Re: Avoid DB hit while using messages

2011-07-05 Thread Russell Keith-Magee
On Wed, Jul 6, 2011 at 2:16 AM, Venkatraman S wrote: > > I am showing messages using the messaging framework; so i check if there are > any messages in my base.html (i.e, {% if messages %} ) and if yes i show the > messages with suitable styling. > Messages are being rendered fine and i do not hav

Re: Django admin - how to hide some fields in User edit?

2011-07-05 Thread Michał Sawicz
Dnia 2011-07-05, wto o godzinie 15:13 -0700, galgal pisze: > I made it in that way, and it works: Remember that you need to exclude the field from the form, too, if you don't want malicious attempts to inject the groups to work. -- Michał (Saviq) Sawicz signature.asc Description: This is a dig

Re: Auth Login well documented but elusive

2011-07-05 Thread TuckFrance
Yeah it works just fine! Thanks again tevans! On Jul 5, 2:42 am, Tom Evans wrote: > On Tue, Jul 5, 2011 at 2:10 AM, TuckFrance wrote: > > Having problems with getting login to work even though it's well > > documented. The pages for success, invalid, and no info provided > > aren't getting used

Re: django/python performance vs play/java

2011-07-05 Thread Xavier Ordoquy
Hi, Is there anyway you can upload the project to bitbucket or github ? Regards, Xavier. Le 6 juil. 2011 à 01:31, drakkan a écrit : > Hi, > > thanks for your comments, I installed django-debug toolbar and I can > confirm I'm doing similar queries from both django and play. The query > I do wit

Re: Complex Query help - get items from the org to which the user belongs

2011-07-05 Thread Venkatraman S
On Wed, Jul 6, 2011 at 2:26 AM, Marc Aymerich wrote: > Say there are 3 Users in an org : A, B and C with each creating 3,4,5 items > respectively, and 'A' is the current user; then i need a query which returns > all these items(i.e, 12 items) when i supply A.. > > Item.objects.filter(employees__o

Re: I need to do reports, and I would like reports that are integrated with django admin.

2011-07-05 Thread Venkatraman S
On Wed, Jul 6, 2011 at 3:23 AM, Kase wrote: > > I have no problem to make my pages with reports of objects, but I like > that are integrated with django admin, in the same tuple in the object > list. > > any suggestions? > Did you try creating a page and showing the information there - for eg. y

Re: Multiple Databases

2011-07-05 Thread Venkatraman S
On Tue, Jul 5, 2011 at 6:39 PM, Nick wrote: > However, i also > need to support dynamic database creation - i.e. one or more databases > created from a single model (think of these as customer specific > databases). I will be using sqlite and want to save the path/ > connection details of the dyn

Re: django/python performance vs play/java

2011-07-05 Thread Kenneth Gonsalves
On Tue, 2011-07-05 at 13:57 -0700, bruno desthuilliers wrote: > To make a long story short: if you're looking for raw execution speed, > forget about Java and go for C - and let us know when you'll have a > working prototype. or like the facebook guys write C in php. -- regards KG http://lawgon.

Re: Complex Query help - get items from the org to which the user belongs

2011-07-05 Thread Venkatraman S
On Wed, Jul 6, 2011 at 12:36 AM, Venkatraman S wrote: > I tried asking around in IRC, and stumbled on a few possible solutions, > would be great if someone shed some more light: > > I have the following models: > > class Organization(models.Model): > name= models.CharField(max_l

Re: Complex Query help - get items from the org to which the user belongs

2011-07-05 Thread Venkatraman S
On Wed, Jul 6, 2011 at 8:39 AM, Venkatraman S wrote: > > On Wed, Jul 6, 2011 at 12:36 AM, Venkatraman S wrote: > >> I tried asking around in IRC, and stumbled on a few possible solutions, >> would be great if someone shed some more light: >> >> I have the following models: >> >> class Organizati

Re: ModelForm save call with data and instance

2011-07-05 Thread Constantine Linnick
I Found problem, it was triple collision: pycharm debugging sideeffect, wrong inheritance in _init_, but most destructive was form fields: it overwrites instance values with None. (if someone find this post from search anyway, thanks for reply -- You received this message because you are subsc