current transaction is aborted, commands ignored until end of transaction block

2013-05-24 Thread Andreas Kuhne
Hi all, I am working on upgrading our system from django 1.3.1 to django 1.5.1, and have run into a huge problem. The site we are running has multilingual support and the platform has multiple top level domain sites connected to it. Running locally on my machine I get an error when I try to switch

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-30 Thread Andreas Kuhne
2013/5/30 Sam Solomon > Hmm, yeah, Ryan could be onto something, but that doesn't really help > figure out the root cause (which likely was an error that existing before > upgrading but just went ignored). > > What should help get to the root issue is checking out the postgresql log > file (for m

Re: Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Andreas Kuhne
2013/6/16 Sandeep kaur > I have this Web application made in Django 1.3. And now when I use it > on Django 1.5, it does not work. It give error as no module simple. > So, Is there any migration tool > to make my application work easily on 1.5 version without manually > making lot of changes? > Yo

Probem with upgrade to python 2.7

2013-06-26 Thread Andreas Kuhne
Hi, I am trying to upgrade our debian squeeze server running a django 1.5.1 website from python 2.6 to python 2.7.5. I have been able to upgrade python without any problems. However, now when I try to start our site I get an issue with the PIL library. In our code we use "import Image" and not "f

Re: Probem with upgrade to python 2.7

2013-06-26 Thread Andreas Kuhne
ommend using pillow which is a drop in > replacement for pil > On Jun 26, 2013 11:54 AM, "Andreas Kuhne" > wrote: > >> Hi, >> >> I am trying to upgrade our debian squeeze server running a django 1.5.1 >> website from python 2.6 to python 2.7.5. I have be

Re: Probem with upgrade to python 2.7

2013-06-26 Thread Andreas Kuhne
; > > On Wed, Jun 26, 2013 at 1:01 PM, Andreas Kuhne > wrote: > >> >> >> 2013/6/26 Avraham Serour >> >>> If you upgraded your python installation in place you should reinstall >>> your libraries, specially PIL which needs compiling some parts.

Problem with staticfiles

2013-07-03 Thread Andreas Kuhne
Hi all, I am trying to CachedStaticFilesStorage to work in our environment. I have been able to configure all of the settings, and am able to copy all static files (we have alot of them) to the correct location. However when the postprocessing starts and the MD5 hashes are being calculated it fail

Re: Problem with staticfiles

2013-07-04 Thread Andreas Kuhne
I found out that the CSS files where not correctly written and they should have generated this error. Pity I have been searching for the problem for 2 days now :-) Regards, Andréas 2013/7/3 Andreas Kuhne > Hi all, > > I am trying to CachedStaticFilesStorage to work in our environmen

Problem with translations

2013-08-21 Thread Andreas Kuhne
Hi, I am working on a website that is available in 10 different languages, and we have the translations working. If you want to see our website in french, you just add /fr to our url and it works fine. However we are getting a lot of : File "middleware.py", line 83, in process_request tran

Re: Problem with translations

2013-08-21 Thread Andreas Kuhne
We are running nginx for static files and apache + mod_wsgi for the django website. Regards, Andréas 2013/8/21 Mauro Rocco > Hi, > That's strange. > To me looks like the server from time to time can not access this files as > you said. > What you use in production Apache/ModWSGI ? > > Regards

Re: Can I make changes in Django without having to recompile everything?

2013-08-21 Thread Andreas Kuhne
If you compare Django to asp.net or java, django is the easiest to start things with. You never have to compile anything in django, the server does it itself. In development mode it will recompile all classes automatically when you make changes to a file. In a production environment, you may have t

Re: Problem with translations

2013-08-26 Thread Andreas Kuhne
Has nobody heard of this issue before? It is rather disturbing and means that our site crashes from time to time for some users. Regards, Andréas 2013/8/21 Andreas Kuhne > Hi, > > I am working on a website that is available in 10 different languages, and > we have the translations

Experience of django on AWS

2013-09-20 Thread Andreas Kuhne
Hi all, Has anyone any experience of django in the AWS cloud? For example using Amazon Beanstalk with a django 1.5 application? Or any other pitfalls that can occur when transitioning to AWS? Regards, Andréas -- You received this message because you are subscribed to the Google Groups "Django

