Re: Where to start - New to Django and Python

2018-11-02 Thread William Vincent
Well I'm biased but add Django for Beginners 
 to the mix too. Also Django Girls 
is a great first step.

On Monday, October 22, 2018 at 8:02:01 AM UTC-4, Lokendar Singh wrote:
>
> Hi Community,
>
> I'm new to django and python, however I've experience in development. 
>
> Can someone suggest me the best book/content/tutor to enhance my skills as 
> a lead developer? 
> Currently I'm going through django documentation.
>
>
> Thanks in advance!
> Lokendar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/300fb8f7-39e2-4cec-b7d9-47953b244bc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where to start - New to Django and Python

2018-10-22 Thread manu . pascual . luna
I don't know if it's the best book but I'm enjoying 
http://www.obeythetestinggoat.com. I like 
the 
 

 TDD approach for learning a new technology. Also you can read it for free 
online.


El lunes, 22 de octubre de 2018, 14:02:01 (UTC+2), Lokendar Singh escribió:
>
> Hi Community,
>
> I'm new to django and python, however I've experience in development. 
>
> Can someone suggest me the best book/content/tutor to enhance my skills as 
> a lead developer? 
> Currently I'm going through django documentation.
>
>
> Thanks in advance!
> Lokendar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d3b9f7cb-8379-413b-b626-0eb06f12b2c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where to start - New to Django and Python

2018-10-22 Thread Joel
If you don't know python, spend time on basic language and structure before
starting django. The python documentation has a good tutorial. The courses
on udemy are good.
For learning django, the official django tutorial set is sufficient.

On Mon, 22 Oct, 2018, 5:31 PM Lokendar Singh,  wrote:

> Hi Community,
>
> I'm new to django and python, however I've experience in development.
>
> Can someone suggest me the best book/content/tutor to enhance my skills as
> a lead developer?
> Currently I'm going through django documentation.
>
>
> Thanks in advance!
> Lokendar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0c69fb3c-1ddf-4781-b94c-d3c28faefb71%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA%3Diw_-40gpfeikRpix22a0VUSYzzNk6pM5der%2BZVzqZztOCqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where to start - New to Django and Python

2018-10-22 Thread Mo-rema07
I have found The Django Book  to be a very good 
book to get a handle of Djangoa and it's philosophy.

On Monday, October 22, 2018 at 2:02:01 PM UTC+2, Lokendar Singh wrote:
>
> Hi Community,
>
> I'm new to django and python, however I've experience in development. 
>
> Can someone suggest me the best book/content/tutor to enhance my skills as 
> a lead developer? 
> Currently I'm going through django documentation.
>
>
> Thanks in advance!
> Lokendar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e0a9b82-84f4-4578-b09f-6e7e711c03d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Where to start - New to Django and Python

2018-10-22 Thread Lokendar Singh
Hi Community,

I'm new to django and python, however I've experience in development. 

Can someone suggest me the best book/content/tutor to enhance my skills as 
a lead developer? 
Currently I'm going through django documentation.


Thanks in advance!
Lokendar 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0c69fb3c-1ddf-4781-b94c-d3c28faefb71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i dont know from where to start my first project on django

2017-05-11 Thread vitalysweb
yess, thank u for the tip ;)


