Re: type object 'DataTable' has no attribute 'datFile'

2013-07-08 Thread Daniel Roseman
On Monday, 8 July 2013 10:36:57 UTC+1, Nigel Legg wrote: > Thanks Daniel. > Before trying that, I went nto the python shell, imported the DataTable > model, and tried DataTable.objects.all(), and got the error: > DatabaseError: no such column: myapp_datatable.datFile. > I tried re-running

Re: type object 'DataTable' has no attribute 'datFile'

2013-07-07 Thread Daniel Roseman
On Saturday, 6 July 2013 12:07:34 UTC+1, Nigel Legg wrote: > I have the following code: > models.py: > class DataTable(models.Model): > datFile = models.CharField(max_length = 200) > structFile = models.CharField(max_length = 200) > bannerVar = models.CharField(max_length = 50) >

Re: Importing the user.id in form.

2013-06-15 Thread Daniel Roseman
On Saturday, 15 June 2013 10:44:03 UTC+1, shashank sandela wrote: > Hi, > > I defined a model which has a 'ForeignKey' to the 'User' . > > models.py : > > *class Design(models.Model):* > * title = models.CharField(max_length=100)* > * designer=models.ForeignKey(User) > * > * description =

Re: getting information from a many to many model from user

2013-06-06 Thread Daniel Roseman
On Thursday, 6 June 2013 11:00:40 UTC+1, tony gair wrote: > > > > I use the Userena app to manage my users but I want the superuser to > choose the organisation for them so they cannot wonder around other > organisations information. > > I can either create a foreign key in their profile to

Re: A ready made python/django validation class

2013-06-06 Thread Daniel Roseman
On Thursday, 6 June 2013 12:08:14 UTC+1, niiati wrote: > Hello Snr Python/Django programmers, > > I am very new to python/Django and I find writing validation classes for > my application very tedious and repetitive. I am wondering if there is a > ready made class for validation. I mean

Re: Django Development Server Root URL...

2013-06-04 Thread Daniel Roseman
On Monday, 3 June 2013 15:50:21 UTC+1, huw_at1 wrote: > Hi there, I've run into an issue whereby on production my Django project > is accessed from a URL such as http://example.com/django_project/. Apache > is configured to host the code under this URL since I do not want the > entire site

Re: Pls help me

2013-05-15 Thread Daniel Roseman
On Wednesday, 15 May 2013 10:58:32 UTC+1, Nat wrote: > My codes below do not work, please help me correct them... Thanks in > advance > >> >> No. You haven't said what does not "work". What happens? What doesn't happen? What errors do you get? Be specific. -- DR. -- You received this message

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Daniel Roseman
On Friday, 10 May 2013 10:29:21 UTC+1, Federico Erbea wrote: > > Hello everyone thanks in advance on the aid, I'm new in programming in > general. I would like to create a link (in Film.html) and using the ID to > open a new page (Attore.html) where to load only the data associated with >

Re: Accessing foreign key objects reversely ??

2013-05-08 Thread Daniel Roseman
On Wednesday, 8 May 2013 11:03:06 UTC+1, sachin wrote: > Hello all, > > Accessing the foreign key object is simple using _set > lets say I have a models like: > > class Profile(models.Model): > """ > extended auth user profile > """ > user = models.OneToOneField(User) > emp_id

Re: django search

2013-04-16 Thread Daniel Roseman
On Saturday, 13 April 2013 16:59:49 UTC+1, Harjot Mann wrote: > hello friends > > i have made a project on studnt dmc records in django...in which i search > for student' s dmcs using roll number..it works fine > but the problem is that when i am typing a fake roll number which is not >

Re: request.FILES empty, I think I am doing everything correctly

2013-04-05 Thread Daniel Roseman
On Thursday, 4 April 2013 22:38:58 UTC+1, John wrote: > I am sure that there must be a problem with the html but this is driving > me crazy. Probably some stupid typo. > > When I set a breakpoint following the if request.POST the request.FILES is > an empty dictionary. > > How would you know

Re: Using Django docs to find widget readonly specification

2013-04-01 Thread Daniel Roseman
On Sunday, 31 March 2013 22:42:12 UTC+1, AJP wrote: > I'm new to learning Django. I want to find the documentation regarding > the readonly attribute you can set for admin widgets. For example, from an > admin.py: > > class SourceForm(forms.ModelForm): > data =

Re: Problems install/download Django 1.5