Nginx versus Apache

2013-10-08 Thread Andreas Kuhne
Hi, I was wondering, which server would be best for a production environment. Nginx or apache? At the moment we are running both, nginx for static files and apache + mod_wsgi for django. But in the future we will be moving our static assets to S3 and cloudfront, so the reason for using nginx for t

Re: Python 3

2013-10-23 Thread Andreas Kuhne
Thomas, interesting. Being a scandinavian developer myself, can you give me some examples where Python 3 has worked better for unicode support? Regards, Andréas 2013/10/23 Thomas Weholt > My main reason to porting as many as possible of my python projects to > Python 3 is proper unicode suppo

Re: Two user model problem

2015-01-28 Thread Andreas Kuhne
2015-01-28 13:26 GMT+01:00 Russell Keith-Magee : > > On Wed, Jan 28, 2015 at 3:00 PM, 詹上潁 wrote: > >> My project need an admin for staff and a normal website for normal user. >> Staff can only login to staffsite and normal user can only login to >> website. Staff will login to admin to do some ma

Re: Django sever for andriod

2015-01-28 Thread Andreas Kuhne
2015-01-28 6:45 GMT+01:00 suhail areekkan : > I am new in django how i start a django server for an android application. > > -- > 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, se

Re: admin site questions

2015-01-31 Thread Andreas Kuhne
2015-01-31 7:14 GMT+01:00 Mike : > I'm building a simple CRUD application to hold some data for our research > group. After 2 hours I have the basic functionality working using the > admin site only and no custom views. I just need to figure out if I can go > ahead and deploy it using the admin

Problem with uwsgi

2015-02-03 Thread Andreas Kuhne
Hi all, We are running our website with nginx and uwsgi at the moment. It is a django 1.7.4 application and it has been running perfectly for a couple of months. Now however we are getting some errors that I can't really explain. The errors always appear after uwsgi has done a respawn of a proces

Re: Problem with uwsgi

2015-02-03 Thread Andreas Kuhne
Thanks Roberto, We are running uwsgi version 2.0.7 so I hope that's ok? Our config is as follows: [uwsgi] logger=syslog:suitopia chdir=/var/canvas/site/src home=/home/ubuntu/.virtualenvs/canvas module=suitopia.wsgi:application master=True pidfile=/tmp/canvas.pid vacuum=True max-requests=5000 dae

Re: CSRF token missing on file upload ajax request

2015-02-09 Thread Andreas Kuhne
Add the following code to your onload function: $(document).ajaxSend(function (event, jqxhr, settings) { jqxhr.setRequestHeader("X-CSRFToken", '{{ csrf_token }}'); }); This way all AJAX requests will always get the csrftoken. Regards, Andréas 2015-02-09 16:19 GMT+01:00 Avraham Serour : >

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-20 Thread Andreas Kuhne
2015-02-20 17:18 GMT+01:00 : > Hi, > > I migrated my project to a new infrastructure but i kept the same versions > Apache 2.2 + mod_wsgi + python 2.6.1 + Django 1.2.1 > > I am trying to run my project and i am getting the below exception that > seems to be from Django and i need help pin pointing

Re: RedirectView()

2015-02-23 Thread Andreas Kuhne
2015-02-23 15:30 GMT+01:00 Brad Rice : > I'm using RedirectView and it is redirecting to my app, but is not > rendering the view in the app I am pointing to. > > I want to redirect my root / to my app /web > > I have this in my primary app urls: > > url(r'^$', RedirectView.as_view(url='/web/', per

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
The reason I asked this is because that means that your connection parameters are correct, so it should work? Sorry I don't know what to do to help you more. Regards, Andréas 2015-02-24 12:49 GMT+01:00 : > Hi Andreas, > > I can connect using "python manage.py dbshell" it connects without any >

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
Hmmm You can use ./manage.py dbshell, so your configuration is correct in THAT case, however, have you set all the variables correctly for django when running apache + mod_wsgi? Has the connection ever worked there? What do the config files for mod_wsgi look like and are all of the paths correctl

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-24 Thread Andreas Kuhne
The file you wrote connects to the database itself, it doesn't use djangos connection, so the only thing you are testing is if you can connect to the database. And that we know (because you are able to do it with ./manage.py dbshell). What you need to check is if the settings.py file used by django

