Re: Instantiating a ModelForm with initial values in CBVs

2014-06-14 Thread Simone Dalla
2014-06-14 19:24 GMT+02:00 Frankline : > I am a Django newbie working with Django CBVs and having difficulty setting > initial values for my ModelForm. To give an overview, I am trying to learn > by creating a simple messaging app. > > Here is my code: > > models.py > --

Re: django tests

2013-11-23 Thread Simone Dalla
2013/11/23 Harjot Mann > Now my code is this: > class UserProfileTestCase(TestCase): > def setUp(self): > self.userprofile = UserProfile.objects.filter(user_id = > 1).update(first_name = "Harjot") > > def test_profile(self): > self.assertEqual(self.userprofile.user_id, 1)

Re: Which IDE should I use for Django?

2011-12-19 Thread Simone Dalla
2011/12/19 Zhukov Pavel > PyCharm? > +1 -- Simo - Registered Linux User #395060 - Software is like sex, it is better when it is free --> Linus B. Torvalds -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Tizicjxzajhkztxz

2011-10-05 Thread Simone Dalla
U  -- Simone Dalla Responsabile Servizi Informatici Comune di Zola Predosa tel. 0516161662 cel. 3290179546 email: sda...@comune.zolapredosa.bo.it skype: simone.dalla -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Making an operation before and after a recording in the model.

2011-06-24 Thread Simone Dalla
2011/6/24 Bussiere > Hello, > this is my first message here. > I have a question : > > I have a actor object in my model, and a webpage in my model. > > And i want that when a user record an actor in the admin interface it > create automatically a webpage associated wit(h the actor. > I now how t

Re: Generic Foreign Keys in fixtures

2011-03-24 Thread Simone Dalla
2011/3/24 Shawn Milochik > On Thu, Mar 24, 2011 at 2:29 PM, Simone Dalla wrote: > > > > maybe option --natural > > > http://docs.djangoproject.com/en/1.3/ref/django-admin/#dumpdata-appname-appname-appname-model > > > > > Natural keys were introduced in 1.

Re: Generic Foreign Keys in fixtures

2011-03-24 Thread Simone Dalla
2011/3/24 LurkingFrog > Currently, I am writing unit tests for an application that uses > generic foreign keys. Since the contenttypes are regenerated every > test, I was wondering the most effective way to reconcile the existing > test data with the new contenttypes PKs. > > My current thinking

Re: render a list

2011-03-01 Thread Simone Dalla
2011/3/1 luca72 > A stupid question > mylist = ['a','b','c'] > If i need to render it in a template like: > in differnt > like > a > b > c > > how can i do with the {{% for %}} tag? > Thanks > > Luca > {{% for element in mylist %}} {{ element }} {% endfor %} -- Simo - Registered Linux User

Re: scripted login to django

2011-02-23 Thread Simone Dalla
2011/2/23 Robin Becker > I want to automate a remote django view which requires a login with a > python script, but I am having difficulty in deciding how to make django > accept the various cookies. Is there example code somewhere which shows how > this should be done? > > I've tried various coo

Re: working django with existing database

2011-01-30 Thread Simone Dalla
2011/1/31 arief nur andono > sorry for undetail, i use oracle > > this is output example from my inspectdb, this is one of 300 table i have > > from django.db import models > > class TempJmlGangguanPyl(models.Model): > singkatpyl = models.CharField(max_length=4, blank=True) > singkatgrd =

Re: DB-Views or read-only tables in models

2011-01-25 Thread Simone Dalla
2011/1/25 bvdb > A developer sometimes has to access and present data that existed > before his application. Common practice is for a database > administrator to define a database view (with a CREATE VIEW sql > command, not to be confused with the V in MVC) and give the Django > developer access

Re: automated testing: how to generate human-verifiable views?

2011-01-25 Thread Simone Dalla
2011/1/4 Jennifer Bell > Hi, > > I'm trying to figure out the best way of doing something I'd like > to partially automate staging testing by generating a sequence of > human verifiable views, with the goal of making sure my app views/css/ > 3rd-party javascript etc. are drawing the way they

Re: TestCase and fixtures

2011-01-11 Thread Simone Dalla
Thank Shawn 2011/1/11 Shawn Milochik > It sounds like you're doing everything correctly. > > Just a few thoughts: > >Is your app definitely in INSTALLED_APPS in settings.py? > Yes > >Check typos in fixture name and filename (and include extension in > test). > Are ok. > >Are yo

Re: TestCase and fixtures

2011-01-11 Thread Simone Dalla
2011/1/12 Piotr Zalewa > Hi Simone > > Try fixtures = ['myfix'] Thank Piotr, I've already done but same result: No fixtures found. ... -- Ran 3 tests in 0.419s -- Simo - Registered Linux User #395060 - Software is like sex

TestCase and fixtures

2011-01-11 Thread Simone Dalla
Hi! I'm testing a part of my application with a TestCase class specifing the 'fixtures' attributes like -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

TestCase and fixtures

2011-01-11 Thread Simone Dalla
Hi! I'm testing my application with a TestCase class, specifing "fixtures" attribute in my class like: class MyTestCase(TestCase): fixtures = ['myfix.json'] I've created the folder "fixtures" in my directory application like: /home/simo/Projects/myproject/myapp/fixtures/myfix.json

Re: Django book

2010-11-28 Thread Simone Dalla
2010/11/28 Lorenzo Franceschini > I'm new on this group, so first of all... Hi to everybody! > > I'm a web developer, and I need to approach Django for a software project, > so I would like to ask you an advice about the best book to read (in your > opinion) in order to learn using this framework

Re: Django Dropdown List

2010-11-16 Thread Simone Dalla
2010/11/16 Derek > Sean > > I hear what you say - but is this approach also readily available inside > the Admin framework? Absolutely yes. -- Simo - Registered Linux User #395060 - Software is like sex, it is better when it is free --> Linus B. Torvalds -- You received this message beca

Re: Django, Eclipse, Autocomplete

2010-11-16 Thread Simone Dalla
2010/11/16 xpanta > Thanks a lot. > > it seems to work, now :-) > > I don't know why, but I also had to remove PYTHONPATH environment > variable (my computer -> properties -> etc...) in order for auto- > config to configure python-django properly... > > Thanks again for your time, > De nada ;-)

