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:
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`,
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
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
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
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
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?
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,
>
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.
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.
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
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
--
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,
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.
>
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
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
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
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
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
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
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 :
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
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
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
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
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/
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,
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
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
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
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 =
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
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
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
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
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
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
37 matches
Mail list logo