Re: Forcing group_by on a field other than id

2013-05-14 Thread Venkatraman S
I assume you want to count the number of records based on the date; or in other words, number of times a song is played grouped by date..right? If yes, does something like this help:

Forcing group_by on a field other than id

2013-05-14 Thread brian
I'm trying to do a query that needs a group_by on a field other than id. I've tried this: s=Song.objects.using('bmillham').annotate(Count('played__date_played')).order_by('-played__date_played') the generated query is: >>> print s.query SELECT `song`.`id`, `song`.`file`, `song`.`catalog`,

Re: djangoproject.com is down

2013-05-14 Thread Jacob Kaplan-Moss
Hi folks - Looks like we're back. FTR, the cause was an issue with our hosting provider, more here: http://status.mediatemple.net/maintenances/3148-emergency-maintenance-multiple-dvve-hostservers-rebooted/. I'm going to look into adding a bit more redundancy so that we're more resilient against

djangoproject.com is down

2013-05-14 Thread Jacob Kaplan-Moss
FYI - djangoproject.com is currently down, I'm investigating and I'll try to have it back up ASAP. In the meantime, if you need to get to the docs, you can hit up the ReadTheDocs mirror: http://django.rtfd.org/ Thanks for your patience, Jacob -- You received this message because you are

Disable "Password Upgrading"?

2013-05-14 Thread Kurtis
As per this document: https://docs.djangoproject.com/en/1.5/topics/auth/passwords/ Django will upgrade all existing passwords to use the 'preferred' algorithm. Two questions: 1. What is the 'preferred' algorithm? Is this set by Django? Or is this simply the hasher at the top (or bottom) of

Re: django-auth-ldap

2013-05-14 Thread Anurag Chourasia
Setting up of groups is not a requirement. In my case I am searching for group membership just to grant/deny access based on Group membership also. I sent my settings to you just to show you how I was using sAMAccountName for user search. So what exactly is not working in your case? You are not

Re: django-auth-ldap

2013-05-14 Thread Cody Scott
Do I need to set up groups? I have a setting for AUTH_LDAP_SERVER_URI AUTH_LDAP_BIND_DN AUTH_LDAP_BIND_PASSWORD AUTH_LDAP_USER_SEARCH AUTH_LDAP_USER_ATTR_MAP = { "username": "sAMAccountName", "email": "mail" } I am using a custom auth model. Maybe that is the reason it is not working?

Re: django-auth-ldap

