Re: How to integrate Postgresql db with Django,so that data will be retrieved from that postgresql db table and show it on browser via html

2013-12-03 Thread Swastik Acharya
in the mean time i was able to populate datas's from postgres table by modifying the models.py and views.py as follows:: urls.py from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatte

Re: How to integrate Postgresql db with Django,so that data will be retrieved from that postgresql db table and show it on browser via html

2013-12-03 Thread Swastik Acharya
in the mean time i was able to populate datas's from postgres table by modifying the models.py and views.py as follows:: Models.py: from __future__ import unicode_literals from django.db import models class DeviceTable(models.Model): serial_no = models.IntegerField() macid = models.Char

Re: How to integrate Postgresql db with Django,so that data will be retrieved from that postgresql db table and show it on browser via html

2013-12-03 Thread Swastik Acharya
in the mean time i was able to populate datas's from postgres table by modifying the models.py and views.py as follows:: Models.py: from __future__ import unicode_literals from django.db import models class DeviceTable(models.Model): serial_no = models.IntegerField() macid = models.Char

Django app installation

2013-12-03 Thread Harjot Mann
Can we make a scipt in python for installing django apps having gui like we do in php creating tables from GUI etc. all should be done through that script. Right now I am installing my app through a shell script but I want to give to be installed from browser directly. Is it possible? -- Harjot K

Re: Anyone tried a pre-existing django blog app like wordpress to add to their site?

2013-12-03 Thread Mario Gudelj
I like Zinnia. It's a gun. I had issues understanding some of the code as it's all built in CBVs, but once you get your head around it it rocks. Has everything a blog should have and documentation is great. Even a WP import tool is in it! https://github.com/Fantomas42/django-blog-zinnia On 4 Dec

Re: Anyone tried a pre-existing django blog app like wordpress to add to their site?

2013-12-03 Thread Tom Lockhart
On 2013-12-03, at 7:02 PM, Creed Mangrum wrote: > Just wondering if there is any general feelings or inclinations to any good > ones out there. Thanks! I've been using Mezzanine as the underpinnings for a bigger site. I can recommend it highly. Not familiar with others though.

Re: How to get database data into a template sidebar

2013-12-03 Thread Drew Ferguson
Wonderful! excellent pointers Thanks On Tue, 3 Dec 2013 17:35:10 +0300 Joseph Mutumi wrote: > Some of the options you have are: > 1) CBVs > 2) custom template tags: > https://docs.djangoproject.com/en/1.5/howto/custom-template-tags/ > 3) template preprocessors: > https://docs.djangoproject.com/

Anyone tried a pre-existing django blog app like wordpress to add to their site?

2013-12-03 Thread Creed Mangrum
Just wondering if there is any general feelings or inclinations to any good ones out there. Thanks! -- 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

Re: How to replace Django ORM with sqlalchemy

2013-12-03 Thread Russell Keith-Magee
On Tue, Dec 3, 2013 at 9:30 PM, Vernon D. Cole wrote: > The maintainers of django have discussed this question. They all believe > that it would be almost impossible to do. The two ORMs operate > differently, so that there would not be a simple "replace operation A with > operation B" type of co

[no subject]

