Re: Finding a developer

2012-06-24 Thread Mengu
well, it may be hard to find if you require their presence otherwise you will find many great developers who are looking for remote full/ part time work. On Jun 24, 11:35 pm, "Bob Carlson" wrote: > I have been planning to implement my backend server in Django/Python but I am > still in the early

Re: Django user should not login on multiple machine with same username and passowrd when user already login on one machine

2012-08-10 Thread Mengu
there are two simple ways. have your own login view first. in your own login logic: 1) assuming you have a UserProfile model, add a field called is_online. in your login view after logging the user successfully, set the is_online field for this user to True. 2) if you are using redis or memcach

Re: UnicodeDecodeError with non ascii app_label

2012-08-10 Thread Mengu
do you have "# -*- coding: utf-8 -*-" at the top of your file? On Friday, August 10, 2012 4:29:01 PM UTC+3, vitalije wrote: > > Hello, > I have recently updated my django installation to version 1.4. > When I try to get an url that doesn't have a match in urlpatterns, > django-server replies wi

Re: How to group models month by month.

2011-09-06 Thread Mengu
this is overkill. the query you actually need is this (there even can be a better way): SELECT DATE_FORMAT(pub_date, "%Y %M") as pub_date, COUNT(*) as count FROM app_posts GROUP BY pub_date ORDER BY count DESC i have no idea how to pull this query by the Django ORM but you can run this as a raw q

Re: Django tutorials

2011-09-22 Thread Mengu
django from the ground up series is good. watch at http://showmedo.com/videotutorials/series?name=PPN7NA155 On Sep 22, 8:18 am, ANKUR AGGARWAL wrote: > Hey > I am currently searching for django video tutorials. I am unable to find > them on web. Was expecting them at lynda.com but they doesn't p

Re: Which Linux distro to use on EC2?

2011-11-13 Thread Mengu
if i had to choose a linux distro, i'd go with debian. however if i can choose whatever i want then i'd go with freebsd. we are using freebsd on 6 web servers and debian on 2 with the same hardware configuration freebsd is outperforming debian. On Nov 13, 9:56 pm, ydjango wrote: > I am setting up

Re: Widgets

2011-11-22 Thread Mengu
there are tons of django apps. you can search them, install and use in your application without any problems. for example for your rich text editor need, you can use django- ckeditor application. it also gives you the possibility of browse and upload images on the fly. for the rest of your needs

Re: Best way to upload and play a video

2011-12-11 Thread Mengu
if you are having problems with the django basics then you have to re- do the django tutorial at https://docs.djangoproject.com/en/1.3/intro/tutorial01/. here is your work flow: * create your django application. * create your models. * build an upload form. * get the user input. * save it to you

Re: Initial data for dynamic field

2011-12-23 Thread Mengu
you need to set "initial" attribute of TypedChoiceField. On Dec 23, 10:34 am, Martin Tiršel wrote: > Hello, > > I have: > > class SomeForm(forms.Form): >      ... > >      def __init__(self, *args, **kwargs): >          ... >          super(SomeForm, self).__init__(*args, **kwargs) >          ...

Re: Ember.js or Backbone.js for Django?

2011-12-23 Thread Mengu
they both belong to the template concept of django. you can write down your front-end with ember or backbone and write your back-end with django models and views. it is all up to your tastes and requirements to use one of the two. On Dec 23, 2:05 am, Jesramz wrote: > Which of these is best suited

Re: Running html files in /var/www alongwith Django over Apache

2011-12-23 Thread Mengu
hi nipun, please go read about the DocumentRoot directive [1] and VirtualHosts [2] in Apache. [1] http://httpd.apache.org/docs/2.2/mod/core.html#documentroot [2] http://httpd.apache.org/docs/2.2/vhosts/ On Dec 23, 8:06 am, nipun batra wrote: > Hi,I got my Apache Mod_WSGI and Django working > f

Re: Django - Forms Widget TypeChoiceField - how to set id for two radio buttons

