Re: Django and Rails

2014-05-28 Thread Lachlan Musicman
Also, the community certainly doesn't seem to be fading to me - between this list, SO and the IRC channel, there is lots of movement. There is a new release every 6 months or so and the devs are pushing security updates at about one every two months although that's more dependent on when the

Re: Django and Rails

2014-05-28 Thread Lachlan Musicman
For db changes, you want South, although the author of South has just finished integrating it into Django 1.7. http://south.aeracode.org/ http://south.readthedocs.org/en/latest/ http://south.readthedocs.org/en/latest/tutorial/index.html Version 1.7 of Django, due any day now, will have

Django and Rails

2014-05-28 Thread Enrique Shadah
Hi all, I am learning Django after trying once with Rails. As I am a newbie to software development, Rails seemed more obscure and difficult to digest. I chose to learn Django because Python is easier to understand than Ruby (at least to me) and because I thought it had a bigger or more

Re: virtualenv help needed

2014-05-28 Thread Lachlan Musicman
Two things: 1. Put your media local to your site - I use /home/user/www/dj-project/static and /home/user/www/dj-project/collected_media for project at /home/user/www/dj-project/ 2. The place you are referring to is inside the virtual env's little jail. You can find that by using the

Re: Custom user model backend

2014-05-28 Thread Kelvin Wong
In your settings.py you might have to set the SESSION_COOKIE_AGE https://docs.djangoproject.com/en/1.4/topics/http/sessions/#session-cookie-age K On Wednesday, May 28, 2014 5:49:01 AM UTC-7, Domagoj Kovač wrote: > > Hi guys, > > I extended base user model with certain fields. My code is as

Re: Help - Django App on Heroku & local dev machine

2014-05-28 Thread Kelvin Wong
Clone the app locally http://stackoverflow.com/questions/1872113/how-do-i-clone-a-github-project-to-run-locally Create a virtualenv http://virtualenv.readthedocs.org/en/latest/virtualenv.html#usage Install your requirements $ pip -r your_app_path/requirements.txt Run the dev server

Re: virtualenv help needed

2014-05-28 Thread Kelvin Wong
Why are you placing user media in your /usr/local/.../dist-package directories? (Debian?) Wouldn't it make more sense to place them somewhere in /srv or /var? https://docs.djangoproject.com/en/1.6/howto/static-files/ K On Wednesday, May 28, 2014 9:40:54 AM UTC-7, Deepak Sharma wrote: > > A

Re: Anyone interested in reviewing the code of a small project - BookMarker

2014-05-28 Thread Aseem Bansal
Anyone interested in reviewing updated code? Now the search functionality is working. I have added comments and a link with screenshots of working functionality. Also refactoring done in the Javascript to make code easier to read. I think the functionality should be clearer by the changed code

Re: Mysql DB local socket access errors with mod_wsgi

2014-05-28 Thread Henning Sprang
On Wed, May 28, 2014 at 3:18 PM, wrote: > It's very likely a permissions problem. Webserver processes tend to run under > a special username (e.g. www-data) with very limited permissions - it's > likely that this user does not have access to the socket file. Yeah,

RE: [OT] Web application and image scanner

2014-05-28 Thread Ilya Kazakevich
Hello, * Silverlight * JavaFX * Flash * ActiveX (Windows only) Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegroups.com] On

[OT] Web application and image scanner

2014-05-28 Thread Fabio C. Barrionuevo da Luz
Anyone know any client-side alternative to Java and Java Applets in a Web application to capture images from Network or USB scanner and send to server somehow (WebDAV, HTTP POST FILE, or other way)? -- Fábio C. Barrionuevo da Luz Acadêmico de Sistemas de Informação na Faculdade Católica do

Re: Adding models from one app to another app

2014-05-28 Thread Satinderpal Singh
On Wed, May 28, 2014 at 11:01 PM, Inderpreet Singh wrote: > This is directory structure of my django site > LibreHatti >|- src > |- useraccounts > |- librehatti > |--- catalog > |--- reports > > Now what we need is to

Re: hoping for a quick code review of a few simple class-based generic views

2014-05-28 Thread Howard Edson
Thank you - that helps! On Tuesday, May 27, 2014 3:14:06 PM UTC-7, WongoBongo wrote: > > I'd recommend removing the login_required checks from the views. Put them > in the UrlConf instead: > > from django.contrib.auth.decorators import login_required > > from yourapp.views import MyListsView > >