2013-12-03 Thread Aamu Padi
How do I check whether there is a *thread* containing only the *sender *(user 1) and the *recipient* (user 2), and no other users. models.py class Thread(models.Model): user = models.ManyToManyField(User) is_hidden = models.ManyToManyField(User, related_name='hidden_thread', b

Re: Experiences with A/B testing?

2013-12-03 Thread Frank Bieniek
A/B Testing is an universe of its own... There is a saas called kiss metrics. Google offers a/b testing inside analytics. If you want to improve your conversion funnel, you need to factor in the source of your traffic and segment it. Taguchi Split Testing is another route. If you just want t

Re: Experiences with A/B testing?

2013-12-03 Thread Anu G
I have also been looking into A/B testing. Did you use any of the above you mentioned...? If so which one you would recommend? Thanks On Friday, March 1, 2013 9:07:05 AM UTC-6, Tomás Solar Castro wrote: > > Hi everyone > > I want to make some A/B testing. I've searched for how to do this with >

Re: Save the user from one model to the another model

2013-12-03 Thread Aamu Padi
Thank you all so much for the answers! I came up with this solution. class Message(models.Model): thread = models.ForeignKey(Thread) sent_date = models.DateTimeField(default=datetime.now) sender = models.ForeignKey(User) body = models.TextField() is_hidden = models.ManyToManyFi

Re: Save the user from one model to the another model

2013-12-03 Thread antialiasis
I believe what Aamu Padi is getting at is that he doesn't want to do this in the view at all. He just wants it to happen *whenever* a Message is created. That's a textbook use case for signals. On Tuesday, December 3, 2013 1:14:50 PM UTC, Timothy W. Cook wrote: > > On Tue, Dec 3, 2013 at 9:56 AM

Re: How to get database data into a template sidebar

2013-12-03 Thread Joseph Mutumi
Some of the options you have are: 1) CBVs 2) custom template tags: https://docs.djangoproject.com/en/1.5/howto/custom-template-tags/ 3) template preprocessors: https://docs.djangoproject.com/en/1.5/ref/settings/#template-context-processors On 12/2/13, Drew Ferguson wrote: > Hi > > I am not really

Re: Email Templates and the full website URL

2013-12-03 Thread Joseph Mutumi
Its not that easy to do but instead of generating the link say: http://myrealsite.com/admin/change_password If HTTP_HOST is somehow messed up say by Man In the Browser, in the email, you could get something like: http://hackersite.com/admin/change_password If the user isn't paying attention, the

Problem with number format when not using L10N

2013-12-03 Thread Yonel Ceruto González
I want to use the grouping of thousands in my numeric formats. My configuration in "settings.py" is: USE_L10N = False USE_THOUSAND_SEPARATOR = True NUMBER_GROUPING = 3 Showing my numbers without the grouping of thousands. When I check in depth why I realize that the grouping of thousands is

Re: How to replace Django ORM with sqlalchemy

2013-12-03 Thread Vernon D. Cole
The maintainers of django have discussed this question. They all believe that it would be almost impossible to do. The two ORMs operate differently, so that there would not be a simple "replace operation A with operation B" type of conversion. The present ORM is too deeply embedded to be rep

Re: How to integrate Postgresql db with Django,so that data will be retrieved from that postgresql db table and show it on browser via html

2013-12-03 Thread Tom Lockhart
On 2013-12-02, at 10:42 PM, Swastik Acharya wrote: > django 1.4 version > postgresql 9.1 version > > I have successfully loaded all the html files and css on browser using django. > Now i have some tables in postgresql ,which i need to integrate it with > django and .html files so that data w

Re: Save the user from one model to the another model

2013-12-03 Thread Timothy W. Cook
On Tue, Dec 3, 2013 at 9:56 AM, Aamu Padi wrote: > Ok! Plural names. Got it. But I was looking for something more of a > overriding the save method for the Thread class, so that I don't have to do > that in the view. > You can do it in the same view as the message. You aren't limited to working

Re: Save the user from one model to the another model

2013-12-03 Thread antialiasis
This seems like a job for signals. Register a post_save signal for the Message class, something like this: from django.db.models.signals import post_save from django.dispatch import receiver from myapp.models import Message, Thread @receive

Re: Save the user from one model to the another model

2013-12-03 Thread Aamu Padi
Ok! Plural names. Got it. But I was looking for something more of a overriding the save method for the *Thread *class, so that I don't have to do that in the view. On Tue, Dec 3, 2013 at 1:39 PM, wrote: > You're probably looking for something along the lines of: > > thread = Thread.objects.get(

Re: Save the user from one model to the another model

2013-12-03 Thread jirka . vejrazka
You're probably looking for something along the lines of: thread = Thread.objects.get(id=) msg = Message.objects.get(id=) thread.user.add(msg.sender) Look at add() and remove() methods in documentation (search for related managers). FYI - it's a good practice to name fields that use ManyToMany