How do you link your Django project to a domain

2015-01-23 Thread djangocharm2020
pretty much have a project built but now want to purchase a domain to link it live . Do you guys have any suggestions on who i should go with like godaddy.com. I also need to know is there a special step or code that is needed to add to the project? Thanks -- You received this message

Re: How to properly set the initial value for a Form ChoiceField

2015-01-23 Thread Vijay Khemlani
It could be a number of things, but the main thing that caught my attention was this part self.fields['images'].initial = str(selected_image) self.fields['images'].initial = str(selected_flavor) shouldn't it be self.fields['images'].initial = str(selected_image)

Re: Downloading thumbnails and replacing them with full images

2015-01-23 Thread Russell Keith-Magee
On Sat, Jan 24, 2015 at 12:20 AM, Larry Martell wrote: > I have a django app that downloads 100's of images. To increase the > performance, I want to change it so that it downloads thumbnails, and > when the user clicks on one then download the full image. > > I'm sure I

How to properly set the initial value for a Form ChoiceField

2015-01-23 Thread Eugene Goldberg
Hello, In my Form I have a couple of ChoiceField fields, for which I need to set a default / initial value. I'm trying to do this in the __init__, and my debug shows, that these values do take, but, when the actual html forms shows up, my default values are not set as desired. Am I missing

Re: login_required in urlpatterns TypeError 'tuple' object is not callable

2015-01-23 Thread Vijay Khemlani
I may be mistaken, but I don't think you can decorate an entire "include" call On Fri, Jan 23, 2015 at 8:51 PM, Neto wrote: > Hi, I'm using login_required in url patterns but it does an error: > > urls.py > > from django.conf.urls import patterns, include, url > from

login_required in urlpatterns TypeError 'tuple' object is not callable

2015-01-23 Thread Neto
Hi, I'm using login_required in url patterns but it does an error: urls.py from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required urlpatterns = patterns('', url(r'^home/', login_required(include('home.urls'))), ) error: TypeError at

Re: Django + Bamboo

2015-01-23 Thread Daniel França
I gave up Bamboo and start using codeship, 100 times easiet On Fri 23 Jan 2015 at 19:17 Gabriel Patiño wrote: > Daniel, > > Did you make it work? > > I have testing covered by bamboo, and I guess I'm creating the atfacts. > > From there, I don't know how to continue to have

Dictionary in admin interface

2015-01-23 Thread Sven Mäurer
I want to manage a dictionary inline over the admin interface. These are my models. What I got working is of course a separated management of request and dictionary. But I want to add key value pairs in the request admin interface with a TabularInline. Do I have to skip the dictionary in some

Re: Django + Bamboo

2015-01-23 Thread Gabriel Patiño
Daniel, Did you make it work? I have testing covered by bamboo, and I guess I'm creating the atfacts. >From there, I don't know how to continue to have my django app installed in the servers. Do I have to install everything from the agent where the deploy job runs? Or should I add the actual

Re: django select extremely slow on large table

2015-01-23 Thread Stephen J. Butler
2000 is AL16UTF16. But since there should be a non-lossy conversion between AL32UTF8 and AL16UTF16 you'd think that Oracle would perform it and use the index. Puzzling. Furthermore, when you look in the Oracle db driver you can see in base.py where it sets NLS_LANG to ".UTF8". This is an old

Re: Flood of ''Invalid HTTP_HOST header" mails

2015-01-23 Thread andi-h
Hi Collin, that's a 'yes' to all three questions (loading settings for wrong website was no question). In the meantime I have found the "error": As I wrote below my ALLOW_HOSTS variable was a tuple of ordinary strings ("www.example.com") as in the documentation. Using instead unicode strings

A free service which collects Django related news from Hacker News and send daily digest to subscribed developers

2015-01-23 Thread Adieu
Hi, I'm a Django developer. My friends and I built a service called Porter.io (https://porter.io) which collects Hacker News stories about open source projects and send daily digest to users based on his subscription list. We may even recommend related news and repos for our users. We sync

Re: Django for latex

2015-01-23 Thread Amirouche Boubekki
On Fri Jan 23 2015 at 1:28:13 PM Hitesh Sofat wrote: > I want to generate pdf using latex. Please guide me for this , anybody > having any tutorial please share it here. > You might be interested by weasyprint . It can generate pdf from html

Downloading thumbnails and replacing them with full images

2015-01-23 Thread Larry Martell
I have a django app that downloads 100's of images. To increase the performance, I want to change it so that it downloads thumbnails, and when the user clicks on one then download the full image. I'm sure I can come up with something on my own (send an ajax request on click, etc.) but I was

Re: How to check appname via Django commands?

2015-01-23 Thread Scot Hacker
On Saturday, January 17, 2015 at 1:38:32 AM UTC-8, Sugita Shinsuke wrote: > > Hi there. > > I use Django 1.6 version. > > The database of Django store the information of application. > So, I know that if I change the hierarchy of the Django project folders, > some trouble occurs. > The

Re: Django for latex