2011-12-26 Thread Mengu
hi luke, instead of setting auto_id to False, you should give it a string parameter. please read more on https://docs.djangoproject.com/en/dev/ref/forms/api/#ref-forms-api-configuring-label. all the best. On 26 Aralık, 21:45, luke lukes wrote: > hi everyone. i'm using a form with a TypeChoiceFi

Re: USStateField default value

2011-12-31 Thread Mengu
hi erisa, please try passing "initial" instead of default. On 31 Aralık 2011, 23:52, Erisa wrote: > I wanted to have a select box for the state with California as the > default.  I first tried in my model the following: > > state = USStateField(blank=True, default='CA') > > This gave me the erro

Re: Can I set a "global" variable after user login, to use in my view?

2013-01-22 Thread Mengu
hi fellipe, if you enable auth context processors and pass in RequestContext to render_to_response you can always access the user in your templates which also means you can access the associated profile as user.profile (assuming your model is named profile) please read more at https://docs.djang

Re: Upload multiple files using Ajax

2013-01-22 Thread Mengu
i used jquery.form plugin back in the day. it worked great but it had issues with large files. check out http://malsup.com/jquery/form/progress3.html and http://malsup.com/jquery/form/ On Jan 22, 6:05 pm, Andre Lopes wrote: > Hi, > > I need to develop a form to upload multiple files. > > I was t

Re: Django hosting companies

2013-01-29 Thread Mengu
some of my friends are using webfaction. i use linode and in the past i have used webbynode. On Jan 29, 3:17 pm, francislutalo wrote: > Anyone with an idea of which are the best companies to host my django > applications? > > Thank you, > Regards > francislutalo -- You received this message bec

Re: best practice override admin 1.2 "delete"?

2011-04-14 Thread Mengu
you can override the delete method for your models and set a column ie, is_deleted to True or something else in there. so, subclass models.Model, override delete option and your models should extend your new subclass. On Apr 14, 11:51 am, λq wrote: > Hi list, > > We have a production django app u

Re: how to use variables in settings.py on template + how to use the media

2011-04-14 Thread Mengu
this will help you out: http://stackoverflow.com/questions/433162/can-i-access-constants-in-settings-py-from-templates-in-django/433209#433209 On Apr 14, 4:33 pm, GKR wrote: > please help -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: how to use variables in settings.py on template + how to use the media

2011-04-14 Thread Mengu
sorry, i've got you wrong. i thought you wanted to use the constants in your views which were defined in your settings.py file. your real problem is about serving static files. reading http://docs.djangoproject.com/en/dev/howto/static-files/ will help you. On Apr 14, 5:03 pm, GKR wrote: > plz he

Re: Stackoverflow kind of Answer/commenting app in Django

2011-04-14 Thread Mengu
doesn't pinax provide something like this? On 14 Nisan, 21:44, AJ wrote: > >>Here's a fun thought, why can't a custom blog  like enty and the comments > >>framework be utilized to do this? > > Precisely but I was hoping I'd get something with modifications. > > Here is what I require: > > * Posts

Re: best practice override admin 1.2 "delete"?

2011-04-15 Thread Mengu
Hi, I've just asked in the #django channel. Read this http://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.queryset. On Apr 15, 6:27 am, λq wrote: > Thanks Mengu, > > I have another question: > > how to set admin's default vie

Re: best practice override admin 1.2 "delete"?

2011-04-15 Thread Mengu
glad it did work :) On Apr 15, 10:32 am, λq wrote: > Wow, this is exactly what I am looking for. Thanks a million! :D > > 2011/4/15 Mengu > > > > > > > > > Hi, > > > I've just asked in the #django channel. Read this > > >http://doc

Re: How to send email from html?

2011-04-17 Thread Mengu
that is actually jquery code, mixed with a django template variable. $ is an alias for jquery which lets you do some nice things with it. you can also replace it with "jQuery('#send_..')". #send_{{ forloop.counter }} means the element with id "send_x". x there is whatever the current forloop.coun

Re: how to find if a record changed