2013-03-15 Thread Daniel Roseman
On Friday, 15 March 2013 10:05:48 UTC, br...@kanka.de wrote: > Because the 'brand' comprises a package manager? > Of course you can ignore it, but once you have, you can not easily go back > to the package-administration. > With the package manager, after having installed apache2, you would >

Re: how to get value of anchor tag which is taken from database using python.

2013-03-08 Thread Daniel Roseman
On Friday, 8 March 2013 09:07:12 UTC, Avnesh Shakya wrote: > I am using an anchor tag and have to access its content in python. I have > to access the 'text' from this. > > in html page-- > > {% for c in courses%} > > {{c.title}} href="cd.html">{{c.stream}} > > i want to get {{c.stream}} value

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-07 Thread Daniel Roseman
On Thursday, 7 March 2013 07:58:27 UTC, 7equiv...@gmail.com wrote: > Now that I have that part working, I would like to make since of what was > going on and why it didn't work in the first place. I have a question... > > Let's say > (1) a page is requested, and the View renders_to_response a

Re: how to create formset field but not used loop in template

2013-03-01 Thread Daniel Roseman
On Friday, 1 March 2013 11:43:22 UTC, Witold Greń wrote: > > When i create formset in template i must used loop "for": > > > > How to create field but not used loop "for"? eg. {{ > formset_create_company.form.no_house }}?? > Can you explain why you don't want to use for? Seems perfectly

Re: Defining a different name for the key field in ForeignKey

2013-02-21 Thread Daniel Roseman
On Thursday, 21 February 2013 10:20:01 UTC, Vittorio wrote: > I'm working on a legacy mysql db (under Mac OS X with Django 1.4.3) whose > structure I cannot modify because other applications are already happily > referring to it (FileMaker pro, PHP,etc.). > After issuing the 'python manage.py

Re: Question from a very beginner: Include dynamic template

2013-02-13 Thread Daniel Roseman
On Wednesday, 13 February 2013 03:52:20 UTC-8, Olivier wrote: > But before including template ( tasklist-one.html ) I would like to call a > function which take the tasklist_id and look for the task which compose > the tasklist. > Why? You don't show your models, which would have been useful,

Re: Replacing a model instance's __dict__

2013-02-08 Thread Daniel Roseman
On Friday, 8 February 2013 09:50:22 UTC-8, Tom Evans wrote: > Hi all > > I have a curious problem with a complex data replication issue. > > Basically, we use SalesForce as a CRM system. We also have a bunch of > users who aren't allowed a SF license due to cost reasons, and they > interact

Re: Django ForeignKey versus ManyToManyField

2013-02-05 Thread Daniel Roseman
On Tuesday, 5 February 2013 22:39:30 UTC-8, vijay shanker wrote: > Hi > I have two models, a Customer model and a WishListItem model (which stores > products). I have option of either having a ManyToManyField in Customer to > WishListItem, or I can have a customer ForeignKey to customer for

Re: get_absolute_url with custom extra parameter

2013-01-31 Thread Daniel Roseman
On Thursday, 31 January 2013 05:35:05 UTC, Sammael wrote: > Thank you for your answer! > > I have a photo album which can be displayed in two modes: full (with url > like 'album/id/full') and thumbnails ( like 'album/id/thumbnails' ). I > would like 'get_absolute_url' to return a corresponding

Re: previous values of custom method in save

2013-01-31 Thread Daniel Roseman
On Wednesday, 30 January 2013 10:31:09 UTC, Sammael wrote: > > When I change 'tags' in admin panel and save my model, old tags are being > written to file 'info.txt' instead of new ones, but it works good with > regular fields like self.name. > How do I overcome this issue? > Thank you in

Re: Reverse URL to generic view with arguments

2013-01-19 Thread Daniel Roseman
On Saturday, 19 January 2013 13:15:42 UTC, robzyb wrote: > Hi Everyone > > I have the following in my project's urls.py (watch_detail is a dictionary > with some parameters): > > urlpatterns = patterns('', >> url(r'^watches/(?P\d+)/$', list_detail.object_detail, >> watch_detail,

Re: Newbie: problems searching a model's field from a template

2013-01-14 Thread Daniel Roseman
On Monday, 14 January 2013 10:44:06 UTC, joy wrote: > it's the first time i try using the model property so probably i'm doing > something wrong. > This is the model file: > > from django.db import models > > # Create your models here. > > class Pop(models.Model): > name =

Re: Settings in Pythoncode

2013-01-09 Thread Daniel Roseman
On Wednesday, 9 January 2013 10:13:27 UTC, Stefano Probst wrote: > Hi! > I want to access variables in my code like in the > docs. > > I have a code like the following in settings.py: > >> codec_baseString =

