Re: How do I make my form process data and output in another page?

2014-07-21 Thread Mike Dewhirst
On 22/07/2014 1:07 PM, Jordan S wrote: Hi, I'm trying to make a molecular mass calculator webpage, where a user inputs a chemical formula and gets the mass as a result. I've made this work in python using raw_input(), but now I'd need to use a form with django. I have the html form set up, but

How do I make my form process data and output in another page?

2014-07-21 Thread Jordan S
Hi, I'm trying to make a molecular mass calculator webpage, where a user inputs a chemical formula and gets the mass as a result. I've made this work in python using raw_input(), but now I'd need to use a form with django. I have the html form set up, but when I click "submit", the page just

Converting to Custom User Model (Django 1.5)

2014-07-21 Thread PRyan
We are currently using the following user model setup: settings.py: AUTH_USER_MODEL = 'auth.User' userprofile.py: class UserProfile(DirtyFieldsMixin, User): Is it possible to change these to the following and have South take care of the data as not lose anything? settings.py: AUTH_USER_MODEL

Re: Question about including CSRF token.

2014-07-21 Thread Gonzalo Delgado
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 21/07/14 15:57, Chen Xu escribió: > I am writing a website using Django, and getting confused about > CSRF token, I understand I need to include the csrf token on my web > page to prevent the CSRF attack. However, I am also working on a > mobile

Re: Introducing myself and my first question

2014-07-21 Thread Mario Gudelj
Hey Martin, I can guarantee you that PyCharm is totally worth buying. It will speed up your development drastically and it works really well with Django. Autocompletion both in Python and template code, syntax highlighting in both, easy Option+Enter imports, navigation through code, refactoring.

Re: Introducing myself and my first question

2014-07-21 Thread Martin Torre Castro
Thanks to you also, Chen, I read you the last, but not least. I looked at PyCharm's price but it seemed expensive for buying for being used by two people at developing. I take care of the 'pip freeze' tip. :-) On Sunday, 20 July 2014 03:48:37 UTC+2, Edward Chen wrote: > > Hi - I am kind of new

Re: Introducing myself and my first question

2014-07-21 Thread Martin Torre Castro
Thanks to you both. I know the URL, Ariel, and I will look at it when beginning the implementation. Thanks Cal for the comments. I've been heard very well about Sublime Text and I'm planning ot use it, not as a IDE, but for other issues as a complementary editor. On Sunday, 20 July 2014

Re: django + Mysql connector

2014-07-21 Thread François Schiettecatte
Check this thread: https://groups.google.com/forum/#!topic/django-users/cb_IGZXVuVQ François On Jul 21, 2014, at 4:23 PM, Henrique Oliveira wrote: > Hi there, > > I am getting this error after hours: > > File

django + Mysql connector

2014-07-21 Thread Henrique Oliveira
Hi there, I am getting this error after hours: File "/opt/d/lib/python3.4/site-packages/django/contrib/sites/models.py", line 45, in get_current current_site = SITE_CACHE[sid] KeyError: 1 During handling of the above exception, another exception occurred: Traceback (most recent call

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-21 Thread Martin Torre Castro
Thanks Mulianto, ngangsia and Tom. I'm working in Ubuntu but I will take advantage of your instructions ngangsia when setting up all the "machinery". Thanks also Tom, for the advice and the requirements tip, as this will be another thing we're trying for the first time in future. On Sunday,

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-21 Thread Tom Evans
On Sun, Jul 20, 2014 at 1:41 AM, Martin Torre Castro wrote: > Hello, > > my name is Martin and I'm a computer engineer from Spain. I'm going to start > a new project with a colleague and I decided to use Django because we > searched for free opensource tools and I'm in love with

Question about including CSRF token.

2014-07-21 Thread Chen Xu
Hi Everyone, I am writing a website using Django, and getting confused about CSRF token, I understand I need to include the csrf token on my web page to prevent the CSRF attack. However, I am also working on a mobile app, which will sends request to my website API, and get response back, how

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-21 Thread ngangsia akumbo
If you are working with windows , let me give you a very simple guide. Google and download setuptools.exe and install in to your computer. First install python 2.7 ans set the python path Then move to this directory C:\Python27\scripts in the windows command . You should run easy_install pip

Initial data in 1.7

2014-07-21 Thread Tomas Ehrlich
Hi there, as pointed in documentation [1], automatic loading of initial data from initial_data.[xml/yaml/json] is deprecated since 1.7 in favor of data migrations. However, there are several drawbacks and differencies: 1. Data migration is executed only once (unless migrations are

Re: managing temporarily created files

2014-07-21 Thread alghafli
Dear Paul, Thank you for the fast and useful reply. However, I have two questions. According to django documentation, HttpResponse accepts string parameter. Does it also accept binary data. I am using python3 in which string is a unicode string and binary data are stored in bytes class. Second,

Re: Recommendation/alternative for multi-tenancy under django

2014-07-21 Thread Subodh Nijsure
Unfortunately one of our requirement is to use mySQL. So this wouldn't work with that correct? To be honest at this moment I am not sure of pros & cons of using mySQl v/s postgres I will do some more research on that and see if switching to postgres SQL is an option. -Subodh On Fri, Jul 18,

Re: Dictionary-style string formatting

2014-07-21 Thread Paul J Stevens
https://docs.python.org/2/library/stdtypes.html#string-formatting-operations On 21-07-14 16:21, François Schiettecatte wrote: > Hi > > Here it tells me that 'The given URL may contain dictionary-style string > formatting...': > > >

Re: managing temporarily created files

2014-07-21 Thread Paul J Stevens
On 21-07-14 17:09, alghafli wrote: > I want to dynamically create a temporary odt file and upload it to the > client. The file is dynamically created based on GET request parameters. > It basically searches the database and fills the odt file with > information. This file is temporary and

managing temporarily created files

2014-07-21 Thread alghafli
Hello django community, I am currently developing my first web application. Since I am new to web development, I thought I should seek advice on what I am trying to implement at the moment. Before I start, here are my questions: *can django do this?**if not, is there a python library that can

Re: looking for a good tutorial for creating user with fb,tw,google login

2014-07-21 Thread Luca Corti
Il 2014-07-20 20:53 Bussiere ha scritto: there is no twitter in django-allauth. Twitter is there. https://github.com/pennersr/django-allauth/tree/master/allauth/socialaccount/providers/twitter ciao Luca -- You received this message because you are subscribed to the Google Groups "Django

Dictionary-style string formatting

2014-07-21 Thread François Schiettecatte
Hi Here it tells me that 'The given URL may contain dictionary-style string formatting...': https://docs.djangoproject.com/en/1.6/ref/class-based-views/base/#redirectview and to get it to work I have to put an 's' at the end of the url parameters: url('^(?P\d{6})$',

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-21 Thread Phang Mulianto
Hi Martin, Virtualenv is use for using different version of python or python library so it wont use the default python in system. So when open eclipse for editing, no need to activate virtualenv, but when you need to run the code in specific python install, you need to activate virtualenv.

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-21 Thread Martin Torre Castro
Firstly, I want to say "thank you" to you, Thomas. Secondly, could you or someone how does the development cycles work with virtualenv? Is this way of working just as I wrote? I think it works by activating the virtualenv every time with a "source activate" command and after that starting to