2013-05-14 Thread Anurag Chourasia
Hi Cody, I am also using a Search Bind in a similar situation as yours You could easily use the samaccountName for User Search. Here is what I have in settings.py to give you a clearer picture. AUTH_LDAP_USER_SEARCH = LDAPSearchUnion( > LDAPSearch("OU=Users, >

django-auth-ldap

2013-05-14 Thread Cody Scott
I am trying to get django-auth-ldap working with an Active Directory LDAP Server. I don't understand the documentation for the Search/Bind or Direct Bind. Is 'uid' the LDAP attribute uid? My LDAP doesn't use this attribute. I tried putting 'samaccountName' an attribute that is used for logon.

Re: How to Handle XML and CSV processing in Django

2013-05-14 Thread phil...@bailey.st
On 14/05/13 18:41, Muhammad Ali wrote: > Thanks a lot for these resources. > > All the best, > Muhammad > Hi Muhammad, if you have a csv dataset you can try to import the data into mysql following my short tutorial.

Re: How to Handle XML and CSV processing in Django

2013-05-14 Thread Muhammad Ali
Thanks a lot for these resources. All the best, Muhammad -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post

Some input on #20287

2013-05-14 Thread Aaron Cannon
Hi all. Was browsing the tickets, looking for something that could use some implementation work, and came across https://code.djangoproject.com/ticket/20287 I posted a comment to the ticket, but I'm happy to provide some sample code to illustrate what I mean, if that would be clearer. Aaron --

Re: Testing put in django 1.5

2013-05-14 Thread Aaron Cannon
Try something like the following untested code: >From djanto.test.client import BOUNDARY, MULTIPART_CONTENT, encode_multipart ... encoded_data = encode_multipart({'someParameter':'someValue'}) response = self.c.put("/path/to/some/api", data=encoded_data,

Re: Missing trailing slash on static files

2013-05-14 Thread Bill Freeman
Have you tried adding a slash at the end of STATIC_URL ? On Tue, May 14, 2013 at 10:00 AM, Marc'h wrote: > My mistake, the slash is missing between the static and images path > components and not, as I erroneously wrote, between the app and static > ones. Sorry for that. >

Re: Atomic test/set/get using django cache API?

2013-05-14 Thread Shawn Milochik
I love and recommend Redis. If you can use a Redis key instead of Django's cache, you can call get() on the key. If the result is not None, now you have it. If it is None, you know it didn't exist, so you can set it. I don't think it's possible to have it work the way you want with the default

Re: Missing trailing slash on static files

2013-05-14 Thread Marc'h
My mistake, the slash is missing between the static and images path components and not, as I erroneously wrote, between the app and static ones. Sorry for that. Le mardi 14 mai 2013 15:52:39 UTC+2, Marc'h a écrit : > > Hi all, > > I'm having trouble configuring Django to serve static files for

Missing trailing slash on static files

2013-05-14 Thread Marc'h
Hi all, I'm having trouble configuring Django to serve static files for deployed apps (using Apache + WSGI). Briefly put : - the root URL of the Django application is http://www.example.com/app - the root directory (SITE_ROOT) of the Django project is /var/www/html/django/app/app (yes

Re: HttpResponse.has_header

2013-05-14 Thread Larry Martell
On Sat, May 11, 2013 at 9:08 AM, Masklinn wrote: > > On 2013-05-11, at 17:01 , Larry Martell wrote: > >> On Sat, May 11, 2013 at 8:23 AM, Masklinn wrote: >>> On 2013-05-11, at 15:57 , Larry Martell wrote: Yes, that is what I did. This is

Testing put in django 1.5

2013-05-14 Thread o_r
We are about to upgrade from django 1.3 to 1.5, and we are running into some problems with some of our tests. This used to work in 1.3: response=self.c.put("/path/to/some/api",{'someParameter':'someValue'},follow=True), but it doesn't in 1.5. There is a note about it in the docs that this has

Re: Urgent-lost everything with ./manage.py migrate myapp 0001

2013-05-14 Thread Vineet Naik
Hi, Since you specified the migration number in the command, I think South run migration backwards. Usually when you just run './manage.py migrate myapp' south will apply all new migrations in the correct order. But when the number is specified, it will either run the migration forwards or

Re: Reg: Delete Button is not removing the entry

2013-05-14 Thread Sergiy Khohlov
few coins from me. I hope you are passing object id correctly to your function delete. object which is should be deleted is obj = self.table.get_object_by_id(obj_id) but you can try to delete via : cinder.volume_delete(request, obj_id) possible simple way is write something like :

Re: FailedDryRun-South exeption on migration

2013-05-14 Thread Tom Evans
On Tue, May 14, 2013 at 1:02 PM, Giorgos Kontogiorgakis wrote: > Thank for all this but i did something terrible and i am afraid of losing > all the work i did! > I was trying to make the dependecies between my tables as i said before!I > was trying to solve this and i

Atomic test/set/get using django cache API?

2013-05-14 Thread Roy Smith
I want to do an atomic "test and set if doesn't exist" on a cache key using the django API. So far, that's easy.; cache.add() gives me exactly that. But, if the key does exist, I also want to get the current value. All add() gives me back is a flag saying if the key existed. Is there a way

Find an image to MongoDB GridFS

2013-05-14 Thread Hélio Miranda
Hi In my application I am putting pictures in the MongoDB GridFS. I can manually fetch the image to GridFS this: *my_painting Painting.objects = (id = '51921dee8774a71844db90c7 '). first () * *print (my_painting.photo.read ()). encode ("base64")* And it prints the image in base64. Now how can

Re: FailedDryRun-South exeption on migration

2013-05-14 Thread Giorgos Kontogiorgakis
Thank for all this but i did something terrible and i am afraid of losing all the work i did! I was trying to make the dependecies between my tables as i said before!I was trying to solve this and i used "./manage.py migrate myapp 0001" and now i lost everything,my database is empty and i can't

Urgent-lost everything with ./manage.py migrate myapp 0001

2013-05-14 Thread Giorgos Kontogiorgakis
I was trying to make the dependecies between my tables and i had an ValueError!I was trying to solve this and i used "./manage.py migrate myapp 0001" and now i lost everything,my database is empty and i can't even login in my django webinterface:( I get this error " DatabaseError at /admin/

Re: FailedDryRun-South exeption on migration

2013-05-14 Thread Tom Evans
On Tue, May 14, 2013 at 12:20 PM, Giorgos Kontogiorgakis wrote: > Hi, > > i have this model > > class Linkmap(models.Model): > vpathid = models.IntegerField(db_column='VPathID') # Field name made > lowercase. > interfacein = models.CharField(max_length=20L,

Re: help regarding celery implementation with django

2013-05-14 Thread Shawn Milochik
I think your question boils down to "How do I use Redis from Python." The answer is 'pip install redis' and play with it. Figure out which commands you'll need by looking at them in the Redis docs. The docs are good. http://redis.io/commands At the top of the page you can filter by type. I'd

help regarding celery implementation with django

2013-05-14 Thread Andrew Stewart
Hi Group, I want to do some stuff with redis for my django application, the backend is majorly PostgreSQL. I have a detailed question here - http://stackoverflow.com/questions/16537490/connecting-my-django-app-to-the-redis-installation Help would be appreciated, thanks! -- You received this

Reg: Delete Button is not removing the entry

2013-05-14 Thread Prithiv M
Hi, I have a form like as follows: VolName Desc Status --- Vol1SampleAvailable I have a created a delete button above this table. When I click delete, it says deleting Vol 1, but the entry is not removed. I have to reload the

FailedDryRun-South exeption on migration

2013-05-14 Thread Giorgos Kontogiorgakis
Hi, i have this model class Linkmap(models.Model): vpathid = models.IntegerField(db_column='VPathID') # Field name made lowercase. interfacein = models.CharField(max_length=20L, db_column='InterfaceIn') # Field name made lowercase. #Every Link belongs to a LinkMap #links =

Save image in a folder on GridFS and Server

2013-05-14 Thread Hélio Miranda
Hi I have a Django application that interacts with MongoDB, and wanted to upload images to a MongoDB GridFS. I wonder if when I upload to GridFS it also saves me the image in a folder on the server? I think so, but do not know how ... Someone can help me? My code is this: Views.py *def upload

problems with django-simple-captcha

2013-05-14 Thread teddy wang
I'm using django-simple-captcha but got some confused problems I configure the module according to the official documentation, but I can't see the captcha pitures

Re: Pls help me

2013-05-14 Thread Sergiy Khohlov
Post your models, views, forms and sometimes a template Many thanks, Serge +380 636150445 skype: skhohlov On Tue, May 14, 2013 at 11:18 AM, Nathaniel wrote: > Hi. Upon login, user can go to email_change_form.html to update their > email address. They will enter

Re: Pls help me

2013-05-14 Thread Nathaniel
Hi. Upon login, user can go to email_change_form.html to update their email address. They will enter their new email twice to update their profile. Actually, a change email confirmation would be perfect. On Tuesday, May 14, 2013 3:33:41 PM UTC+8, Nathaniel wrote: > > Hi guys. What is wrong with

Re: Pls help me

2013-05-14 Thread Sergiy Khohlov
Could you please clarify your question ? What do you want to do ? I dont have mind control skill Many thanks, Serge +380 636150445 skype: skhohlov On Tue, May 14, 2013 at 10:33 AM, Nathaniel wrote: > Hi guys. What is wrong with my codes below? > > class

Pls help me

2013-05-14 Thread Nathaniel
Hi guys. What is wrong with my codes below? class EmailChangeForm(forms.ModelForm): new_email1 = forms.CharField(label = _("Type new Email")) new_email2 = forms.CharField(label = _("Type Email again")) def __init__(self, user, *args, **kwargs): self.user = user def