2015-01-23 Thread Christian Ledermann
see https://github.com/4teamwork/ftw.book it should be pretty straightforward to port it to django On 23 January 2015 at 12:41, Sergiy Khohlov wrote: > try to use texi2pdf > > Of course this list for django not LaTex > > Many thanks, > > Serge > > > +380 636150445 > skype:

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
That sounds only relevant if Django creates the tables tight? You cannot do that with partitioned Oracle of this size. As much as I like to have django create the schemas, legacy db is all I have. THe entire DB is over 2TB of data, you cannot just change a column field type or add an index

Re: Django for latex

2015-01-23 Thread Sergiy Khohlov
try to use texi2pdf Of course this list for django not LaTex Many thanks, Serge +380 636150445 skype: skhohlov On Fri, Jan 23, 2015 at 10:37 AM, Hitesh Sofat wrote: > I want to generate pdf using latex. Please guide me for this , anybody > having any tutorial

Django for latex

2015-01-23 Thread Hitesh Sofat
I want to generate pdf using latex. Please guide me for this , anybody having any tutorial please share it here. -- 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

Re: Binding model data to a formset without POST

2015-01-23 Thread Rob Groves
Thanks for the reply Collin, and thanks for the warning about this being more complicated than it seemed at first. I later discovered that I needed to set the hidden fields that contain the foreign and instance keys as well. For completeness, the below code is working for me given the fact

Re: django select extremely slow on large table

2015-01-23 Thread Edgar Gabaldi
You can try to put a db_index=True in markid field. https://docs.djangoproject.com/en/1.7/ref/models/fields/#db-index On Fri, Jan 23, 2015 at 9:59 AM, Jani Tiainen wrote: > On Fri, 23 Jan 2015 03:38:19 -0800 (PST) > Joris Benschop wrote: > > > And

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
On Fri, 23 Jan 2015 03:38:19 -0800 (PST) Joris Benschop wrote: > And to keep replying to myself: > > This one is slow: > x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= > %s",[u'TO1']) > print x[0] > > This one is fast: >

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
On Fri, 23 Jan 2015 03:38:19 -0800 (PST) Joris Benschop wrote: > And to keep replying to myself: > > This one is slow: > x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= > %s",[u'TO1']) > print x[0] > > This one is fast: >

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
And to keep replying to myself: This one is slow: x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= %s",[u'TO1']) print x[0] This one is fast: y=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= 'TO1'") print y[0] If I copy the table and make the MARKID

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
Skip that, >>>x=Marker.objects.raw("SELECT * from VARIANT_CLONE.MARKER WHERE MARKID='TO1'") is fast DEBUG (0.001) QUERY = u"SELECT * from SCHEMA_PROD.MARKER WHERE MARKID='mTO1'" - PARAMS = (); args=() -- You received this message because you are subscribed to the Google Groups "Django

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
As an addition: >>>x=Marker.objects.raw("SELECT * from VARIANT_CLONE.MARKER WHERE MARKID='TO1'") This is also slow so it indeed seems to be a locale issue the database is AL32UTF8 and django uses national character set id "2000" is this a locale issue? -- You received this message because

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
This seems to be specific for partial text searches (LIKE, STARTSWITH etc). Still, interesting addition. -- 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

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
On Fri, 23 Jan 2015 02:06:58 -0800 (PST) Joris Benschop wrote: > Very interesting point. > In the backend the MARKID column is of type VARCHAR2(20 BYTE). This is not > something I can change. But it does seem that the bindvar method forces a > unicode lookup onto an

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
Very interesting point. In the backend the MARKID column is of type VARCHAR2(20 BYTE). This is not something I can change. But it does seem that the bindvar method forces a unicode lookup onto an ascii table. Is there any way to make django get this field in ascii to test this theory? --

How to detect (daily) User Login when using cookies?

2015-01-23 Thread Tobias Dacoir
I'm using django-allauth and I receive a signal when a user logs in. Now I want to store each day the user logs in. However, when the user does not logout he can still log in the next day thanks to the cookies. I know that I can set SESSION_EXPIRE_AT_BROWSER_CLOSE to True in settings.py. But

Re: django select extremely slow on large table

2015-01-23 Thread Stephen J. Butler
Could it be a character set issue? That is, perhaps the database NLS_CHARACTERSET is not unicode friendly, your column is VARCHAR instead of NVARCHAR2, and Django is sending unicode instead of the native database charset (which cx_Oracle directly might use). I'm just brainstorming on what might

Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
THank you all for your help there's a few things here: * This Oracle table is highly partitioned and optimized.There's indexes everywhere. There's two full time senior Oracle DBAs working on tuning this DB.So a return of 0.1 sec is not strange for this setup. (btw the DBAs are really impressed

Re: django select extremely slow on large table

2015-01-23 Thread James Schneider
Granted, I glazed over that fact. What I did see, though, is the blank=True on a CharField(), which would indicate to me that multiple '' (empty string) entries could potentially be inserted into the database, meaning that it can't be unique (with implied null=False). *confused* I'm guessing the

Re: django select extremely slow on large table

2015-01-23 Thread Erik Cederstrand
> Den 23/01/2015 kl. 08.19 skrev James Schneider : > > How many results do you typically get back from that query? There should be only one result, right? Since the "markid" field is defined as unique and OP is filtering on that with a single value. First thing to