Le mercredi 10 mai 2017 00:39:03 UTC+2, Lachlan Musicman a écrit :
>
> A further tip. Your models might be (doesn't have to be):
>
>  - Drivers
>  - Cars
>  - reservations (a Many to Many relationship with extra fields 
> https://docs.djangoproject.com/en/1.11/topics/db/models/#extra-fields-on-many-to-many-relationships
>  
> )
>
> cheers
> L.
>
> --
> "Mission Statement: To provide hope and inspiration for collective action, 
> to build collective power, to achieve collective transformation, rooted in 
> grief and rage but pointed towards vision and dreams."
>
>  - Patrice Cullors, *Black Lives Matter founder*
>
> On 10 May 2017 at 07:32, Mark Phillips  > wrote:
>
>> Start with the model layer. Use the admin interface to add some dummy 
>> data and think about how you want the front facing pages/forms to look and 
>> operate. Repeat as needed.
>>
>> Mark
>>
>> On Tue, May 9, 2017 at 9:03 AM, > wrote:
>>
>>> Hi everyone,
>>> My project consists of a web site which allows to manage the 
>>> reservations of vehicles by customers.
>>> These customers are required to work with these vehicles as drivers 35 
>>> hours a week
>>>
>>> *front office*
>>> __During registration on the site the user will have to load documents 
>>> (pdf, jpeg etc)
>>> __ after confirmation by the admin, the user can electronically sign a 
>>> contract
>>>  On are:
>>> __ it can save a work schedule for one week (modifiable)
>>> __ there are three reservation ranges per day (8 hours each)
>>> __The availability of reservations will depend on the availability of 
>>> the vehicles (without possibility of choice)
>>> __ once a vehicle is recovered the driver must make a service in his 
>>> account indicating the mileage
>>>
>>> *Back office*
>>> __ the admin must view the transmitted documents before validating the 
>>> registration and then send him a contract to sign electronically
>>> __ Manage Vehicles (Add / Remove)
>>> __ manage availability of vehicles (repairs in garage)
>>> __ Once a vehicle is returned to the park the person who manages the 
>>> park must do a "vehicle return" indicating the mileage
>>>
>>> *As I do not have experience in web development I do not know where to 
>>> start my project, *
>>> *Thank you for helping me*
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com .
>>> To post to this group, send email to django...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAEqej2PNBO55YyNgfPtGfv%3DCUiz1_-%3D%3DrHOSsHiUD7Hx%3DgRJVQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAEqej2PNBO55YyNgfPtGfv%3DCUiz1_-%3D%3DrHOSsHiUD7Hx%3DgRJVQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/24f71e8c-a7b2-45f1-85c9-639b64668616%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i dont know from where to start my first project on django

2017-05-11 Thread vitalysweb
Thank you very much, I'll start with that!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9790f158-5b80-4903-a709-8ce6c17f1571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: i dont know from where to start my first project on django

2017-05-09 Thread Lachlan Musicman
A further tip. Your models might be (doesn't have to be):

 - Drivers
 - Cars
 - reservations (a Many to Many relationship with extra fields
https://docs.djangoproject.com/en/1.11/topics/db/models/#extra-fields-on-many-to-many-relationships
)

cheers
L.

--
"Mission Statement: To provide hope and inspiration for collective action,
to build collective power, to achieve collective transformation, rooted in
grief and rage but pointed towards vision and dreams."

 - Patrice Cullors, *Black Lives Matter founder*

On 10 May 2017 at 07:32, Mark Phillips  wrote:

> Start with the model layer. Use the admin interface to add some dummy data
> and think about how you want the front facing pages/forms to look and
> operate. Repeat as needed.
>
> Mark
>
> On Tue, May 9, 2017 at 9:03 AM,  wrote:
>
>> Hi everyone,
>> My project consists of a web site which allows to manage the reservations
>> of vehicles by customers.
>> These customers are required to work with these vehicles as drivers 35
>> hours a week
>>
>> *front office*
>> __During registration on the site the user will have to load documents
>> (pdf, jpeg etc)
>> __ after confirmation by the admin, the user can electronically sign a
>> contract
>>  On are:
>> __ it can save a work schedule for one week (modifiable)
>> __ there are three reservation ranges per day (8 hours each)
>> __The availability of reservations will depend on the availability of the
>> vehicles (without possibility of choice)
>> __ once a vehicle is recovered the driver must make a service in his
>> account indicating the mileage
>>
>> *Back office*
>> __ the admin must view the transmitted documents before validating the
>> registration and then send him a contract to sign electronically
>> __ Manage Vehicles (Add / Remove)
>> __ manage availability of vehicles (repairs in garage)
>> __ Once a vehicle is returned to the park the person who manages the park
>> must do a "vehicle return" indicating the mileage
>>
>> *As I do not have experience in web development I do not know where to
>> start my project, *
>> *Thank you for helping me*
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAEqej2PNBO55YyNgfPtGfv%3DCUiz1_-%3D%3DrHOSsHiUD7Hx%
> 3DgRJVQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAEqej2PNBO55YyNgfPtGfv%3DCUiz1_-%3D%3DrHOSsHiUD7Hx%3DgRJVQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiO7mHHkxKka77_oiDXi7Np9AbMfczmbQrK7Ts0CaNaJzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: i dont know from where to start my first project on django

2017-05-09 Thread Mark Phillips
Start with the model layer. Use the admin interface to add some dummy data
and think about how you want the front facing pages/forms to look and
operate. Repeat as needed.

Mark

On Tue, May 9, 2017 at 9:03 AM,  wrote:

> Hi everyone,
> My project consists of a web site which allows to manage the reservations
> of vehicles by customers.
> These customers are required to work with these vehicles as drivers 35
> hours a week
>
> *front office*
> __During registration on the site the user will have to load documents
> (pdf, jpeg etc)
> __ after confirmation by the admin, the user can electronically sign a
> contract
>  On are:
> __ it can save a work schedule for one week (modifiable)
> __ there are three reservation ranges per day (8 hours each)
> __The availability of reservations will depend on the availability of the
> vehicles (without possibility of choice)
> __ once a vehicle is recovered the driver must make a service in his
> account indicating the mileage
>
> *Back office*
> __ the admin must view the transmitted documents before validating the
> registration and then send him a contract to sign electronically
> __ Manage Vehicles (Add / Remove)
> __ manage availability of vehicles (repairs in garage)
> __ Once a vehicle is returned to the park the person who manages the park
> must do a "vehicle return" indicating the mileage
>
> *As I do not have experience in web development I do not know where to
> start my project, *
> *Thank you for helping me*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2PNBO55YyNgfPtGfv%3DCUiz1_-%3D%3DrHOSsHiUD7Hx%3DgRJVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


i dont know from where to start my first project on django

2017-05-09 Thread vitalysweb
Hi everyone,
My project consists of a web site which allows to manage the reservations 
of vehicles by customers.
These customers are required to work with these vehicles as drivers 35 
hours a week

*front office*
__During registration on the site the user will have to load documents 
(pdf, jpeg etc)
__ after confirmation by the admin, the user can electronically sign a 
contract
 On are:
__ it can save a work schedule for one week (modifiable)
__ there are three reservation ranges per day (8 hours each)
__The availability of reservations will depend on the availability of the 
vehicles (without possibility of choice)
__ once a vehicle is recovered the driver must make a service in his 
account indicating the mileage

*Back office*
__ the admin must view the transmitted documents before validating the 
registration and then send him a contract to sign electronically
__ Manage Vehicles (Add / Remove)
__ manage availability of vehicles (repairs in garage)
__ Once a vehicle is returned to the park the person who manages the park 
must do a "vehicle return" indicating the mileage

*As I do not have experience in web development I do not know where to 
start my project, *
*Thank you for helping me*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f28d4e3-dd24-46a4-b7d3-e509e1059eca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tests failing/throwing errors - not sure where to start

2013-08-18 Thread Kelvin Wong
My advice to you is to just ignore it all and focus on the tests in your 
application.

For example, if your app that you wrote yourself is called "amazingapp" 
then you test only that app thus.

---

$ python manage.py test amazingapp

---

And it will say something similar to this...

---

Creating test database for alias 'default'...
.
--
Ran 1 test in 0.002s

OK
Destroying test database for alias 'default'...

---

Don't bother testing your framework code or your modules, which Django does 
if you leave out the app name (assuming you're not making patches for 
Django itself).

PS. Good for you for testing your code.

K



On Saturday, August 17, 2013 11:27:34 PM UTC-7, Kris Fields wrote:
>
> Hi,
>
> The project I'm working on seems to work fine but running "python 
> manage.py test" results in a lot of failed tests. I'm trying to get a 
> handle on them but I'm not sure where to start.  I'm hoping someone can 
> help point me in the right direction.
>
> Most of the failed tests are for django, but some are for mezzanine and 
> allauth.  I've included them all in case it's relevant.
>
> Running django 1.4.3, python 2.7.2
> Mezzanine 1.4.5, allauth 0.12.0
>
> Any help is much appreciated!
>
> Thanks,
>
> Kris
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


where to start

2012-10-28 Thread Anil
I am new to Django. 
I am not sure where to start, I am thinking of diving into 1.5 alpha and 
make use of the new custom User models.

I am working on a project that will make exclusive use of a LDAP database, 
nothing else. I expect to have users in multiple suffixes.

e.g.:

uid=user1, ou=people, o=suffix1
uid=user1, ou=people, o=suffix2
uid=user2, ou=people, o=suffix2

These users would of course be tied to their own groups, under their own 
suffix.
I am a little inundated with all the customization that is required to 
Django's user and authentication models.

It seems like I would need to write my own authentication Backend, and then 
have the custom User model tie into this. I was wondering if there are some 
examples like this out there, that I can look at that do something similar?

How would you start a project like this? Some specific direction(s) would 
be helpful.

Thanks a bunch!
Anil


-- 
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/-/TheqdXlnqlcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: string indices must be integers error in admin - don't know where to start debugging

2008-07-08 Thread Jon Loyens

Problem solved.  Just need to copy in my local version of Django

On Jul 7, 6:29 pm, Jon Loyens <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I've got a problem and I don't even know where to start debugging
> it... there seems to be a difference between the way my app is
> behaving between my local environment and my deployment environment.
> Hopefully you guys can give me some idea where to start.
>
> I've written a small PR application that along with a story, publishes
> pictures and other files.  I've written models that look like this
> (this is all written on the trunk):
>
> class Story(models.Model):
>     title = models.CharField(max_length=100)
>     date = models.DateField()
>     slug = models.SlugField()
>     published = models.BooleanField()
>     body = models.TextField()
>
>     class Meta:
>         verbose_name_plural = "stories"
>         ordering = ['-date']
>         pass
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Admin:
>         list_display = ('title','date','slug',)
>         pass
>
> class Picture(models.Model):
>     image = models.ImageField(upload_to="photos")
>     date = models.DateField()
>     title = models.CharField(max_length=100, core=True)
>     caption = models.CharField(max_length=100, blank=True)
>     story = models.ForeignKey(Story, edit_inline=models.STACKED)
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Meta:
>         ordering = ['-date']
>         pass
>
> class Downloads(models.Model):
>     media = models.FileField(upload_to="downloads")
>     date = models.DateField()
>     title = models.CharField(max_length=100, core=True)
>     story = models.ForeignKey(Story, edit_inline=models.STACKED)
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Meta:
>         verbose_name_plural = "downloads"
>         ordering = ['-date']
>         pass
>
> This works great locally on my machine.  However, when I deploy on
> WebFaction (again using a django instance built from the trunk),
> everything appears to be fine until I edit a Story object in the Admin
> UI.  When I try and save any edits (no matter what field I edit), I
> get this error:
>
> Traceback:
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/core/
> handlers/base.py" in get_response
>   82.                 response = callback(request, *callback_args,
> **callback_kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
> admin/views/decorators.py" in _checklogin
>   62.             return view_func(request, *args, **kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/views/
> decorators/cache.py" in _wrapped_view_func
>   44.         response = view_func(request, *args, **kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
> admin/views/main.py" in change_stage
>   338.             new_object = manipulator.save(new_data)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/manipulators.py" in save
>   207.                                     f.save_file(rel_new_data,
> new_rel_obj, self.change and old_rel_obj or None, old_rel_obj is not
> None, rel=True)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/fields/__init__.py" in save_file
>   933.         FileField.save_file(self, new_data, new_object,
> original_object, change, rel, save)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/fields/__init__.py" in save_file
>   847.                 file_name = file['filename']
>
> Exception Type: TypeError at /admin/pr/story/1/
> Exception Value:stringindicesmust be integers
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



string indices must be integers error in admin - don't know where to start debugging

2008-07-07 Thread Jon Loyens

Hi everyone,

I've got a problem and I don't even know where to start debugging
it... there seems to be a difference between the way my app is
behaving between my local environment and my deployment environment.
Hopefully you guys can give me some idea where to start.

I've written a small PR application that along with a story, publishes
pictures and other files.  I've written models that look like this
(this is all written on the trunk):

class Story(models.Model):
title = models.CharField(max_length=100)
date = models.DateField()
slug = models.SlugField()
published = models.BooleanField()
body = models.TextField()

class Meta:
verbose_name_plural = "stories"
ordering = ['-date']
pass

def __str__(self):
return self.title.encode("utf-8")

class Admin:
list_display = ('title','date','slug',)
pass

class Picture(models.Model):
image = models.ImageField(upload_to="photos")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
caption = models.CharField(max_length=100, blank=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)

def __str__(self):
return self.title.encode("utf-8")

class Meta:
ordering = ['-date']
pass


class Downloads(models.Model):
media = models.FileField(upload_to="downloads")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)

def __str__(self):
return self.title.encode("utf-8")

class Meta:
verbose_name_plural = "downloads"
ordering = ['-date']
pass

This works great locally on my machine.  However, when I deploy on
WebFaction (again using a django instance built from the trunk),
everything appears to be fine until I edit a Story object in the Admin
UI.  When I try and save any edits (no matter what field I edit), I
get this error:

Traceback:
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/core/
handlers/base.py" in get_response
  82. response = callback(request, *callback_args,
**callback_kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/decorators.py" in _checklogin
  62. return view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/views/
decorators/cache.py" in _wrapped_view_func
  44. response = view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/main.py" in change_stage
  338. new_object = manipulator.save(new_data)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/manipulators.py" in save
  207. f.save_file(rel_new_data,
new_rel_obj, self.change and old_rel_obj or None, old_rel_obj is not
None, rel=True)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
  933. FileField.save_file(self, new_data, new_object,
original_object, change, rel, save)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
  847. file_name = file['filename']

Exception Type: TypeError at /admin/pr/story/1/
Exception Value: string indices must be integers

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Running Multiple Sites/Apps with FastCGI... Where to start?

2007-01-04 Thread kwe


Tom,

We run a number of sites using lighttpd and django off one code base.
Yes, each site needs an entry in lighttpd.conf and each site has it's
own settings file. Obviously you can set settings to allow each
instance to have different templates or different installed apps.

http://bus.glam.ac.uk/ and http://news.glam.ac.uk/ are examples. They
both share roughly the same core code, but use different templates and
some additional apps.

regards
Kevin


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Running Multiple Sites/Apps with FastCGI... Where to start?

2007-01-04 Thread Tom Smith


I'm having trouble on deciding where to start with this problem. I  
only have one port to use on TextDrive.



I have .co.uk site running using Django (under FastCGI). I want to  
duplicate the site and change the content for the .com US version,  
making modifications to the model/code/templates along the way... Do  
I ...


duplicate my app folder and add the new folder to INSTALLED_APPS
and then add another $HTTP["host"] bit to my lighttpd.conf file
add a django-fcgi.py file to the .com web folder

???

Or have I got this all upside down?

Thanks

tom

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Where to start with the upcoming newforms module?

2006-12-08 Thread Adrian Holovaty

On 12/8/06, Ramdas S <[EMAIL PROTECTED]> wrote:
> I am trying Django forms. I just updated to the new svn revision 4186.
>
> But when I try
>
> >>> from django import newforms
> Traceback (most recent call last):
>
>  File "", line 1, in ?
> ImportError: cannot import name newforms

I suspect you have multiple versions of Django installed, and your
Python was pointed at the wrong one when you ran that import
statement.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Where to start with the upcoming newforms module?

2006-12-08 Thread yi huang
This  may help you to read the unit
tests ;-)
Most editor just treat doctest as string.

On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I came across the new 'newforms' page in Django documentation pages.
> I am rather happy to get details about the replacement plan, but it is
> definitely lacking information about 'what' it will really replace, and in
> what
> way.
>
> So here I am with a few questions:
> 1) is this module fully operational yet?
> 2) does it replace the whole manipulator (automatic/custom) concept?
> 3) and most important: if so, how?
>
> I'd like a very quick example of code (form creation, and its manipulation
> in a
> view). Where can I get one? I already had a look at the unit test script
> linked
> in the documentation, but I did not quite get the idea for the replacement
> of
> manipulators.
>
> In short: where do I begin to start using 'newforms' ? I'm all lost :-)
>
> Note: I'm actively working on a Django project at work, which I also want
> to
> turn into a 'showcase' for future web development in my department. This
> is why
> I'm looking forward to using "newforms" asap.
>
>
> >
>