Re: OperationalError: ORA-03114: not connected to ORACLE.

2015-02-25 Thread Andreas Kuhne
Hi Alex, Correct. There seems to be something wrong with the configuration of mod_wsgi, because you are able to connect via dbshell (which loads all of your environment variables and is able to connect). The same thing with runserver. Check for a good tutorial on how to configure apache + mod_wsg

Re: RoR dev having trouble with finding best-packages for Django

2015-03-04 Thread Andreas Kuhne
Hi, I'll give you answers to the questions I know, the others you'll have to wait for others more knowledgable. 1. User authentication, django has django.contrib.auth built in. Checkout https://docs.djangoproject.com/en/1.7/topics/auth/ 2. User authorization, also in the auth package. You can cus

Re: How to track number of visitors on django site

2015-03-10 Thread Andreas Kuhne
his information ourselves somehow. Regards, Andréas 2015-03-10 21:40 GMT+01:00 Vijay Khemlani : > Hmmm... what about the classic Google Analytics? > > On Tue, Mar 10, 2015 at 5:04 PM, Andreas Kuhne > wrote: > >> Hi all, >> >> I would like to be able to track the num

Re: Django 1.6's lifespan for security updates?

2015-03-11 Thread Andreas Kuhne
2015-03-11 13:28 GMT+01:00 Stephen Gallagher : > > On Tuesday, March 10, 2015 at 6:01:28 PM UTC-4, Carl Meyer wrote: >> >> I sympathize with your situation, but Python 2.6 reached end-of-life on >> October 29, 2013 (a year and a half ago now), and since then has been >> unsupported and not receivi

How to track number of visitors on django site

2015-03-12 Thread Andreas Kuhne
Hi all, I would like to be able to track the number of visitors on our website. We previously had django-tracking installed and a munin node that tracked the information. Unfortunately we weren't able to continue using it because it broke our website somehow (I don't remember how). Does anyone ha

Re: Maximum database connections exceeded

2015-03-20 Thread Andreas Kuhne
Hi Hans, I know this isn't really solving your issue, but it can remove a symptom. I have successfully used pgBouncer to pool the connections, so that connections aren't handled by django directly, but you connect to a connection pool, so that it can create and reuse connections more efficiently.

Re: image handling

2015-03-24 Thread Andreas Kuhne
Hi, I think you'll have to be more specific, what do you want to do with the old image? Delete it? Use it again? Regards, Andréas 2015-03-24 10:08 GMT+01:00 : > hi.. > Can anyone please tell me how to handle old image after uploading new > image. > > -- > You received this message because you

Re: image handling