Re: strangle url error in django with google app engine

2013-01-07 Thread Daniel Roseman
On Monday, 7 January 2013 13:54:59 UTC, jianhui chen wrote: > Hi all. >I use djangoappengine > http://www.allbuttonspressed.com/projects/djangoappengine#zip-packages to > manage google app engine. >I test a very simple project: >url.py: >from django.conf.urls.defaults import * >

Getting Access to Object in Admin Panel

2013-01-01 Thread Daniel Roseman
Others have given you the answer, bit note that the correct way to call an object's __unicode__ method is to do ` unicode(obj)`. As a general rule, you should never call the double- underscore methods directly. -- You received this message because you are subscribed to the Google Groups

Re: How to introduce a text area as a field of a database entry

2012-12-06 Thread Daniel Roseman
On Thursday, 6 December 2012 13:58:47 UTC, Javier Guerra wrote: > On Thu, Dec 6, 2012 at 6:18 AM, joy > wrote: > > content = models.CharField(max_length=500) > > is that size even supported? > > models.CharField maps to a VARCHAR() field, which AFAIK, is typically >

Re: pyodbc utf-8

2012-11-28 Thread Daniel Roseman
On Wednesday, 28 November 2012 13:17:39 UTC, Nebros wrote: > edit: in the db the values are correct and i cant change there > something... > Meanwhile we still don't know why you won't use Django's proper ORM functionality, which is perfectly compatible with MSSQL and ODBC. -- DR. -- You

Re: Retrieve current user id in urls.py

2012-11-27 Thread Daniel Roseman
On Tuesday, 27 November 2012 15:37:19 UTC, Peter Edström wrote: > Hello, > > I've set up a user profile according to > thisand > now I'm trying to access the id of the currently logged in user in my

Re: how should I get the request object?

2012-11-26 Thread Daniel Roseman
On Monday, 26 November 2012 10:16:01 UTC, Miaobing Jiang wrote: > how should I get the request object when I need that object in some places > rather than in the view for each view has request as its first parameter? > Pass it from the view into whatever functions need it. -- DR. -- You

Re: login page shouldn't open when I am already logged in, but it does !

2012-11-21 Thread Daniel Roseman
On Wednesday, 21 November 2012 12:04:45 UTC, Loai Ghoraba wrote: > Well, thanks very much for your effort-y reply. I have read it and it is > useful, though it requires a second reading to recap :) > > Well, I thought of a simple solution and it worked: just having a wrapping > function around

Re: how to use get_queryset in my code

2012-11-20 Thread Daniel Roseman
On Tuesday, 20 November 2012 07:25:55 UTC, Nebros wrote: > I can really need your help, i don't have found the solution till now. :( > You've had no replies because no-one can understand what you're asking. Something about querysets, but you seem to be using raw SQL in your code, for no

Re: why the else statement {% else %} is not working...?

2012-11-19 Thread Daniel Roseman
On Monday, 19 November 2012 11:15:57 UTC, muhammed riyas wrote: > def employees(request): > employees = Employeeprofile.all() > return render_to_response('main/list.html', { 'employees' : employees > }) > > > Once again, you are posting AppEngine-specific queries to a Django group.

Re: __unicode__() addition not working in basic poll application.

2012-11-14 Thread Daniel Roseman
On Tuesday, 13 November 2012 20:10:38 UTC, Colin Keenan wrote: > By the way, I just checked django.VERSION and it's (1, 6, 0, 'alpha', 0) > > So, since version 1.6 is supposed to fully support python 3, I should be > fine. Obviously, being 'alpha' means I'll run into trouble, but I'll keep >

Re: Forbidden (403)

2012-11-13 Thread Daniel Roseman
On Tuesday, 13 November 2012 08:05:28 UTC, Nebros wrote: > > Forbidden (403)- > > CSRF verification failed. Request aborted. > Help > > Reason given for failure: > > CSRF cookie not set. > > > In general, this can occur when there is a genuine Cross Site

Re: Exporting tuple/dictionary within django html template

2012-11-12 Thread Daniel Roseman
On Sunday, 11 November 2012 23:51:44 UTC, HA wrote: > Hi Folks, > > I want to export data from my named tuple within my django html template. > Can someone please point me to an example or let me know how to accomplish > this? > I know how to get this done within my python script but this time I

Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