-- 
http://codeplayer.blogspot.com/


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---


Re: Where to start with the upcoming newforms module?

2006-12-08 Thread Ramdas S
I am trying Django forms. I just updated to the new svn revision 4186.


But when I try



>>> from django import newforms
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: cannot import name newforms


What do I need to do?

RS


On 12/8/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
>
> On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I came across the new 'newforms' page in Django documentation pages.
> > I am rather happy to get details about the replacement plan, but it is
> > definitely lacking information about 'what' it will really replace, and
> in what
> > way.
> >
> > So here I am with a few questions:
> > 1) is this module fully operational yet?
> > 2) does it replace the whole manipulator (automatic/custom) concept?
> > 3) and most important: if so, how?
>
> It's about 90% operational. Everything that's in it works, but there's
> at least one feature I still need to add, which is the code that
> creates a Form from a model class, or a list of model fields.
>
> Yes, it replaces the whole manipulator concept. Instead of using
> Manipulators, you use Forms. The latter are much, much easier and
> convenient to use.
>
> I'd encourage you to take a look at those unit tests again, even
> though you said you looked at them. Feel free to use newforms in your
> own applications. Otherwise, just stay patient until we update the
> documentation.
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com
>
> >
>


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---


Re: Where to start with the upcoming newforms module?