2015-03-24 Thread Andreas Kuhne
Hi, Ok, so what you should do is add a signal to pre save and then delete the old image if the new image is attached. Something like this should work: from django.core.files.storage import default_storage as storage from django.db.models.signals import pre_save def image_delete(sender, instanc

Re: Image resizing

2015-03-24 Thread Andreas Kuhne
Hi, Check out the easy_thumbnails plugin. http://easy-thumbnails.readthedocs.org/en/2.1/ It automatically resizes all images to the size you want if you use it correctly. Regards, Andréas 2015-03-24 11:07 GMT+01:00 : > Hi.. > can anyone please tell me how to resize the uploaded image > Th

Re: Re-run only tests that failed last time

2015-03-24 Thread Andreas Kuhne
If you have created packages for your tests, you can run all tests in a package. If the tests aren't in the same package, it won't help you however. Regards, Andréas 2015-03-24 11:27 GMT+01:00 Gergely Polonkai : > Hello, > > I have a pretty extended test suite for my application, which can run

Re: Image resizing

2015-03-24 Thread Andreas Kuhne
e, Mar 24, 2015 at 6:13 PM, Andreas Kuhne > wrote: > >> Hi, >> >> Check out the easy_thumbnails plugin. >> http://easy-thumbnails.readthedocs.org/en/2.1/ >> >> It automatically resizes all images to the size you want if you use it >> correctly. >

Re: image handling

2015-03-24 Thread Andreas Kuhne
ou please tell me how to use above mentioned function in > edit_profile function in view, Can i call another function from another > function in views.py, if yes please tell me > > On Tue, Mar 24, 2015 at 6:11 PM, Andreas Kuhne > wrote: > >> Hi, >> >> Ok, so wha

Re: image handling

2015-03-24 Thread Andreas Kuhne
,max_length=30,blank=True) > comment=models.CharField(verbose_name = > "Comment",max_length=200,blank=True) > sex=models.CharField(verbose_name = "Sex *",max_length=5,blank=False) > image=models.FileField(verbose_name = "Image(limit 1Mb) > *&quo

Re: Image resizing

2015-03-25 Thread Andreas Kuhne
imageresize = image.resize((100,100), > Image.ANTIALIAS) * > *imageresize.save( 'JPEG', quality=75)* > *regform.save();* > return HttpResponseRedirect('/index/') > else: >

Re: image handling

2015-03-25 Thread Andreas Kuhne
= >> "Pincode",max_length=20,blank=True) >> country=models.CharField(verbose_name = >> "Country",max_length=30,blank=True) >> comment=models.CharField(verbose_name = >> "Comment",max_length=200,blank=True) >> sex=models.Cha

Re: image handling

2015-03-25 Thread Andreas Kuhne
d.Will it be called automatically when i edit image. > > I have used upload function to call a function which change the name of > the image and save it to the database. > > On Wed, Mar 25, 2015 at 1:44 PM, Andreas Kuhne > wrote: > >> Hi, >> >> No, that is n

Re: csrf_exempt decorator and class based views

2015-04-15 Thread Andreas Kuhne
First of all, why are you not using the default views that django provides? In your case all you have to do is subclass the View class (django.views.generic.View) to get all the functionality that you require (i.e. you get a post and get method that will automatically be called). Second of all, ch

Re: Version

2015-04-21 Thread Andreas Kuhne
Hi, First of all, don't use apt-get to install django, you will never get the version you want. Use a virtualenv instead: Google virtualenv install ubuntu (and your ubuntu version). Create a virtualenvironment and install django with pip. Using pip you can install whatever version of django you wa

Re: Invalid HTTP_HOST, can someone explain why I am getting this?

2015-05-15 Thread Andreas Kuhne
You are getting it because someone has come to your server by entering www.g3suprimentos.com.br in a browser. If you don't have that address in the allowed hosts setting, you will get the error you have received. If you don't want your server to show something for www.g3suprimentos.com.br, then th

Re: "&" string to template adds "&" in the html

2015-05-21 Thread Andreas Kuhne
2015-05-21 18:35 GMT+02:00 dk : > I am creating a string inside the view that will be use in the template on > the javascript. > my string in python contains & and I print the view and works fine, but > when is send to the template I don get &. > > is there something magical about & ? or any

Re: need to upgrade django1.4.5-->django1.5, but apt-get install django tells me i'm running latest version

2015-06-01 Thread Andreas Kuhne
2015-06-01 19:17 GMT+02:00 arthur sherman : > i get the following errors in the apache2 error.log: > > VersionConflict: (Django 1.4.5 (/usr/lib/python2.7/dist-packages), > Requirement.parse('Django>=1.5')) > > but when i attempt upgradinging django apt-get install reports that i'm at > the latest

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread Andreas Kuhne
Hi Marcelle, You should not use the user profile solution anymore, because you can now create a custom User model instead. Check for example: http://www.lasolution.be/blog/creating-custom-user-model-django-16-part-1.html This way you can add fields that are needed for your user solutions in your

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread Andreas Kuhne
t; employee and client). can you give a clear example to do this. > thank for your help > > Le vendredi 5 juin 2015 05:31:19 UTC-4, daniel.franca a écrit : >> >> You can define different groups for each role and assign the users to the >> groups. >> >> Em sex,

Django plugin

2015-06-11 Thread Andreas Kuhne
Hi all, I was wondering if there is a plugin application for Django. What I want to accomplish is react to different kinds of events on my models and then create plugins on the fly for them. The system I am working on has for example an Order model. When a new Order is created, I want to send a n