RE: Adding models from one app to another app

2014-05-28 Thread Ilya Kazakevich
Hello, The easiest way here is to import model module. from django.db import model from some_app.some_package import model as foreign_model class MyClass(model.Model): foo = model.ForeignKey(foreign_model.SomeForeignModel) But you also can import model from any installed app as

Adding models from one app to another app

2014-05-28 Thread Inderpreet Singh
This is directory structure of my django site LibreHatti |- src |- useraccounts |- librehatti |--- catalog |--- reports Now what we need is to reference a model from useraccounts in librehatti.catalog as a foreign key and I am unable to

Re: 1.6.5 as a zip for download?

2014-05-28 Thread carlos
Hi @NeilWalker maybe you need install 7zip http://www.7-zip.org/ in yours winbug Cheers On Wed, May 28, 2014 at 11:09 AM, Neil Walker wrote: > Thanks, I couldn't figure out how to get a zip from github :) > > Might be a good idea to have a zip version at the website

Re: virtualenv help needed

2014-05-28 Thread carlos
Hi, when install virtualenv you need create yours enviroments then you need install all application you need example: $virtualenv django14 #create your enviroments $source django14/bin/activate #activate your enviroments $pip install django==1.4.5 #install all you need application o third party

Re: 1.6.5 as a zip for download?

2014-05-28 Thread Neil Walker
Thanks, I couldn't figure out how to get a zip from github :) Might be a good idea to have a zip version at the website alongside the tar.gz for simple Window users like me ;) Neil. On Wednesday, 28 May 2014 17:51:17 UTC+1, Neil Walker wrote: > > Hello, > I wish to download 1.6.5 stable zip

Re: 1.6.5 as a zip for download?

2014-05-28 Thread Brad Pitcher
Is this what you're looking for? https://github.com/django/django/archive/1.6.5.zip On Wed, May 28, 2014 at 9:51 AM, Neil Walker wrote: > Hello, > I wish to download 1.6.5 stable zip without using pip and not as a tar/gz > (limitations on software I can use at

virtualenv help needed

2014-05-28 Thread Deepak Sharma
A year before I developed an applciation in django==1.4.5 version. Few days before I installed virtualenv with django version 1.4.5. In my application I have to place "media" folder inside /usr/local/lib/[ython2.7/dist-package/django/contrib/admin/media but after installating virtualenv I

1.6.5 as a zip for download?

2014-05-28 Thread Neil Walker
Hello, I wish to download 1.6.5 stable zip without using pip and not as a tar/gz (limitations on software I can use at work), but when I visit the download site and follow the links for manually installing all I get is the latest development build as a zip or 1.6.5 as as tar/z file. Is there a

Re: How to pass URL to a view

2014-05-28 Thread Vibhu Rishi
Thanks Ilya ! Perfect ! That is what I was missing. And point noted about reverse. V. On Wed, May 28, 2014 at 6:04 PM, Ilya Kazakevich < ilya.kazakev...@jetbrains.com> wrote: > Hello, > > 1) Never hardcode urls in Django. Use reverse: >

Re: Mysql DB local socket access errors with mod_wsgi

2014-05-28 Thread jirka . vejrazka
It's very likely a permissions problem. Webserver processes tend to run under a special username (e.g. www-data) with very limited permissions - it's likely that this user does not have access to the socket file. HTH Jirka -Original Message- From: Henning Sprang

Help - Django App on Heroku & local dev machine

2014-05-28 Thread Dr Shauny
Hi, I have a Django app already deployed and fully functional on Heroku. The app was purchased from a third party that transferred the codebase via github. I need to make changes and redeploy the app but understand that this is not possible (or advisable) directly from github itself. I

Re: How to use CreateView with crispy-forms

2014-05-28 Thread Andromeda Yelton
The | crispy filter provides only minimal (though stylish) rendering - if you want to render all the cool stuff in your helper you need to do {% crispy form %}. Andromeda Yelton LITA Board of Directors, Director-at-Large, 2013-2016 http://andromedayelton.com @ThatAndromeda On Wed, May 28, 2014

Custom user model backend

