Re: django docs __unicode__ return u'%s %s

2012-01-27 Thread coded kid
Hey Petr, thats what I'm trying to say. Just that I didnt construct my sentences well. Thanks. JohnA wrote: > Just to fill in some more info, __unicode__ methods are also part of > core python and just happen to appear a lot in django code because of > its preference for 16-bit unicode strings (

ipaddress

2012-01-27 Thread Jisson Varghese
Hi all, First am sorry ,its a python specific question not django based. I am developing a mobile application, using python in server side. I want to get user's ipaddress(Now user's request not sending ipaddress as a parameter to my server). I am using cherrypy server , Now I take IPaddress usin

RE: Determine gender from first name

2012-01-27 Thread walter capio
All depends on how many users you have and how accurate you want your data to be. If your language uses specific morphemes for women (usually non-european languages have marked feminine morphemes; male names and pronouns are not marked), then you could write a parser for these names. Yet I doub

Re: How do you pass dissimilar data from view to template?

2012-01-27 Thread BillB1951
Thanks for the additional thought on this. It is a much appreciated confirmation to me. Last night I was torturing my brain over the logistics of what I had conceived, and by this morning I had pretty much concluded that I would have to go the route you are suggesting. Now I just have to find an

Re: How do you pass dissimilar data from view to template?

2012-01-27 Thread Thorsten Sanders
If the data is presented as table, datatables is a really nice jquery plugin for such stuff: http://datatables.net/ On 27.01.2012 17:31, BillB1951 wrote: Thanks for the additional thought on this. It is a much appreciated confirmation to me. Last night I was torturing my brain over the logis

saving in a view

2012-01-27 Thread MikeKJ
I have 2 models Count is purely an incremental counter a model called Sale, the reason for the Count models is to increment a reference for Sale and other models In a view I get the latest sale and count then I want to save the incemented count (number) to Count also save number to Sale customer

Re: saving in a view

2012-01-27 Thread Ian Clelland
On Fri, Jan 27, 2012 at 9:26 AM, MikeKJ wrote: > I have 2 models Count is purely an incremental counter a model called Sale, > the reason for the Count models is to increment a reference for Sale and > other models > > In a view I get the latest sale and count then I want to save the > incemented

Re: /?next= not redirect user

2012-01-27 Thread snow leung
first: use in your html template. second: you can do it in your login method: def login(request): if reqeust.GET: #do something u want. return render_to_response('your html template', {next_url:request.GET.get('next',None)}) if request.POST: if login():

Re: language="JavaScript" solves onload in chrome