Manually add image to filefield in save method on modelform

2015-06-22 Thread Andreas Kuhne
Hi all, I have created a modelform that has an Imagefield in it. I want to override the save function and manually create a filefield with an image that already exists in the file storage (S3). So the things I have to do would be: * Download the image from S3 and save it to a temporary file * Cre

Re: Installing Django and Python 3.4 on a freshly registered Debian VPS

2015-07-04 Thread Andreas Kuhne
2015-07-04 14:19 GMT+02:00 Christian Kleineidam < christian.kleinei...@gmail.com>: > I want to install Django and Python 3.4 on a freshly registered Debian > server. > What are the steps I have to take given that I want to use Python 3.4 and > not the debian default of 2.7? > I expect I also need

Re: Django - Website Bootstrap Design Breaks For Production

2015-07-17 Thread Andreas Kuhne
Hi, There is a difference to running the runserver in development and production mode. In development mode the server automatically serves all of you static files (JS and CSS). In production mode you should have a webserver in front of the uwsgi server that serves the python code. For example you

Re: Python 3 Usage

2014-07-08 Thread Andreas Kuhne
The main problem that I have seen is that there are some plugins that don't support Python 3 (the biggest issue we are having is django-storages and boto). You can of course patch the plugins yourself and contact the authors to make a pull request. Often the difference is not that great. Regards,

Re: django template

2014-07-16 Thread Andreas Kuhne
Hi, All of your templates are available in all of your apps. So you can use a template from one app in another app (our website is created this way). In other words you can continue to use the same base.html for the second app as well. Regards, Andréas 2014-07-16 9:47 GMT+02:00 ngangsia akumbo

Re: django template

2014-07-16 Thread Andreas Kuhne
Hi again, You can create separate base files, but you will have to save each under different names. For example if you had an app called website, you could have a website_base.html that has {% extends "base.html" %} in it. As to how to link them together? What do you mean? Each app should contai

Re: django template

2014-07-16 Thread Andreas Kuhne
Hi, Sure, but I won't always be able to answer :-) Regards, Andréas 2014-07-16 13:49 GMT+02:00 ngangsia akumbo : > Thanks bro for this inside , can i always contact u personally if i had >> some issues please. >> > > I am from western Africa - Cameroon. > > Thanks in advance > > -- > You rece

Re: user object's is_authenticated() method ALWAYS return True even after they log out??

2014-07-29 Thread Andreas Kuhne
Hi Chris, is_authenticated() on a User should always be true. The reason for this is that you check the function on the request.user object. When a user is logged in, it will be true, however, the AnonymousUser returns false, which is the default when a user has not logged in. So you can only che

Re: Is creating a view necessary ?

2014-07-31 Thread Andreas Kuhne
Hi Vipul, I think you should follow the Django tutorial a bit further. Your HTML pages can be used as templates for the result of the views. Views in django aren't the View in a MVC-pattern, but rather the controller (this was something that confused me when I started in Django). So the python par

Re: How to use send_mail function.

2014-08-04 Thread Andreas Kuhne
Hi Chen, Check this post: http://stackoverflow.com/questions/15985191/how-can-i-send-e-mail-from-django-using-the-google-smtp-server I think you are missing the settings for secure SMTP (which google requires). Regards, Andréas 2014-08-04 9:42 GMT+02:00 Chen Xu : > Hi Everyone, > I am trying

Re: Starting with Python 3 and Django 1.x?

2014-08-11 Thread Andreas Kuhne
You will get issues with some of the third-party plugins. For example getting mysql to work, requires that you use the oracle plugin and not the commonly used mysqldb plugin. Also south and django-storages require patching for them to work. We are rewriting our webpage and upgrading all dependenci

Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
Hi all, I am having a problem with a time field in my mysql database. I can add values to the database, but when I try to read the values, I get the following error: Failed converting row to Python types; can't use a string pattern on a bytes-like object (field start_time) The database model look