2006-12-08 Thread Adrian Holovaty

On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I came across the new 'newforms' page in Django documentation pages.
> I am rather happy to get details about the replacement plan, but it is
> definitely lacking information about 'what' it will really replace, and in 
> what
> way.
>
> So here I am with a few questions:
> 1) is this module fully operational yet?
> 2) does it replace the whole manipulator (automatic/custom) concept?
> 3) and most important: if so, how?

It's about 90% operational. Everything that's in it works, but there's
at least one feature I still need to add, which is the code that
creates a Form from a model class, or a list of model fields.

Yes, it replaces the whole manipulator concept. Instead of using
Manipulators, you use Forms. The latter are much, much easier and
convenient to use.

I'd encourage you to take a look at those unit tests again, even
though you said you looked at them. Feel free to use newforms in your
own applications. Otherwise, just stay patient until we update the
documentation.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Where to start with the upcoming newforms module?

2006-12-08 Thread django-user

Hi,

I came across the new 'newforms' page in Django documentation pages.
I am rather happy to get details about the replacement plan, but it is
definitely lacking information about 'what' it will really replace, and in what
way.

So here I am with a few questions:
1) is this module fully operational yet?
2) does it replace the whole manipulator (automatic/custom) concept?
3) and most important: if so, how?

I'd like a very quick example of code (form creation, and its manipulation in a
view). Where can I get one? I already had a look at the unit test script linked
in the documentation, but I did not quite get the idea for the replacement of
manipulators.

In short: where do I begin to start using 'newforms' ? I'm all lost :-)

Note: I'm actively working on a Django project at work, which I also want to
turn into a 'showcase' for future web development in my department. This is why
I'm looking forward to using "newforms" asap.


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---