2011-04-17 Thread Mengu
i believe it does. you can override the "save" method of your model like this: from django.db import models from datetime import datetime # Create your models here. class TestModel(models.Model): first_field = models.CharField(max_length=255) second_field = models.BooleanField()

Re: best practice override admin 1.2 "delete"?

2011-04-17 Thread Mengu
[1]. [1] http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_delete good luck. On Apr 14, 3:21 pm, Mengu wrote: > you can override the delete method for your models and set a column > ie, is_deleted to True or something else in there. so, subclass > models.Model, overrid

Re: Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Mengu
you mean like if a new object is being added or edited in the admin? On Apr 18, 1:58 pm, Sithembewena Lloyd Dube wrote: > Hi all, > > I wish to find out how I can detect current form mode in admin.py. What I am > trying to do is to stop users changing a dropdown's selection when in edit > mode. >

Re: Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Mengu
na Lloyd Dube wrote: > @Mengu, yes, precisely :) > > > > > > > > > > On Mon, Apr 18, 2011 at 1:20 PM, Mengu wrote: > > you mean like if a new object is being added or edited in the admin? > > > On Apr 18, 1:58 pm, Sithembewena Lloyd Dube wrote: > &g

Re: Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Mengu
ot let update. } On Apr 18, 3:56 pm, Mengu wrote: > well, that could be done via javascript. :) > > http://localhost:8000/admin/testapp/testmodel/2/- means i'm > updatinghttp://localhost:8000/admin/testapp/testmodel/add/- means i'm adding > > if (document.location.hr

Re: My tool to generate django code

2011-05-22 Thread Mengu
I also did like it as well. however I wouldn't feel secure when I started a new start-up project so open sourcing the application would be very neat, imho. congratulations and thanks anyway! :) On May 22, 7:54 am, Brice Leroy wrote: > Hello guys, > > I posted a while ago about my project on this

Re: Django training resources?

2010-12-17 Thread mengu
hi, i think you should definitely watch this screencast series: http://showmedo.com/videotutorials/video?name=336&fromSeriesID=336 On Dec 18, 1:12 am, Sean W wrote: > Is anyone aware of good quality, affordable training for Django?  I'm > entirely new to web development, although I do have s

Re: Djangoweek.ly, a Django weekly newsletter

2010-12-21 Thread mengu
nice idea Jon. subscribed! On Dec 21, 2:00 pm, Jon Atkinson wrote: > Hello, > > I just wanted to drop a quick note to promote Django Weekly, a new weekly > Django newsletter which I'm putting together. I'm looking to send the first > issue around the 1st of January. Hopefully this will be of inte

Re: Django real world website samples (with django source codes)

2011-04-08 Thread mengu
go to http://github.com and http://bitbucket.org and search for django. On Apr 8, 5:21 am, djangodjango django wrote: > thanks. > > > > > > > > On Thu, Apr 7, 2011 at 4:38 PM, Nikos K wrote: > > Here is a list with a lot of sites based in django > > >http://www.djangosites.org/ > > >

Re: how to have different logo for django admin based on URL

2011-04-10 Thread Mengu
I don't know if there is a Django way for this, however this can be achived very easily with javascript. On Apr 9, 2:36 am, rahul jain wrote: > Anyone ever tried to have different logos for admin based on the URL > > Like > > http://url/comp1 > > use comp1 logo for django admin always > > http://

Re: Subqueries

2011-04-10 Thread Mengu
i believe you can do this with "extra" attribute. go to http://docs.djangoproject.com/en/1.3/ref/models/querysets/ and search for subquery. you'll see how to do subqueries. On Apr 6, 5:30 pm, bernatbonet wrote: > Data Model: > class A(models.model): >    desc: model.CharField() > class B(models.

Re: What do you use to build facebook applications with django?

2011-04-11 Thread Mengu
facebook api is all about asking for it to do something and getting the response of it. what are you stuck with? On Mar 16, 5:46 pm, mongoose wrote: > Hi, > > I've been struggling so much trying to get a Facebook app to work on > the Django framework. Mostly battling with pyFacebook. For some > p