Re: Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
> > Many thanks, > > Serge > > > +380 636150445 > skype: skhohlov > > > On Tue, Aug 19, 2014 at 6:09 PM, Andreas Kuhne > wrote: > >> Hi all, >> >> I am having a problem with a time field in my mysql database. I can add >> values t

Re: Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
ateparse.parse couldn't read. When I used decode on it everything works perfectly. Regards, Andréas 2014-08-19 17:31 GMT+02:00 Andreas Kuhne : > Thanks Sergly, > > However, the problem is already when I try and get the object from the > database. I know that it is the convers

Problems with class based views

2014-08-23 Thread Andreas Kuhne
Hi all, I am working on rewrite of our website with the latest version of django and Python 3. I have had alot of strange things occuring because we are using Python 3, however today I had the first problem with django. I would like to know if this is per design or if I have done something wrong.

Re: Problems with class based views

2014-08-23 Thread Andreas Kuhne
Scandinavia AB 2014-08-23 17:36 GMT+02:00 Andreas Kuhne : > Hi all, > > I am working on rewrite of our website with the latest version of django > and Python 3. I have had alot of strange things occuring because we are > using Python 3, however today I had the first problem with django.

Re: response to ajax (jquery) with variables

2014-08-28 Thread Andreas Kuhne
Hi Antonio, import simplejson as json return HttpResponse( json.dumps({ 'array': example }), content_type="application/json" ) That would do the trick. This is returned as JSON. Remember to set the content_type, otherwise the client can get confused. Regards, Andréas 2014-

Re: response to ajax (jquery) with variables