2012-01-27 Thread snow leung
how about in firefox ? if the same that we can do anything about this. if not you can u jquery method $(function(){ //do your initrail or other. }) jquery method was not like body onload. On 1月10日, 上午11时34分, Charles Cossé wrote: > Hello, > > Just writing to share a revelation -- that using:

Re: what is django.db.models.Q for?

2012-01-27 Thread snow leung
thanks ,helpful On 1月11日, 上午10时38分, Eugene Wee wrote: > Hi, > > On Wed, Jan 11, 2012 at 10:27 AM, Yekui Wen wrote: > > can you guys tell me what is the Q method for ? > > Yes, though they are Q objects, not methods. Refer > to:https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-loo

Re: /?next= not redirect user

2012-01-27 Thread Krator Ado
you can do this by doing: If a page requires logined, like a uri "/blog/create/" which is routed to a function "create_blog()" , you can redirect this to login page followed by the url for example: # /your-project/blogs/views.py # suppose your User has a method named is_logined() to judge if the u

Historical Records

2012-01-27 Thread luis sanchez
Hi everyone, I want to know. how can I save a Historical record when an admin user edit something using admin actions. I mean, save the user and the field that was modified. thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Managing a long and complex form

2012-01-27 Thread Jair Trejo
Hello, I have a huge form, based off a model with dozens of fields. Most of them are easily rendered with: {{ field.label_tag }} {{ field }} or something to the effect. Some others require custom html, for instance a "location" field that couples a textbox with a google map, or a "are

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-27 Thread Naveen Arjunan
try dotcloud..it is free for 2 services... It runs on EC2 and you get all the advantges of EC2. http://olddocs.dotcloud.com/tutorials/django/ On Thu, Jan 12, 2012 at 12:31 AM, Chen Xu wrote: > Hi, everyone: > Does anyone know any blogs that write about how to quickly install and > deploy a djan

django very slow on IIS (Windows server 2003)

2012-01-27 Thread ab
Hello, First post here, I'd like to thank everybody for the many answers I've found here! I've been using Django for a few years now (since 2008) and installed different versions on Linux systems. My problem now is that I HAVE to install Django on a windows server (customer has only one computer

Error with creating mysite first django tutorial

2012-01-27 Thread samuel muiruri
I'm having a problem with the procedure stated on making you're first project... I'm not sure how exactly it should work since python syntax can't work with the dashes and command prompt of window wouldn't i need to navigate to the folder where the admin file is? I'm good with python I'm just stuck

Re: Completely decoupled development

2012-01-27 Thread ChrisRenfrow
I don't feel there is enough information to really say if this would work, however the first thing to come to mind as far as issues would be cookies / authentication for both domains would need to be handled. Maybe doing a central "Dashboard" that runs off a single domains and then do a API type in

Apps vs Project

2012-01-27 Thread Grant Copley
Hey guys, I'm a 12 year ColdFusion guy learning Django and Python and had a quick question. If this is the wrong place to post this question, I apologize. I'm interested in converting a Customer relationship management (CRM) system currently written in ColdFusion over to Python using Django, howe

Re: Class-Based Generic Views (CreateView) - field exclusions and defaults

2012-01-27 Thread alej0
self.object is None because you the workflow is def form_valid(self, form): self.object = form.save(commit=False) self.object.user = self.request.user self.object.save() super(CreateCampaignView, self).form_valid(form) # that does the redirect actually it's not necesary to neme i

Trying to use one model class as a default for another.

2012-01-27 Thread GFX Complex
So I have an idea where I want to create a table where it is linked to another where if there are default value it will pre populate the fileds. here is a sample model - My problem is I dont know where to start. Any concept of idea would greatly be welcome. In my example If you picked a existing

AttributeError: 'module' object has no attribute '_handlerList'

2012-01-27 Thread MURUGESAN
I am new bee to Django. Can some one help me what is below error and how to solve? C:\PythonExamples\compass>python manage.py runserver 18080 Traceback (most recent call last): File "manage.py", line 14, in ? execute_manager(settings) File "C:\Program Files\Python24\lib\site-packages\djang

Change language prefix of current page in template

2012-01-27 Thread Dmitry Zimnukhov
Hi. In my project i use i18n_patterns to prepend language code to every url. There are two languages available: en, ru. I want to create a link on every page to the same page but in different language. For example, there should be link to /ru/spam/eggs/ from /en/spam/eggs/. In other words, I need

Django silences exceptions raised by functions called during template rendering

2012-01-27 Thread Ioan Alexandru Cucu
Hi guys, Using django 1.1.1 Example template snippet template snippet: {{ foo.bar }} If 'bar' raises an AttributeError, the exception is silenced and an empty string is displayed. I tried setting DEBUG, TEMPLATE_DEBUG, and DEBUG_PROPAGATE_EXCEPTIONS to True, but nothing changes. Digging through

issue with session's key that disapear

2012-01-27 Thread piloupolok
Hello the community! First i want to thanks you for your work on django and for watching my post! I have used django for a month for an enterprise project. And im a kind of french noob in web developpement and in django developpment :D here is my problem: in a view im setting a key in request.ses

Error with Apache + mod_wsgi

2012-01-27 Thread polar
Hi, I deployed my django projects in virtual environnement with apache and mod_wsgi 10 monthes ago. I had not any problem with them but since three days, I can't get my websites under django, apache and wsgi. In the apache var logs, I have this errors when I restart apache and I try to get the u

Django Session timeout limit clarification

2012-01-27 Thread Imran Azad
I just want to clarify session timeout in Django. The default timeout is two weeks, if a user keeps on accessing a website within the two weeks, will it ever expire? I'm assuming that each time a user accesses the website the session timeout resets back to two weeks, is this correct? -- You recei

Re: Staticfiles on shared hosting using FCGI

2012-01-27 Thread Andrea Mucci
Have you try this '%s/your_static_folder'%os.path.dirname(__file__) You crete a folder in the same position of settimg.py El 14/01/2012, a las 08:06, Tundebabzy escribió: > I am stuck after running collectstatic. I don't know how to point the > server to STATIC_ROOT. > Can someone give assista

UnicodeDecodeError - Windows 7

2012-01-27 Thread newbee
Hi all, I saw some errors post like mine but I still can find a solution to my problem. I get the error below when trying to call to a view I wrote. Since I'm trying to solve this issue for few hours - I will appreciate any help. NOTE that I already had Python version 2.7 and it did not work as wel

Symposion as an event directory (meetup.com/eventbrite style)

2012-01-27 Thread Paul Schlacter
I am considering extending Symposion into an event-directory alike to meetup.com or eventbrite. Has this been done before, if not, would anyone be interested in helping me do this? Best regards, Paul Schlacter -- You received this message because you are subscribed to the Google Groups "Dja

[no subject]

2012-01-27 Thread Arun Ashok
Hai all, I want to develop a django application for online objective type examination.For this i wish to use radio buttons for selecting answers and calculate mark and result at the time of the completion of exam.So i kindly request to my dear friends please give advice for creating this applica

Re: Web Servers for Django Projects [WAS: Does anyone know any blogs...]

2012-01-27 Thread Dale
Hi everyone, great discussion for a Django noob, I'm learning lots! What's the consensus (wink) on choice of web server if one is forced to use the same server for dynamic Django/Python _and_ PHP content, and also static content? I guess no one's really forcing me, but it feels like if I have to s

LEARNING DJANGO- NEED HELP (ERROR 404)

2012-01-27 Thread Dharmendra Verma
NEED HELP- I started learning Django, and was following tutorial from http://www.djangobook.com/en/1.0/chapter02/ , but when i started server after editing view file (followed tutorial as it is) getting error- Page not found (404) Using the URLconf defined in mysite.urls, Django tried these URL pa

Fcgi problem

2012-01-27 Thread Angel Lacret
It doesn't match the urls.py file even if i update the .fcgi file -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users

Re: One To One relationship with a generic relation?

2012-01-27 Thread snow leung
no way On 1月15日, 上午9时15分, Stodge wrote: > I've used generic relations and they worked, but in one particular > case I need a one-to-one generic relation. Is this possible? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

GeoDjango - Error while importing data

2012-01-27 Thread Serge RABEVOHITRA
Hi, I've just begun to learn GeoDjango. So I followed step by step the "geodjango tutorial". When I was at the step "Import data" (TM_WORLD_BORDERS-0.3.shp) , i've got this error message : "Failed to save the feature (id:0) into the model with the keyword arguments : {'iso2' : u'AG' DatabaseEr

how to lookup dictionary in filter return?

2012-01-27 Thread snow leung
my filter return dictionary like this: {{ somevalue | dic_filter }} but when i try this {%for itm in somevalue | dic_filter %} {{itm}} {%endfor %} it only print the key how can i get the value with this ? thx! -- You received this message because you are subscribed to the Google Groups

Re: filebrowser not uploading

2012-01-27 Thread Bojan Liu
i got the same error, upload button can't work. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/S9gz6eKUU_QJ. To post to this group, send email to django-us

how to embedd video

2012-01-27 Thread jak.plopelor
how do can I embed video in a django template? what I tried is this (using jwplayer): ''' {% if error_message %}{{ error_message }}{% endif %} Loading the player ... jwplayer("container").setup({ flashplayer: "/player.swf", file:

failing django install on dreamhost

2012-01-27 Thread ebhakt
I have tried to install django on dreamhost using many ways : 1. I have tried the official django install script from dreamhost 2. tried to follow instructions as per http://jeffcroft.com/blog/2006/may/11/django-dreamhost/ But in all the cases it fails at the syncdb step I tried the ste

Multi-conference, multi-user version of Symposion? (Meetup.com/EventBrite style)

2012-01-27 Thread Paul Schlacter
Would anyone be interested in working with me to develop a multi-conference multi-user version of Symposion? Basically I want to create an open-source meetup.com/eventbrite style site allowing users to create events (including paid ones). An RSVP list will need to be shown on the event, as well a

Problems with Django Form Processing

2012-01-27 Thread zhyr28
Hi all, I want to develop a survey app that has ten radio selects. After people submit the survey, the data will be processing and then output the result. I met a problem when I was trying to process the data from the form. Here is the code: forms.py: contains the survey questions. QUESTION_ONE= (

Re: cannot set GeometryProxy with value of type

2012-01-27 Thread Ryan H.
Hi Antony, I don't know if you've already gotten your answer (hopefully), but if not, I can share my notes on what I did to solve the problem when I saw the same error: First, check the spatial data in your database. There should be a column called "type" with an entry for each geometry. I'm be

User-specific sites

2012-01-27 Thread Eryn Wells
Hi all, This is my first post and it's a simple question... (I think) In my experience, it seems like Django allows users to log in to access and modify the same content, like a blog with multiple authors or a CMS. I'm trying to figure out how to do user-specific sites – something like a blog s

Should someone with no programming experience start learning Python, or Django (along with Python) first?

2012-01-27 Thread Steve
Just as the title says, I have basically no programming experience. I want to program purely for the web. I know a bit of HTML, CSS, and very minimal amounts of Java. Can I start learning Django first and go from there? Is that a bad idea? -- You received this message because you are subscrib

Re: tutorial 2 admin site problem

2012-01-27 Thread Alexandru Moldovan
Did you declared a super user when you've created the database for the first time from you app? On Wed, Jan 18, 2012 at 12:39 PM, Denis Darii wrote: > You can replace: > > url(r'^admin/', include(admin.site.urls)), >> > with: > > url(r'^/', include(admin.site.urls)), >> > in your *urls.py* if yo

What am I doing wrong with this URL Pattern

2012-01-27 Thread Django Newbie
Hi, I am trying to figure out a way to call a function depending on the parameter in the URL. Example. url(r'^People/Info/(?P\d+)/$', 'iFriends.People.views.details'), url(r'^People/Info/(?P[a-z]{3})/$', 'iFriends.People.views.detail_name'), It works with numeric value. if I use "http://localho

Retrieving repository details github using github API

2012-01-27 Thread anoop mohan
I need to create a web app in Djangok. This web app should take a list of github usernames and show the recent commits as well projects owned by this github user. The list of users should be stored in the DB and I should be able to update this from the Admin. Use the github API. Currently I hav

Re: ImageField filename

2012-01-27 Thread wayne
This is the same as the FileField. The UploadedFile class has a name property, which can be used.. https://docs.djangoproject.com/en/dev/topics/http/file-uploads/#handling-uploaded-files On Jan 19, 9:56 am, Mike Dewhirst wrote: > How do I get the actual filename of the uploaded image? > > The

Django vs. Ruby on Rails

2012-01-27 Thread Brian D
I'm wondering about diving into Ruby on Rails to qualify for a position, or spending my time instead going deeper into a full bells and whistles prototype Django site and betting on jobs opening up in my field. This is really a GIS career professional question. Has anyone here crossed the fence ov

Re: ImageField filename

2012-01-27 Thread Damian Soriano (Gmail)
You can define a function that returns the path to upload the image, in this function you receive as argument the object being saved (instance) and the name of the file (filename). You can return whatever you want as a path (that include the filename) def upload_path(instance, filename): retur

help with tutorial 01

2012-01-27 Thread Cyd
In the tutorial here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ I get no errors up until the p.save() at the end: # No polls are in the system yet. >>> Poll.objects.all() [] # Create a new Poll. >>> import datetime >>> p = Poll(question="What's u

Retrieve repository information from the github using github API

2012-01-27 Thread anoop mohan
I need to Create a web app Django. This web app should take a list of github usernames and show the recent commits as well projects owned by this github user. The list of users should be stored in the DB and I should be able to update this from the Admin. Use the github API. Currently I have no ide

ModelForm

2012-01-27 Thread hack
Hello, I am new to Python and have a Java background. I have created a bunch of models, and forms using ModelForm: class FormName(ModelForm): class Meta: model = FormName Whenever I display the form in my browser with {{ form.as_table }} the form queries all the foreign ke

help-i'm a newbie

2012-01-27 Thread Mahjabeen Akter
Hi all, I want to start learning django, but the tutorial seems so difficult for me! :( " django-admin.py startproject mysite " this line of code is not working. Could you please tell me what's wrong with it? or what should I do to set up a new project? Thank you. -- You received this message be

Re: Retrieve repository information from the github using github API

2012-01-27 Thread anoop mohan
Hi friends, I need to Create a web app in Django. This web app should take a list of github usernames and show the recent commits as well projects owned by this github user. The list of users should be stored in the DB and I should be able to update this from the Admin. Use the github API. Curr

about QuerySet

2012-01-27 Thread newme
user = User.objects.filter(pk="") user is a QuerySet every time i call user[0], i returns a different reference. maybe it should be a python question. i want to know i QuerySet does that. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: list_filter not showing up in admin

2012-01-27 Thread Edvinas J
https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter On Fri, Jan 13, 2012 at 8:28 AM, The Ape wrote: > Hi everyone, > > I am quite new to delevoping with django and I am trying to setup a > simple blog app. > I wanted to use a "list_filter" in the

Working with Geodjango fields in a form

2012-01-27 Thread Jair Trejo
Hello! I hope someone can help me. I've got a model with a required location field (a Geodjango Point) and some other information. I created a model form from it and use a simple textbox widget for the location field, so the user writes coordinates of the form: 19.2, -97.1 ¿How can I ma

Hello there, and sort of a question

2012-01-27 Thread Leandro Ostera Villalva
Hello guys, I'm new to Django and looking for the best way to setup a site as soon as possible. I already went over the basics and did a pair of websites, a blog using some django.contrib stuff incluiding an xml-rpc interface for the metaweblog api and some other apps that I needed (like a random d

django get value from oracle function

2012-01-27 Thread citos88
I use Django and Oracle, and I want call oracle's function and catch and save to django's variable this what return that function. How can I do this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Model-driven Django development

2012-01-27 Thread Leandro Ostera Villalva
Here with django you define models in Python code and the framework autogenerates layers for you to interact with the db. With utilities such as syncb from manage.py or sqlall you can let the framework create a db or just show you the sql behind those models you defined. It's really handy. El 20

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-27 Thread Leandro Ostera Villalva
I'm new to this list but a nice way to share code snippets is thru services like gist. Here's how the first source code would have looked: https://gist.github.com/1651488 Ontopic: I believe that a method called 'as_list' would be more descriptive. Perhaps the manager included in models.Model has

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
When you have an instance of an object and it has no id (that means, id is set to None) then it actually does not represent any object in your database, ergo, you can't delete it because it's not there. Can you show us the portion of code where you are trying to delete it? El 20 de enero de 2012

Re: Handling copy on a small project

2012-01-27 Thread Leandro Ostera Villalva
I'd vote for putting it in the db too. Flatpages are good to go. El viernes 20 de enero de 2012, Daniel Roseman escribió: > On Friday, 20 January 2012 04:39:44 UTC, Jeremy Boyd wrote: >> >> Hi all, >> >> For my side project, we have the need to rapidly iterate on the app's >> copy. As I see it, w

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-27 Thread Leandro Ostera Villalva
Here's a nicer way to do it. CHOICES = list ( (obj.code,obj.name) for obj in Scac.objects.all() ) Or you can always make a static method for it and call Scac.objects_as_list() El 21 de enero de 2012 05:01, Bill Beal escribió: > It looks like the Pythonic way is to create the list in > models.p

Re: what is the best IDE to use for Python / Django

2012-01-27 Thread Leandro Ostera Villalva
I actually use a text editor (Sublime Text 2, simply stunning) and a lot of shell. For projects I have my own git server and hudson-ci which I use locally and can sync with the one we use at work easily, and with little effort those can be integrated into the editor, too, which is wonderfully made

Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.

2012-01-27 Thread Aaron Cannon
Any hints in the Apache error logs? Aaron On 1/21/12, Chris Seberino wrote: > I am proxying my Django app behind Apache. I created a 404.html in my > template directory but when I try to test it I get the following error > that appears to come from Apache... > > Internal Server Error > > The se

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
No that I know. Can you show us some more code like how you defined the model and how do you come to this id=None issue? El 21 de enero de 2012 09:31, Chris Seberino escribió: > > On Jan 21, 6:44 am, Tom Evans wrote: > > Models are representations of rows in a database. > > Deleting a model ins

multiple modelforms in a single view not saving

2012-01-27 Thread Chris Wolfe
Hi - I am working on create form to save a lease made up the following model, view and form. Whenever I try to save a lease using the lease form, an integrityerror pops up saying that the lease.id field is null. Does anyone have an idea why this might be happening? #Views.py def register_new_tena

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
Doesn't the Create method or the YourModel() constructor initialize the pk ? El 21 de enero de 2012 12:43, JohnA escribió: > How are you finding these objects? That might point to the answer. > > Probably the likeliest explanation is that you are creating the > objects but not saving them. > >

Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.

2012-01-27 Thread Aaron Cannon
Hi. Have you created a 500.html file in your templates directory? Aaron On 1/21/12, Chris Seberino wrote: > >> Check your apache logs. > > Last line below says error is that there is no handler500. I thought > a missing web page for some URL was a 404 error so I'm not sure why > this error is

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-27 Thread Leandro Ostera Villalva
AFAIK when you try to access it ( quests[579] ) it gets loaded so performing .delete is possible. My guess is that you are none-ifying the id somehow either by operating with it or by improper redefinition of the id field in your model. El 21 de enero de 2012 18:49, JohnA escribió: > Is your co

Re: How can I go about this?

2012-01-27 Thread Leandro Ostera Villalva
You can still use some of what Donald said to give you an idea of where to start. Have you went thru the tutorials? Do you know the basics? That would give us a better chance to help you! =) El 22 de enero de 2012 00:44, coded kid escribió: > Thanks for the reply. I don't really mean twitter cl

Re: imagefiled don't Work

2012-01-27 Thread Tony Kyriakides
(in the terminal) python manage.py syncdb On Jan 21, 8:57 am, cha wrote: > Hello I reading this > tutorialhttps://pype.its.utexas.edu/docs/tutorial/unit6.html#answers > it's work OK But When I want improve it and add ImageField in Category > Model i have problem with ImageField It's Not uploaded

Re: Setting Network settings from Python/Django

2012-01-27 Thread Leandro Ostera Villalva
I take it that, at the end of the day, Django is Python code, thus you can execute whatever Python code you want in certain places (like views). Hope that pointed somewhere! El 22 de enero de 2012 01:20, Ganesh Kumar escribió: > Hi guys > > I'm working on a simple web interface for an embedded

pyodbc.connect timeout question

2012-01-27 Thread Luis Tavera
Hi all, I have some code similar to the one below that runs slightly differently if I run it outside Django and within Django. The difference is that within Django it takes much longer to raise the pyodbc.Error (several minutes) than outside Django (a few seconds). I am new to Django (and Python)

Re: Confused with django model Limit and Offset Implementation

2012-01-27 Thread Leandro Ostera Villalva
AFAIK it is [offset:page] El 22 de enero de 2012 20:40, Swaroop Shankar V escribió: > Hi, > Am trying to create a custom pagination for my project, but am seriously > struck with the django implementation of Limit and offset. I went through > the documents, instead of making me understand how it

Re: Transition from VPS(WHM/CPanel) to EC2

2012-01-27 Thread Matt Stevens
I've never used EC2, but on my VPS with Linode I have: 1. Nagios with event handlers, can be configured to perform any action when the state of a service or host changes. 2. I use Bind, no experience with Route 53. 3. pgAdmin is a brilliant program, much better than phpMyAdmin – albeit

confusion about choosing the database user name (Postgresql/psycopg2)

2012-01-27 Thread MiddleForkGIS
I'm a little confused about the choice of the database user to specify in the settings.py configuration file. On the one hand, if I set the user to be 'www-data' (the Apache2 user), I can serve pages to the public just fine, but cannot use the admin site. DatabaseError at /admin/ permission denie

Recurly REST API

2012-01-27 Thread Zeeshan Syed
Hey guys, I'm pretty new to Django. I was curious to know if someone could provide me with an example of how to utilize the Recurly API using Pyhon and Django. The API is here http://docs.recurly.com/api/subscriptions. But I'm unsure of how to perform an action like reactivate a subscription. If s

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Jonathan Paugh
On 01/23/2012 03:58 PM, JJ Zolper wrote: Yes I knew I was in the Python shell I just never saw anything that described you couldn't make Django commands within the Python interpreter. I mean it is based on Python isn't it? That's where I thought logically you could make Django calls from in Pyt

django-admin.py is not working.

2012-01-27 Thread Sammy
I am new to django and i have been trying to create a django project with no success. Every time i type django-admin.py startproject mysite. I get C:\Users\WASSWA SAM\Documents\django\djcode>django-admin.py startproject mysite Usage: django-admin.py subcommand [options] [args] Options: -v VERBOS

Re: get_FOO_display() for generic/variable choice fields

2012-01-27 Thread Michael Elkins
On Tue, Jan 24, 2012 at 03:51:27AM -0800, katstevens wrote: Obviously the 'val = obj.get_field_display()' line doesn't work! Is there a generic way of doing this (something like obj.get_display(fieldname) ?) or am I going to have to hard code separate checks for get_country_display() and get_dia

Inheriting Permissions from Abstract Class

2012-01-27 Thread Alec Koumjian
I have some custom permissions that I would like to give to about half a dozen different classes. If I did them individually they might look like this: MyModel(models.Model): ... Meta: permissions = (('view_mymodel', 'View Mymodel'),) ... That's all good and well, but follow

Re: django docs __unicode__ return u'%s %s

2012-01-27 Thread Alec Koumjian
The '%' symbol is used for formatting inside of a string. This is Python, not Django specific. It is a shortcut to insert variables (and format them to your liking) instead of doing messy stuff like this: adjective = 'messy' print 'This is the ' + adjective + ' way to do it' As opposed to: adje

TinyMCE, safe tag and wrong conversion of entities

2012-01-27 Thread jurgen
In my admin interface, I can create a database entry which contains HTML using TinyMCE. I do this to create publication entries for my website. In the database, a publication entry stores entities using numeric encoding. To render a list of publications, I use the safe tag in the django template. T

Template Loader Error: (It's been really frustrating till now..!)

2012-01-27 Thread Tony Kyriakides
Hey all... i get this error while i have a template directory and my about.html file It doesn't display the home.html either... Environment: Request Method: GET Request URL: http://127.0.0.1:8000/about/ Django Version: 1.3.1 Python Version: 2.7.2 Installed Applications: ['django.contrib.au

Group Moderation

2012-01-27 Thread Alec Koumjian
I posted early yesterday and still haven't been approved to post or comment. I could not find an administrative contact. Please advise. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.goo

Model object can be created in the admin, but cannot be edited after saving?

2012-01-27 Thread marshall
I've got a model that serves as a front-end to spawn celery tasks called LaryerImportTask. I want the admin user to be able to create LayerImportTask objects in the admin, but I don't want them to be able to change it in the admin after it's been created. Any ideas on how I could do this? -- You

Django as app backend

2012-01-27 Thread jompa
I was thinking about using django as backend for a simple smartphone app and, as I'm quite unexperienced with Django and it's possibilities, was wondering if anybody has any experience of this. Basics: Abillity ro create a node with image, description etc (backend admin). Retrieve nodes via JSON,

Help with new version of django

2012-01-27 Thread itua ijagbone
Hello, please i need help as to how to update my project to the lastest version of django 1.3.1. i have been using 1.1.1 to develop the project. Please how do i go about it, making my project conform to 1.3.1 -- You received this message because you are subscribed to the Google Groups "Django us

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Steven Elliott Jr
On Jan 25, 2012, at 9:14 PM, JJ Zolper wrote: > > The keywords were 'in production'. The development server (i.e. python > > manage.py runserver) works fine under Windows. But when you want to > > make the website accessible to your audience (the internet, company > > etc.), you should host that

queryset[] returns different reference every time it is called

2012-01-27 Thread newme
users = User.objects.filter(pk=1) user0 = user[0] user1 = user[1] user0 is user1 returns false it seems [] returns different reference every time it is called? how could this be done? i know it's maybe a python question, if i post it in a wrong group, i'm sorry. -- You received this message be

Re: Determine gender from first name

2012-01-27 Thread Jonathan Paugh
- Original Message - From: Demetrio Girardi Sent: 01/25/12 03:49 AM To: django-users@googlegroups.com Subject: Determine gender from first name This is not a django-specific question, but I couldn't find anything useful on the subject and have no better place to ask. Let's say I want to

Re: Moving a file manually

2012-01-27 Thread Jonathan Paugh
On 01/26/2012 03:44 AM, Tor Nordam wrote: Hello, I have a model with a FileField, that I use to store some user uploaded files. After a while, I changed my mind about where to store the files, so I was just wondering if there is a way to manually move a file, and then update the location of the

Re: Determine gender from first name

2012-01-27 Thread Carsten Agger
Den 25-01-2012 09:59, Praveen Krishna R skrev: *I don't know if there are any databases or webservices available for the purpose. But how would you handle the exceptions ?! Like if it does not exist in the db, and common names used across genders ?!* * * In general this would not be possible.

Django empty admin in Development

2012-01-27 Thread darwin_tech
Hi, I have a problem which has stumped me for some time now. On my development server my Django Admin works as expected, showing all my models and the auth models. However, on the production server, even though the whole application works fine, when I log into the admin I see nothing. No models, n

Re: [pinax-users] Learning Django+Pinax - Recommend books and/or tutorials?

2012-01-27 Thread Steven Elliott Jr
> > What would you recommend? > To get started with Python: http://pragprog.com/book/gwpy/practical-programming http://www.amazon.com/gp/product/1590599829/ref=pd_lpo_k2_dp_sr_3/182-5610174-4840816?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=lpo-top-stripe-1&pf_rd_r=1YTG71HMBVWK64HZ2TP2&pf_rd_t=201&pf_rd_p=486

IntelliJ IDE, Running & Debugging Tests

2012-01-27 Thread Trevor Ewen
Hi - Has anyone managed to run/debug their tests in IntelliJ IDE? If so, are there any specific tricks to the launch configurations, IDE setup, or version. Any information you have would be very helpful. Thanks, TE -- You received this message because you are subscribed to the Google Groups "

django noob question

2012-01-27 Thread yousuf
this is my models.py from django.db import models # Create your models here. class Leagues(models.Model): LeagueName = models.CharField(max_length=200) class Team(models.Model): TeamName = models.CharField(max_length=200) class LeagueTable(models.Model): league = models.ForeignKey(

  1   2   >