2014-05-28 Thread Domagoj Kovač
Hi guys, I extended base user model with certain fields. My code is as follows: #!/usr/bin/env python > # -*- coding: utf-8 -*- > from django.utils import timezone > from django.conf import settings > from django.contrib.auth.backends import ModelBackend > from django.core.exceptions import

How to use CreateView with crispy-forms

2014-05-28 Thread 9devmail
I want to use CreateView along with crispy-forms generated layout. However, it seems that everything I pass to *self.helper* in *forms.py* is ignored. Form renders nicely, but only with fields generated by CreateView - all fields passed to *Layout* are missing. My views.py > class

Re: Model field's verbose_name from database?

2014-05-28 Thread Степан Дибров
from django.utils.functional import lazy def field_verbose_db(field_name): from app.models import FieldNamesMap return FieldNamesMap.objects.get(key=field_name).title field_verbose_db_lazy = lazy(field_name, unicode) first_name = models.CharField(...,

Re: OneToOne? Inheritance? Another solution for nested model relationships?

2014-05-28 Thread Daniele Procida
On Wed, May 28, 2014, Leonardo Giordani wrote: >I usually solve such issues with Inheritance. I feel comfortable with it >because it lets me (in your example) to manage both ResearchStudent and >ResearchStaff independently, while keeping the Researcher parent model

RE: How to pass URL to a view

2014-05-28 Thread Ilya Kazakevich
Hello, 1) Never hardcode urls in Django. Use reverse: https://docs.djangoproject.com/en/dev/ref/urlresolvers/#django.core.urlresolvers.reverse 2) If I understood you correctly, you need to redirect user back. Use request header REFERER' (check rfc2616 section 14.36). For Django:

How to pass URL to a view

2014-05-28 Thread Vibhu Rishi
Hi, Maybe there is a better way to achieve what I am trying - so any suggestion is welcome :) I have a small view. It does nothing much - if the user clicks a button for being interested in something he is looking at - it adds to the table of interested things. e.g. as below : @login_required

Mysql DB local socket access errors with mod_wsgi

2014-05-28 Thread Henning Sprang
Hi, I'm trying to setup a django production environment with mod_wsgi, and a local mysql which I want to connect via the socket file. Without wsgi the app runs and connects to the database. When running it via wsgi, I get: OperationalError (2002, "Can't connect to local MySQL server through

Re: Data + admin design problem

2014-05-28 Thread Derek
Hi Off the top of my head (as in "do not use directly"!), it seems to me that: 1. You need a boolean field for 'serial' and also one for 'countable' for a Product. One or both must be checked (use clean() to check) when Product is created. 2. Each Product also needs a 'status' field: one of

Re: ASP .NET web service and Django

2014-05-28 Thread shar100101
Thanks everyone. I will try using suds but if suds use C libs, like soaplib does (lxml ), than this wont work too. @Vernon I don't know for IronPython3. I didn't managed to set up Django 1.5, there was errors in Django six.py lib ("""Utilities for writing code that runs on Python 2 and 3""")

Re: Django get queryset year month day

2014-05-28 Thread Leonardo Giordani
If I correctly understand you issue is to get part of the date for each item in a list of datetime.datetime or datetime.date objects. To do this you can process the list after the query new_list = [item.year for item in item] But if your need is to extract fields from the objects in the result

Re: OneToOne? Inheritance? Another solution for nested model relationships?

2014-05-28 Thread Leonardo Giordani
Daniele, I usually solve such issues with Inheritance. I feel comfortable with it because it lets me (in your example) to manage both ResearchStudent and ResearchStaff independently, while keeping the Researcher parent model available to deal with "global" queries and data interaction. As always

Re: Formsets, adding new forms and autocomplete/ajax selects

2014-05-28 Thread Sanjay Bhangar
hey Lachlan, So this had driven me a bit crazy some years ago .. On Wed, May 28, 2014 at 8:42 AM, Lachlan Musicman wrote: > Hola, > > I am trying to get two different "extras" to work. > > I have a form with an inline_formset, which I would like to be able to > add multiple

Django-stripe-payments example project

2014-05-28 Thread yakkadesign
Does anyone know of an example project with django-stripe-payments? All the documentation and tutorials I've found stops after configuring the admin backend. I'm not sure how to setup the forms so that the end user can pay and manage their subscription. I want to use stripe. I'm open to