2014-08-30 Thread Andreas Kuhne
nse){ > if(response){ > var data = JSON.parse(*response*); <- NOT SURE IF > THIS IS CORRECT > alert(data[0]); } <- I´m trying to put on > an alert windows the first item of my array arrg > else{ alert('Error!

Django testing hooks

2014-09-03 Thread Andreas Kuhne
Hi all, When running django tests (django 1.6) is it possible to run a specific command before the tests and run a command on failure and on success? I have bought a blink1 (http://blink1.thingm.com/) and would like it to change colour depending on the results of the tests. Is this possible? Reg

Re: try, except problem

2014-09-06 Thread Andreas Kuhne
Hi Brad, 1. Why would app not be not be set if it is in the try statement? Because the except parameter has the app variable in it (which it shouldn't). The correct except definition should be: "except Application.DoesNotExist". You are not looking for if the app variable doesn't exist but rather

Re: try, except problem

2014-09-06 Thread Andreas Kuhne
Glad to be of help. Regards, Andréas 2014-09-06 23:32 GMT+02:00 Brad Rice : > Andréas that was it. I guess I wasn't thinking about that correctly. I > sure appreciate the help. This Django group is a very good group. > > On Saturday, September 6, 2014 1:19:57 PM UTC-4, Andréas Kühne wrote: >> >

Re: Install Django Apps via Admin Interface

2014-09-12 Thread Andreas Kuhne
I really can't see a usecase for something like this. The only time I want to install new packages to my django system is on my dev server while developing something. I would also want the change to be permanent, therefore writing it in my settings.py file. I often forget to add the package to INST

Re: develeopment servers stops at syntax error.

2014-09-13 Thread Andreas Kuhne
That's strange. A syntax error in my django 1.6 also stops the server, without restarting it. I think that's the way it should be, because the server cannot continue processing invalid python files. Regards, Andréas 2014-09-13 10:19 GMT+02:00 Yunus Koçyiğit : > > on django 1.7 if i made a synta

Re: Django hosting

2014-09-25 Thread Andreas Kuhne
Hi Sabine, I would also recommend AWS mainly because of the amount of resources you have at your disposal by using them. We changed from a local provider in Sweden to AWS in Europe, because we needed global reach. By using the resources they have (CDN mainly) we were able to get "closer" to our cu

Re: Which Version of Django

2014-09-30 Thread Andreas Kuhne
You should be aware that using python 3 will give you small problems regarding compability with several plugins for django. Python 3 is becoming more adopted, but it is not always easy to find plugins that do what you want in all situations. That being said, we have just rewritten our website in dj

Re: Static Media Server (Tango with Django)

2014-10-13 Thread Andreas Kuhne
Using a static media server or not is more a choice. I don't think it is an outdated concept, rather the opposite, depending on how you want to deploy it. We are using Amazon CloudFront for our media and static files. That way we don't get the load on our nginx servers (we generate alot of pictures

Re: Customize admin page title (from tutorial)

2014-10-18 Thread Andreas Kuhne
I don't know if it is possible, but you can do it with the django-grappelli plugin Med vänliga hälsningar, Andréas Kühne Software Development Manager Suitopia Scandinavia AB 2014-10-18 14:16 GMT+02:00 : > Hi, > I am new to django. I am following Django tutorial(part2). I want to > know how

Re: Django REST Framework

2014-10-23 Thread Andreas Kuhne
Hi Max, I think you should really just google it a bit and read about it. http://en.wikipedia.org/wiki/Representational_state_transfer is a good start. A simplified version is that a REST API allows you to get information about your database models in a structured and predictive way. HOW the API

Re: Multiple versions of python on linux server

2014-11-03 Thread Andreas Kuhne
2014-11-03 16:46 GMT+01:00 robert brook : > This is the first time that I am having apache configured to run django > > I plan on using mod_wsgi on apache and linux using 2 servers, the apache > server and the application server. > > The linux (red hat 6) / django server had python 2.6 installed

Re: django1.7, python3.4 and MySQL

2014-11-03 Thread Andreas Kuhne
2014-11-03 16:54 GMT+01:00 Larry Martell : > So it seems MySQLdb doesn't support python3, and I see this on the django > site: > > mysqlclient is a fork of MySQLdb which notably supports Python 3 and > can be used as a drop-in replacement for MySQLdb. At the time of this > writing, this is the rec

Re: Can Django be used to create a survey website?

2014-11-04 Thread Andreas Kuhne
2014-11-04 11:23 GMT+01:00 Tobias Dacoir : > I need to create a survey like website. Users should be able to register > and then are presented with different images which they are asked questions > about. > > So essentially I have multiple Sets of Images, a set of questions (not all > questions ar

Re: Global Variable

2014-11-04 Thread Andreas Kuhne
2014-11-04 14:18 GMT+01:00 Sudipta Sen : > > > -- Forwarded message - > From: Sudipta Sen > Date: Tue Nov 04 2014 at 6:46:17 PM > Subject: Global Variable > To: > > > Hi folks, > > I am very new to django and facing some problems. > > 1. I need a global variable, which I can use

Re: Django Instant Messenger Package needed

2014-11-06 Thread Andreas Kuhne
2014-11-06 17:47 GMT+01:00 PublicT : > Hello All, > Can anyone point me to a site or repository where I can find a well > written Package for IM - Instant Messenger. Working on a project that > desperately need one. > > Thanks > > -- > You received this message because you are subscribed to the G

Re: New to Django question about using it without ORM

2014-11-07 Thread Andreas Kuhne
2014-11-07 20:35 GMT+01:00 krmane : > Hello all, > I am absolutely new to Django. > I am really impressed with it's features. > I have used Pylons before, but I realise now that it just does not fit my > way of doings things. > I am into writing financial applications. > As a matter of Fact I have

Re: Using django to translate html

2014-11-10 Thread Andreas Kuhne
2014-11-10 12:31 GMT+01:00 Andrei Balasanov : > What is the best route to localize HTML using django? There is a clear > documentation what to do with the views/templates and javascript, however > we have a set of the html files that are requiring localization. If we > move them to the template

Alternative to fabric

2014-11-17 Thread Andreas Kuhne
Hi all, We are just about ready to release our newly rewritten website. It is based on Django 1.6 and Python 3. We have worked through all of the problems with using python 3 (migrated some plugins ourselves, other plugins were updated during the course of the project). The only problem we have l

Re: Alternative to fabric

2014-11-17 Thread Andreas Kuhne
installed. > Just > install Python 2 to a path like ~/local and give fabric its own virtualenv. > > Best regards, > René > > > On Monday 17 November 2014 12:28:27 Andreas Kuhne wrote: > > Hi all, > > > > We are just about ready to release our newly rewritten websit

Re: Alternative to fabric

2014-11-17 Thread Andreas Kuhne
Thanks all for your answers. I have been looking for alternatives today, and all I have seen have not been python 3 compatible. What I can see however is that fabric (using a separate python 2 environment) or ansible both only use ssh and should not require installing anything on the servers. I su

Re: Advice needed: Adaptive/Responsive Images in Django?

2014-11-20 Thread Andreas Kuhne
2014-11-20 9:44 GMT+01:00 Alex Strickland : > On 2014-11-20 08:05 AM, ThomasTheDjangoFan wrote: > > do you have a tip for implementing adaptive (responsive) images in django? >> >> Basically I want to server smaller images to mobile-users and bigger >> images to desktop users. >> I don't really n

Re: Advice needed: Adaptive/Responsive Images in Django?

2014-11-20 Thread Andreas Kuhne
u Nov 20 2014 at 7:26:27 AM Jorge Andrés Vergara Ebratt < > javebr...@gmail.com> wrote: > >> Actually yo could do it with CSS alone... >> >> You can have the 2 images on the server and add both in the html >> >> >> >> >> And having the CSS

Re: Redirect user inside Class-Based views

2014-12-02 Thread Andreas Kuhne
2014-12-02 15:17 GMT+01:00 Rootz : > I have a small Django App using several Class-Based Views but I am > contemplating how the class views would redirect a user based upon a > condition? In my case I would like to redirect user who are not > authenticated. Just how do I go about doing that? > > t

Django 1.7 problem

2014-12-03 Thread Andreas Kuhne
I am trying to migrate our current website to django 1.7. Currently we are using a plugin called django-dbgettext to get parts of our database translated (we are running in 10 different languages). The problem is that django-dbgettext starts by going through all of the models and does this before

Re: Django 1.7 problem

2014-12-04 Thread Andreas Kuhne
2014-12-04 1:39 GMT+01:00 Carl Meyer : > Hi Andreas, > > On 12/03/2014 01:34 PM, Andreas Kuhne wrote: > > I am trying to migrate our current website to django 1.7. > > > > Currently we are using a plugin called django-dbgettext to get parts of > our > > datab

Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
Hi all, We went live with a new website, completely rewritten in python 3 and with django 1.6 (upgrade to 1.7 is in progress) on November the 18th. Of course there were some minor issues, but most of them have been resolved and so far everything is working really nice. HOWEVER... We are having ma

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
> François > > > On Dec 4, 2014, at 1:49 PM, Andreas Kuhne > wrote: > > > > Hi all, > > > > We went live with a new website, completely rewritten in python 3 and > with django 1.6 (upgrade to 1.7 is in progress) on November the 18th. Of > course there w

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
at a hack I had to put in because a very > long running script was always triggering this issue. > > François > > > On Dec 4, 2014, at 2:03 PM, Andreas Kuhne > wrote: > > > > François, > > > > Thanks for your answer. I will check the settings. The probl

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
:03, Andreas Kuhne wrote: > > Being an RDS instance it's not easy for me to get the my.cnf file, but > > I should be able to see the settings somehow. > You may use the MySQL Statement: show variables; for listing most > configuration properties, wait_timeout included. >

Re: Postgresql Triggers and Django

2014-12-04 Thread Andreas Kuhne
Hi Philip, I ran into this problem earlier today actually. The problem is that you can't provide initial data for populating the models (or tables). That's what this refers to. To provide initial data, you have to run a migration. The initial-data information is only for loading the database with

Re: Mysql connector python 3

2014-12-05 Thread Andreas Kuhne
Hi Collin, Thanks! I tried the CONN_MAX_AGE setting and it didn't work. We still get problems, so I'll have to try changing the connector. The only thing left I think. Regards, Andréas 2014-12-05 5:07 GMT+01:00 Collin Anderson : > Hi Andréas, > > If it helps, mysqlclient (python3-compatible f

Re: Mysql connector python 3

2014-12-05 Thread Andreas Kuhne
connections to time out. > > I spent a while tracking this down a while back but was not able to fully > sort out the issue, I came away with the impression that there was a bug > somewhere in the connection pool code. If you like I have a little spare > time today and can dig int

  1   2   3   >