2012-11-12 Thread Daniel Roseman
On Monday, 12 November 2012 08:37:44 UTC, muhammed riyas wrote: > thanks it works fine, but the if statement is not working,,, why? it > always gives the first result?. > This is a question about AppEngine, not Django. Please post it to the appropriate list. (Hint: you absolutely

Re: Hi guyz . iam just a beginner in google app engine..plz help me "abt deleting datas from DATASTORE"

2012-11-09 Thread Daniel Roseman
On Friday, 9 November 2012 11:33:53 UTC, muhammed riyas wrote: > > hi, > while trying to delete the datas from the datastore it shows the > error... > > > > > BadArgumentError at /employee/removeall/ Expected an instance or iterable > of (, 'google.appengine.api.datastore_types.Key'>, );

Re: Want help in Django basic configuration

2012-11-03 Thread Daniel Roseman
On Saturday, 3 November 2012 05:55:21 UTC, sudeep gangal wrote: > hey guys hiii, > I am new to the django. I used the inspectdb command to copy the content > of my db table made in mysql in django model.py. But that file doesn't > contain any foreign key etc. > I have declared primary keys and

Re: Tutorial Help!

2012-11-03 Thread Daniel Roseman
On Saturday, 3 November 2012 09:21:19 UTC, almel wrote: > I'm new to Django and trying out the tutorial and almost immediately > getting stuck. I'm running django version 1.5, python version 2.7.2, and > windows 7, and when I type into the command prompt > > django-admin.py startproject mysite

Re: Send data back to a table from template or send back to a view

2012-10-24 Thread Daniel Roseman
On Wednesday, 24 October 2012 07:05:56 UTC+1, Coulson Thabo Kgathi wrote: > Please help i have send a dictionary to a template now i want to send the > processed data back to the database how do i do that in template language > or javascript > Templates don't process data. Do you mean to use

Re: when is a Context Processor called?

2012-10-07 Thread Daniel Roseman
On Sunday, 7 October 2012 17:43:19 UTC+1, Stefano T wrote: > Hi all. > i just discovered the context processor, and i use it for put an object in > the request automatically, this is the code: > > def addProfile(request): > try: > userProfile =

Re: Array sharing across frame carries stale copy - How to fix it?

2012-10-04 Thread Daniel Roseman
On Thursday, 4 October 2012 11:12:42 UTC+1, anirM wrote: > Hi: > > Thanks for your help. I am new here. > > I have two iframes and a common data model. On one frame I perform query > on the data and create a list/array which is then pushed via an URL and > view on to the other iframe for

Re: SyntaxError Creating New Project

2012-09-20 Thread Daniel Roseman
On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote: > > Hi, > > Just follow these 7 steps to start new project > http://f2finterview.com/web/Django/17/ For more > http://f2finterview.com/web/Django > > > Stephen, please stop spamming this list by posting the same link to your

Re: Django, how to automatically sort the database's entries when I add an entry?

2012-09-16 Thread Daniel Roseman
On Sunday, 16 September 2012 00:00:09 UTC+1, Nicolas Dubien wrote: > > Hi, > > I'm using a quite huge database with twenty thousand entries or more. At > the beginning, I used to sort it each time (.sort_by("my_field_name")) I > need the page but I saw that it took me lot of time to generate the

Re: Dealing with big changelists in admin

2012-09-12 Thread Daniel Roseman
On Wednesday, 12 September 2012 13:02:33 UTC+1, axel...@chaos1.de wrote: > > > Am 12.09.2012 um 10:27 schrieb Stephen Anto: > > > There are lots of sources available on net for Django pagination. I am > > using django pagination on my website http://www.f2finterview.com/ for > show > >

Re: Problems with simple "hello world" test - "ImportError: Could not import settings"

2012-09-11 Thread Daniel Roseman
On Tuesday, 11 September 2012 16:33:31 UTC+1, DJ-Tom wrote: > > > > Am Dienstag, 11. September 2012 10:20:16 UTC+2 schrieb Chang.Jian: >> >> "d:/wwwroot/djtest/djtest/" was already in system path, so I think you >> should set DJANGO_SETTINGS_MODULE like this: >>

Re: Development server won't work from a shared web host

2012-09-04 Thread Daniel Roseman
On Tuesday, 4 September 2012 03:32:08 UTC+1, ecs1749 wrote: > > Thanks for the reply. Yes, I saw that message. I am a bit lost where to > go next if I completely ignore that tutorial regarding doing admin from the > development server (which I don't have). Do I dive into tutorial #3 and >

Re: Mac.... Won't Download, sync to python, or install... please help

2012-08-18 Thread Daniel Roseman
On Saturday, 18 August 2012 22:12:58 UTC+1, phil archambault wrote: > > > > On Saturday, August 18, 2012 5:02:03 PM UTC-4, Thomas wrote: >> >> >> On 2012-08-18, at 1:28 PM, phil archambault wrote: >> >> > Hey django users I'm trying to figure out how to dl and install django >> into py, but I'm

New to Django, Question about Admin Page

2012-08-13 Thread Daniel Roseman
You haven't uncommented the admin URL itself - the second to last line of the code you posted. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: django auth against local users

2012-08-13 Thread Daniel Roseman
On Monday, 13 August 2012 09:26:18 UTC+1, Joris wrote: > > Dear list > I've seen a number of differnent auth backends for django, but for some > reason could not find a way to have Django auth against the local system > users on the local machine (e.g. /etc/passwd). In my case Django is running

Re: Middleware manipulating template in response

2012-08-09 Thread Daniel Roseman
> > On Thursday, 9 August 2012 13:18:36 UTC+1, MrMuffin wrote: >> >> I need to change what template to use in a response based on type of >> user-agent in request. The middleware below works ok to detect mobile >> client, but I cannot get the template manipulation in the process_view >> method

Re: named url patterns - invalid syntax

2012-08-05 Thread Daniel Roseman
On Sunday, 5 August 2012 12:43:48 UTC+1, Blaxxton wrote: > > > Hi > > Why following line cause an invalid syntax : > (r'^myform/$', 'mysite.views.myform', name="myform"), > > it seems named url pattern has changed from name="myform" to just 'myform' > because when I change it to: >

Re: Demise of Mr. Kenneth Gonsalves

2012-08-03 Thread Daniel Roseman
On Friday, 3 August 2012 16:12:35 UTC+1, atm wrote: > > With my heartfelt condolence, I'd like to inform you all the unfortunate > demise of Mr.Kenneth Gonsalves (KG - law...@thenilgiris.com), who was a > strong advocate of Python, Django and Free Software in India. > He had served as the

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Daniel Roseman
On Thursday, 2 August 2012 15:31:54 UTC+1, Gregory Thompson Jr. wrote: > > >1. def login(request): >2. m = Member.objects.get(username=request.POST['username']) >3. if m.password == request.POST['password']: >4. request.session['member_id'] = m.id >5.

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Daniel Roseman
On Thursday, 2 August 2012 14:06:04 UTC+1, Gregory Thompson Jr. wrote: > > > > I really don't understand the following, and I've read the documentation over > and over. I've been on this for two days: > > >- How to initiate a session >- How sessions are checked >- How to retrieve

Re: newbie URL problem

2012-07-26 Thread Daniel Roseman
On Thursday, 26 July 2012 05:20:34 UTC+1, Felipe Sitta wrote: > > I'm new to programming and I'm designing an demo website to get used to > django, web and database stuff. It's about racetracks. > > The structure is the following: > There's a menu with a link "Track List", it leads to a page with

Re: render a models slug field as a url

2012-07-26 Thread Daniel Roseman
On Thursday, 26 July 2012 03:45:41 UTC+1, Matthew Meyer wrote: > > HI daniel, thanks for the reply > > After your comments, I have used ModelForm to simplify my code. I have > also achieved redirecting the desired url by using the redirect() function. > My issues are still basically the same

Re: Variable # of fields in a form

2012-07-25 Thread Daniel Roseman
On Wednesday, 25 July 2012 08:02:14 UTC+1, Alex Strickland wrote: > > On 2012/07/23 03:08 PM, Alex Strickland wrote: > > > https://docs.djangoproject.com/en/dev/topics/forms/formsets/ ? > > No. > > This is my html that shows a nice looking control using bootstrap, with > lists of users broken

Re: render a models slug field as a url

2012-07-25 Thread Daniel Roseman
On Wednesday, 25 July 2012 02:42:45 UTC+1, Matthew Meyer wrote: > > Hello all, > > I'm trying to load the url of a model created with get_absolute_url() > programmatically in my view. There are basically three steps I need to > accomplish this: > > 1. make sure @permalink is working correctly.

Re: How To Display Non-Modal Popup From Resulting Asynchronous Javascript Request

2012-07-24 Thread Daniel Roseman
On Tuesday, 24 July 2012 15:03:49 UTC+1, curious1 wrote: > So is there a problem with the url used above(the href field in the popup > function)? If so what's wrong with it? Previously the call seemed to be > successfull as well as the return, since I was previously able to display > the

Re: Retrieve Data from Database

2012-07-24 Thread Daniel Roseman
On Tuesday, 24 July 2012 08:00:02 UTC+1, Madhu wrote: > > Hi! > I am new in django, i want to get the table from one table also want the > some content from another table. > Can anybody tell me how it should be done? > > My module class structure is as below > > class A(models.Model): > name

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Daniel Roseman
On Monday, 23 July 2012 21:05:54 UTC+1, Lloyd Dube wrote: > > Hi all, > > I am not using django forms for this. I did think along the lines of doing > the following: > - implement the Question form, override __init__ in the model to return > answers for that question, > - instantiate a form for

Re: Variable # of fields in a form

2012-07-20 Thread Daniel Roseman
On Friday, 20 July 2012 00:41:04 UTC-7, Alex Strickland wrote: > > Hi > > I am generating a page with a variable list of categories (shown in a > Bootstrap accordion control) displayed as checkboxes. So a user may > select any or all of the checkboxes to categorise an article. > > I did that

Is upgrading to a newer Django version generally hassle-free?

2012-07-14 Thread Daniel Roseman
Django makes a fairly strong commitment to backwards compatibility across versions, which is documented here: https://docs.djangoproject.com/en/1.4/misc/api-stability/ They guarantee that any documented api will only be deprecated with two versions warning: for example, the old function-based

Re: m2m through problem: object has no attribute 'ce_set'

2012-07-14 Thread Daniel Roseman
On Friday, 13 July 2012 13:26:53 UTC-7, bn wrote: > > I'm trying to get a template to iterate through and print intermediate > model data. Can you look at this and point out what is wrong? I've tried > to follow the django docs closely: > > def category_detail(request, pk): > category=

Re: database values in a select form.

2012-07-09 Thread Daniel Roseman
On Sunday, 8 July 2012 04:25:54 UTC+1, Lee Hinde wrote: > > I have a table, Choice, that is used to build common lists. For > instance, there might be a list "Employment_Status" with values > "Full-Time" and "Part-Time" > > I want to use those values in various forms, so in the appropriate >

Re: rendering modelForms

2012-07-09 Thread Daniel Roseman
On Monday, 9 July 2012 12:06:32 UTC+1, mapapage wrote: > > Hi! > In my django app I'm using modelForms and not simple django forms so in > order to render the form I just do {{ form.as_table }} an the template and > everything is being displayed. > That's simple, but obviously any html code is

Re: Query regarding Models

2012-07-06 Thread Daniel Roseman
On Friday, 6 July 2012 08:53:27 UTC+1, Ashutosh Singh wrote: > > I wanted to import to import csv file to the model in django and then > after that I wanted to link the csv data to my data of different > model.Basically the other data is shapefile which has ids to which I wanna > link csv data

Re: Unable to obtain c.poll

2012-07-02 Thread Daniel Roseman
On Monday, 2 July 2012 20:47:40 UTC+1, Sam007 wrote: > > Hi Djangoers, > > I am almost completing my first tutorial but got stuck at the last point. > So I am assigning Choice object to 'c', > > c = p.choice_set.filter(choice_text__startswith='Just') > > And I am getting this output when I check

Re: am new bird to django,need some suggestion...please please do reply friend..

2012-07-02 Thread Daniel Roseman
On Monday, 2 July 2012 18:38:12 UTC+1, rick wrote: > > h i will try my best.actually i have already read that > documentation but when i went to make application,then i got problem in > using filter functions..and this kind of functions are not mentioned in the > documentation.thats

Re: Newbie form question

2012-07-02 Thread Daniel Roseman
On Sunday, 1 July 2012 23:25:32 UTC+1, Russ Abbott wrote: > > As a Django newbie I apologize if this is a trivial question. > > I'd like to use a form field as an element in a generated page but not as > part of a form. In particular, I'm generating a table, some of whose > elements are text

Re: am new bird to django,need some suggestion...please please do reply friend..

2012-07-01 Thread Daniel Roseman
On Sunday, 1 July 2012 16:07:28 UTC+1, rick wrote: > > hello django lovers, am new bird to this language and i have read django > documentation and did not able to learnt it properly . am making a small > application of *students management system *,in which i have to do*insertion > of new

Re: Redirect question

2012-06-29 Thread Daniel Roseman
On Friday, 29 June 2012 15:45:16 UTC+1, ivanb wrote: > > I'm still learning django so please forgive if I write anything silly. > > On my site I'm having something like: on url mysite/list/ I have list of > something. On it I have link that leads to another view if you want to add > new element

Re: have an object available in every templates

2012-06-28 Thread Daniel Roseman
On Thursday, 28 June 2012 13:11:37 UTC+1, Bastian wrote: > > Hi, > > I don't know if this is possible or how to do it. I would like to write a > sort of context processor where I pass an object to the template. I have > always passed strings to these variables. Let's say I have a Book model and

Re: Where admin classes should be registered ?

2012-06-27 Thread Daniel Roseman
On Wednesday, 27 June 2012 08:54:07 UTC+1, Alireza Savand wrote: > > Hi > Common way to create [model|admin] classes is implement and create them in > [models|admin].py file. > But as standard non-django way is to create a python package named admin > for AdminClass es and create a file for

Re: convert str to datetime

2012-06-25 Thread Daniel Roseman
On Monday, 25 June 2012 13:07:19 UTC+1, armagan wrote: > > I don't know where does string come from. In shell date is a date object > and combine time dt is a datetime objects. It's ok. But I run the code I > have an errror. can't compare datetime.datetime to str. > > item =

Re: Using now in an if

2012-06-25 Thread Daniel Roseman
On Monday, 25 June 2012 13:05:24 UTC+1, larry@gmail.com wrote: > > I'm trying to use now in an if like this: > > {% if value|date:"Ymd" == now "Ymd" %} > > This is failing with: 'Unused '"Ymd"' at end of if expression.' > > If I quote it: > > {% if value|date:"Ymd" == 'now "Ymd"' %} >

Re: convert str to datetime

2012-06-25 Thread Daniel Roseman
On Monday, 25 June 2012 09:42:27 UTC+1, armagan wrote: > > Hi, > > I'm trying to convert to str to datetime. "date object" must be datetime > object. Can you help me? > > def item_pubdate(self, item): # Yayinlanma Tarihi > > if item.delivery_date: > > date =

Re: acces cleaned data from a dynamic form

2012-06-25 Thread Daniel Roseman
On Sunday, 24 June 2012 15:36:27 UTC+1, het.oosten wrote: > > Django 1.2.3 > > For a restaurant i want to make a form, were the user can add their > address, and their order. The order part is dynamic (users can add > extra fields). I used jquery.formset for this. > > To accomplish this i have

Re: Import error

2012-06-22 Thread Daniel Roseman
On Friday, 22 June 2012 15:49:31 UTC+1, aid wrote: > > > Hi Emily, > > On 22 Jun 2012, at 15:46, Emily wrote: > > > This is the class I created... > > > > import string > > import random > > > > class Helpers: > > > > def random_password(): > > Take random_password outside of the

Re: Duplicate rows with same key in DB?

2012-06-22 Thread Daniel Roseman
On Friday, 22 June 2012 06:23:32 UTC+1, ydjango wrote: > > I have code as > > view_a(request): > Populate my_a, my_b and my_c... > try: > tp = TP.objects.get(a__exact = my_a, b__exact = my_b) > except TP.DoesNotExist, e: > tp = TP() > tp.a = my_a > tp.b = my_b >

Re: Django learning

2012-06-22 Thread Daniel Roseman
On Friday, 22 June 2012 07:15:53 UTC+1, lovetoprogram wrote: > > I tried to do this according the tutorial. > >>> from django import template > >>> t = template.Template('My name is {{ name }}.') > >>> c = template.Context({'name': 'Adrian'}) > >>> print t.render(c) > My name is Adrian. >

Re: Apache/mod_wsgi documentation problem

2012-06-18 Thread Daniel Roseman
On Monday, 18 June 2012 13:42:46 UTC+1, coolgeek wrote: > > Hello - > > Django newb. I hope this is the right place to post this. > > I had a problem with the virtualenv section of the Apache/mod_wsgi > documentation > > >

Re: multiple databases [was]Trying to find something in multiple databases... Confused...

2012-06-18 Thread Daniel Roseman
On Monday, 18 June 2012 13:16:55 UTC+1, lawgon wrote: > > On Mon, 2012-06-18 at 05:12 -0700, Daniel Roseman wrote: > > Multiple databases is a whole different > > question, which you really don't want to get into as a newbie (or, > > indeed, > > at all if possi

Re: Trying to find something in multiple databases... Confused...

2012-06-18 Thread Daniel Roseman
On Monday, 18 June 2012 08:40:53 UTC+1, Laurence MacNeill wrote: > > Ok, I'm a total django noob here, so I am probably doing this wrong... > But here goes... > > When someone comes to my django app's root (index), I need to verify their > user-name (which is stored in a Linux environment

Re: Why doesn't Django support subdomain url conf?

2012-06-16 Thread Daniel Roseman
On Saturday, 16 June 2012 13:48:16 UTC+1, Alireza Savand wrote: > > Have extremely control on URLs with django is easy as possible. > > But why there is nothing about handling subdomains url configration, all i > found it was >

Re: How I use Django, Virtualenv and Buildout together

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 14:53:11 UTC+1, Andrew Bialecki wrote: > > Hey everyone, > > I wrote a quick blog post on how I use Django with virtualenv and > Buildout. Hope it's helpful: > http://www.sophomoredev.com/2012/06/how-i-use-django-virtualenv-and-buildout-together/ > . > Nice article. If

Re: Stuck already on step one, django on windows

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 08:24:41 UTC+1, Daniel Patriarca wrote: > > I just installed python, then mysql, then django on my windows 7 machine > and I think it worked because I ran the import django comand from python > and nothing barked at me. I thought. yeah... time to hit the tutorial but

Re: CSRF Issue

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 10:00:09 UTC+1, cmac0tt wrote: > > ahem, so here is the view > > from wikicamp.wiki.models import Page > from django.shortcuts import render_to_response > from django.http import HttpResponseRedirect > from django.shortcuts import render > from django.shortcuts import

Re: image in browser

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 09:51:00 UTC+1, Satvir Kaur wrote: > > > This is a strange thing to want to do. What are you doing with `img` in > the > > template? > I am using image_data variable as a image source in the template(html > file). > > > What should i ??? Image is not displaying.

Re: Dynamic Model Saving and Admin Activation

2012-06-14 Thread Daniel Roseman
On Wednesday, 13 June 2012 21:46:27 UTC+1, Karandeep Nagra wrote: > > So I've set up my Django site to create a dynamic model for every Server > that is created. So at the creation of server Bender, the model > Bender_request is created. But whenever I restart the built-in server, >

Re: CSRF Issue

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 08:46:24 UTC+1, cmac0tt wrote: > > I feel like an idiot here, I've worked my way around this multiple times > but its just not working this time and as you can see ive thrown every > method there is in the documentation at it. > > (note that I am learning python and

Re: image in browser

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 07:15:19 UTC+1, Satvir Kaur wrote: > > hello, > > i wish to display the image into the browser through a template . I > used the following code to retrieve the image from Disk and send that > data to Html file > > def my_image(request): > image_data =

Re: django on windows xp

2012-06-13 Thread Daniel Roseman
On Wednesday, 13 June 2012 06:07:19 UTC+1, Manish wrote: > > Hi , > > I am using trying to install and use django on windows xp and i am using > git bash as command line. When i try using > "django-admin.py startproject mysite" command i get an error, __init__.py > line 54. except

Re: how to exclude some field from BaseInlineFormSet

2012-06-12 Thread Daniel Roseman
On Tuesday, 12 June 2012 16:34:12 UTC+1, vijay shanker wrote: > > hi > i am trying to do this: > class PakageInfoForm(BaseInlineFormSet): > class Meta: > model = PakageInfo > exclude = ['client_sda',] > this doesn works .. > how to exclude any field from

Re: How to access HttpRequest from urls.py in Django? or better way.

2012-06-10 Thread Daniel Roseman
On Sunday, 10 June 2012 05:21:08 UTC+1, losingle wrote: > > > news_info_dict should be > news_info_dict = { > 'queryset':News.published.filter(category= > request.category).all(), > 'date_field': 'pub_date', > } > > I couldn't find a way to access the HttpRequest (request) object >

Re: url_dir

2012-06-06 Thread Daniel Roseman
On Wednesday, 6 June 2012 11:50:54 UTC+1, Satvir Kaur wrote: > > I read the link > https://docs.djangoproject.com/en/1.3/topics/http/urls/ > > above unable to understand what is regular expression in url pattern > e.g r'^pyrheology/plot/tensile/(?P\d+).png$' > > Please take the time to

Re: 404 message

2012-06-01 Thread Daniel Roseman
On Thursday, 31 May 2012 05:37:41 UTC+1, Stanley Lee wrote: > > Am I supposed to see a 404 message upon completing this section of the > tutorial? https://docs.djangoproject.com/en/1.4/intro/tutorial03/ > > Sorry for the brevity as I'm trying to make the question concise. > Thanks in advance!

<    1   2   3   4   5   6   7   8   9   10   >