Re: Django, Eclipse, Autocomplete

2010-11-16 Thread Simone Dalla
2010/11/16 xpanta > Hi, > > I am using eclipse Galileo (Build id: 20100218-1602) and PyDev to > build a Django project. > > Autocompletion works fine for python language but not for django. For > example in models.py I cannot get the > field = models.CharField(max_length=100) to be autocompleted.

Re: Creating A Model For Existing DB Table

2010-11-10 Thread Simone Dalla
2010/11/10 Sandip Bhattacharya > On Wed, Nov 10, 2010 at 09:23:55AM -0800, octopusgrabbus wrote: > > # Create your models here. > > class ept_inv(models.Model): > > part_num = models.CharField(max_length=20) > > ept_type = models.SmallIntegerField > > inv_id = models.IntegerField > >

Re: starting with django project

2010-08-27 Thread Simone Dalla
2010/8/27 lakshay pushkarna > hi, > > when i write the command at the time of creating a new directory for > starting a project with the command: > -> django-admin.py startproject mysite > > It shows me an error of the core module 's unavailability, > > ->Traceback (most recent call last)

Re: Passing JSON data

2010-06-02 Thread Simone Dalla
2010/6/2 ravi krishna > Hi, > I am a newbie with Python n Django programming. Can somebody tell me some > easy methods for passing the Json data to the html page as arguments. I have > the Json converted data stored in a variable. Now need to print those data > in html. while searching found som

Re: API with django

2010-05-24 Thread Simone Dalla
2010/5/24 Alexandre González > Hi! > > I must develop a django app that receives XML and returns XML. > > What's the best way to do this? Create a view that receive the XML and > parse it to return a template with the XML resultant? > > I'm newbie in django and need your tips :) > http://docs.d