Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-23 Thread Francis Akabo
I am interested in this project. Kindly get me started.

Regards.

On Sun, Feb 18, 2024 at 4:48 PM SURAJ TIWARI  wrote:

>  Join Our Django WhatsApp Bulk Messaging Project!
>
>  Hello everyone,
>
> Are you looking for an exciting opportunity to gain hands-on experience in
> Django development? Do you want to work on a meaningful project that
> leverages WhatsApp for bulk messaging? We're thrilled to invite you to join
> our dynamic team!
>
>  Benefits:
>
>- Get hands-on experience working on a real-world Django project.
>- Learn how to leverage WhatsApp for bulk messaging, a valuable skill
>in today's digital landscape.
>- Opportunities for hybrid work, allowing flexibility in your schedule.
>- Collaborate with experienced developers and gain valuable mentorship.
>- Access to cutting-edge tools and technologies.
>
>  Opportunities Available:
>
>- Django developers
>- Frontend developers
>- UI/UX designers
>- Quality assurance testers
>
> 欄 How to Join: Simply reply to this message expressing your interest,
> and we'll provide you with all the necessary details to get started on our
> project.
>
> Let's work together to create something amazing and gain valuable
> experience along the way! ✨
>
> Best regards,
>
> Suraj Tiwari
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e8a705fd-10d9-4c1a-b4ba-0a7b896dbfean%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKaPAM9cSzyHeWFe%2BsOGxzN%3DJtn%3DuYcA09ET90utE0x8sMD_4Q%40mail.gmail.com.


Re: Looking for collaborators for an online marketplace project with Python, Django, React.js and Next.js

2024-02-11 Thread Ayomide Francis- Akinlolu
I'm up for the collaboration

On Sat, Feb 10, 2024 at 5:55 PM Jorge Bueno 
wrote:

> The project:
>
> I am working on an exciting project that I think you might be interested
> in. It's about an online marketplace similar to the US farmers and
> livestock markets, but with an online focus. The project is already half
> done, with a well-defined requirements list and backlog that will allow you
> to learn a lot while contributing to a real project.
>
> Technologies:
>
> We are using Python and Django for the backend, Next.js and React for the
> frontend.
>
> What we are looking for:
>
> We need help to get django working making python manage.py runserver and
> also all the procedures to check it works well as unit tests right now we
> have the following functionalities programmed the MVP:
> 1.User Registration
> User Profiles
> Product Listing
> 4.Search and Filters
>  5.Shopping Cart
>  6.Payment System
> 7.Ratings and Reviews
> 8.Messaging
>  Notification system
> 10.User management
> Why collaborate:
>
> You will learn a lot: The project is well organized and will allow you to
> work with modern and relevant technologies.
> You will contribute to a real project: Your work will have a direct impact
> on the success of the project.
> You will be part of a community: We are a passionate team committed to the
> success of the project.
> How can you participate?
>  You can access my public GitHub repository here:
> https://github.com/Programacionpuntera/Marketplace-Supremo
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/153e4e9d-4453-4280-8b06-27c8cbd1f72fn%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO%3DRu5AQ5Qda8qgkPd5D5v3V6H%2B3PoMazzPNMyPKn-t60a6KOw%40mail.gmail.com.


Re: Who wants to join us to program an app for the play store that will consist of a nutritionist on the phone

2024-02-04 Thread Ayomide Francis- Akinlolu
I am interested, here's my whatsapp no. +2348025373455

On Wed, Jan 31, 2024 at 6:28 PM Joyce Mumbi 
wrote:

> I can design the UI
>
>
>
> [image: Mailtrack]
> 
>  Sender
> notified by
> Mailtrack
> 
>  01/31/24,
> 08:27:11 PM
>
> On Sun, 21 Jan 2024 at 18:34, Fasila Ali  wrote:
>
>> I am interested
>>
>>
>> On Sun, 21 Jan 2024, 6:35 pm kumbhaj shukla,  wrote:
>>
>>> add me @6386761456
>>>
>>> *Best regards,*
>>> *Kumbhaj shukla*
>>> https://www.linkedin.com/in/kumbhaj/
>>>
>>>
>>> On Mon, 15 Jan 2024 at 19:41, KUYESO ROGERS <2019bce...@std.must.ac.ug>
>>> wrote:
>>>
 Hello, I am interested, add +256772820840



 Kind regards,

 *Kuyeso Rogers | **Bcs. Software Engineering - **Mbarara University of
 Science and Technology*

 *Website|| ku-yesu.tech *



 On Thu, Jan 11, 2024 at 10:12 PM Victoria Adebiyi Precious <
 victoriaadebiy...@gmail.com> wrote:

> Good day. Is this opportunity still available?
> I'm interested. I tried but the number isn't on WhatsApp. If yes,
> kindly add me to the group. +2347068452733.
> Thank you very much!
>
> On Sat, 30 Dec 2023, 4:12 pm Abdulrahman Abbas, <
> abdouliabba...@gmail.com> wrote:
>
>> I'm interested your WhatsApp number it's either is incomplete or
>> incorrect add me to the group +234 9020 3877 75
>>
>> On Sat, Dec 30, 2023, 12:36 T Y  wrote:
>>
>>> This is the US tailored ?
>>>
>>> On Fri, Dec 29, 2023 at 9:58 PM Jorge Bueno <
>>> jorgebuenoben...@gmail.com> wrote:
>>>
 I have thought about these functionalities:Structure of the
 Application for the play store.
 The application will be divided into the following main sections:


 1.User Registration:This section will allow users to create
 accounts and provide personal information, such as their name, age, 
 gender,
 weight, height, food preferences and allergies.


 2.Medical Data Integration: This section will allow users to upload
 and store relevant medical analyses and results, allowing for a more
 accurate assessment of nutritional needs.


 Personalized Health Profile: This section will allow users to
 create detailed health profiles that include information on 
 pre-existing
 medical conditions, family history of diseases and other factors 
 affecting
 diet.


 Health Goals and Objectives: This section will allow users to set
 specific health goals, such as weight loss, muscle gain, blood pressure
 control, etc.


 5.Smart Recommendation Algorithms: This section will implement
 advanced algorithms that will process user information and provide 
 accurate
 and personalized recommendations.


 6.Nutritional Database: This section will contain an extensive food
 database with detailed nutritional information, including calories,
 protein, fat, carbohydrates, vitamins and minerals.


 7.Diet Tracking: This section will allow users to record daily food
 intake.


 8.Integration with Health Devices: This section will allow users to
 connect with health tracking devices to obtain real-time data.


 9.Notifications and Reminders: This section will allow users to
 receive notifications and reminders about their diet, health goals and
 other health-related activities.


 10.Personalized Nutrition Tips: This section will provide
 educational nutrition information and personalized tips to help users 
 make
 healthier dietary choices.


 11.History and Tracking: This section will record the user's diet
 history and health progress.


 12.Interaction with Health Professionals: This section will allow
 users to communicate with health professionals, such as nutritionists, 
 for
 personalized advice.


 Privacy and Security: This section will implement robust privacy
 and security measures to protect the user's information.


 14.Recipe Customization: This section will allow users to create
 customized recipes that fit their preferences and dietary restrictions.


 Continuous Updates: This section will keep the application updated
 with new features, bug fixes and a constantly growing food database.We 
 can
 create a wassap group: My wassap is 641015323

Re: Freelance Django and Python work

2023-06-15 Thread Francis F. Massaquoi, Jr.
Hi, 

I am interested in the Django and Python Developer freelancing role, I am a 
Python Developer with great experience working Django, Flask, FastApi and 
other advance frameworks. Based on my experience I believed I am be a great 
candidate for this role. 

I remain available, if there are any additional information needed. 

Regards. 

Francis F. Massaquoi Jr. 
On Tuesday, June 13, 2023 at 11:30:40 AM UTC אורי wrote:

> Hi,
>
> I'm looking for a programmer to hire as a freelancer for Django and Python 
> work.
>
> - Experience with Python and Django
> - Experience with open source
> - Committed to the Django repository on GitHub - an advantage
> - Committed to other open-source projects in Python - an advantage
> - Experience with Stack Overflow -  an advantage
> - BSc or BA in computers or science (math, physics) -  an advantage
> - Knowledge of HTML, CSS, and JavaScript - an advantage
> - Can issue receipts
>
> I need about 5 hours per month on average. Some months I might need up to 
> 15 hours per month. Some months I might not need anything. The work is 
> remote. My project is open source. I can give you a free license to 
> PyCharm. My website is at https://en.speedy.net/ and 
> https://github.com/speedy-net/speedy-net
>
> To apply please send one email to jobs+jango...@speedy.net, with your 
> name, your email address, where you live, your experience, how many commits 
> you committed to Django, how many commits you committed to other open 
> source projects, a link to your profile on LinkedIn, a link to your profile 
> on GitHub, a link to your profile on Stack Overflow, your diploma if you 
> have any, how much you charge per hour and in which currency (I prefer USD 
> or Euro), and if you can issue receipts. If you don't have a profile on one 
> of the above websites please mention this too.
>
> Thanks,
> Uri Rodberg, Speedy Net.
> אורי
> u...@speedy.net
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6228db4a-936d-43de-8bb2-173ade7b48f2n%40googlegroups.com.


Re: Unpaid Internship

2023-04-24 Thread Ayomide Francis- Akinlolu
Can I also direct message you? I'm very interested in an internship. I'm 
from Nigeria.

On Monday, April 24, 2023 at 8:58:05 AM UTC-7 Paul Kudla ( SCOM ) wrote:

> Pls contact me directly at pa...@scom.ca please have an idea
>
>
> thanks - paul
>
> Paul Kudla
>
>
> SCOM.CA Internet Services Inc.
> 004-1009 Byron Street South
> Whitby, Ontario - Canada
> L1N 4S3
>
> Toronto 416.642.7266
> Main 1.866.411.7266
> Fax 1.888.892.7266
>
>
> On Apr 24, 2023 at 10:26:17 EDT, John Diginee  
> wrote:
>
> Dear Sir/Ma'am,
>
> I hope this message finds you well. I am a full-stack software engineering 
> student at Holberton School, a Silicon Valley-based software engineering 
> institution. I am reaching out to express my interest in an unpaid backend 
> intern or junior role at your esteemed company.
>
> My primary goal is to learn from your inspiring and experienced developers 
> and gain practical, real-world experience. I am not particularly concerned 
> about financial compensation at this time.
>
> I understand that my request may seem unconventional, but I would be 
> grateful for any opportunity to work with your company. I am a hardworking, 
> persistent, determined, resilient, and fast-learning individual, and I am 
> confident that I can contribute positively to your team.
>
> Here's my LinkedIn and GitHub profile for your review:
> https://www.linkedin.com/in/johndiginee/
> https://github.com/johndiginee
>
>  Thank you for your precious time and consideration. I look forward to 
> hearing from you.
>
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
>  
> 
> .
>
> -- 
> This message has been scanned for viruses and
> dangerous content by*MailScanner* , and is
> believed to be clean.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/615f1b56-5443-4645-a977-779368694f32n%40googlegroups.com.


Re: Looking for available support to start a School Management Application

2022-11-07 Thread Eric Francis
Many thanks for all your feedback.
I will share details on what has been requested and the level of what I
have done so far.
Thank you

Eric

On Mon, 7 Nov 2022, 12:33 kateregga julius,  wrote:

> Before starting on the system.
> Do information gathering,
> Design your database schema.
>  (Visual paradigm)
> Then set your development environment
>
> On Mon, Nov 7, 2022, 11:44 AM Adekola Aderonmu 
> wrote:
>
>> I am also interested  in collaborating with you.
>>
>> On Mon, 7 Nov 2022, 06:37 DJANGO DEVELOPER, 
>> wrote:
>>
>>> Are you looking for a paid support?
>>>
>>> On Mon, 7 Nov 2022, 9:41 am ritik sahoo, 
>>> wrote:
>>>
 I have

 On Mon, 7 Nov, 2022, 5:34 am Makrand,  wrote:

> I have developed School management system. I am interested to complete
> support.
>
> On Mon, Nov 7, 2022, 4:27 AM Ahmed omar miladi <
> ahmedomarmil...@gmail.com> wrote:
>
>> hello frncseric i'm ahmed omar miladi i'm full stack developer and
>> django specialist i build a platform with name is allcarta check
>> https://www.allcarta.com and i can help you to build a
>> school management system
>>
>> On Sun, 6 Nov 2022 at 23:05, nef  wrote:
>>
>>> Hi everyone,
>>> I am beginer in Django, not much experience.
>>> I have been task to develop an application for school management
>>> (Admission, Registration,  Attendance, Report marks, and more 
>>> functions).
>>> I am wondering if there is an existing open smilare app or something
>>> which can be use as baseline to start or guide me with best practices.
>>> Thank you
>>> Eric
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/176ec5a0-2e00-4f53-b5c3-1bfc72f3aa94n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAE3Dc2PkKJUF19fSykG%2BAmYByW6MY49UW%3DHSiKEL%2BPnZ6CHrvA%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA_ekM%2BRQKYixBpZnZzYaN9cE9ete_PpPX%2BVJEj3e%2B%2BK2jktbQ%40mail.gmail.com
> 
> .
>
 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAJwehCvV8YkQXf5y5AM_OGTH0vmv_f_kuHyTq7K0p_HyKG3-Sg%40mail.gmail.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAKPY9pnVbYxmp%3DOq%2BbNtRXKJhy78jnzozkFn5VMnn%3DKcUTZ6Gw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> 

Django cpanel url error

2021-12-21 Thread Johnbosco Francis
i have hosted my Django website on cPanel, But am facing an issue with URL 
when I try www.mywebsite.com it works but when i try accessing other pages 
like www.mywebsite.com/about am getting 404 error. 

any help will be appreciated

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/901a5a6c-3b97-41d7-a7d3-2cd956b572b3n%40googlegroups.com.


I need help with getting latest object after filtering

2021-05-10 Thread Francis Akabo
Hi Everyone!
I am working on a project that is supposed to allow users to transfer files 
amongst each other. A transferred file can only be viewed by the user to 
whom the file has been transferred or an is_staff account.

*My Model*
class File(models.Model):
TYPES = (
('GENERAL', 'General'),
('PERSONAL', 'Personal'),
)
type = models.CharField(max_length=10, choices=TYPES, default='Personal')
no = models.CharField(max_length=250, unique=True, null=True)
name = models.CharField(max_length=250, unique=True, null=True)
created = models.DateTimeField(auto_now_add=True, null=True)
updated = models.DateTimeField(auto_now=True)
class Meta:
ordering = ('-created',)

def __str__(self):
return f'{self.no}'

def get_absolute_url(self):
return reverse('outgoing_file', args=[self.pk])

class Transfer(models.Model):
STATES = (
('OUTGOING', 'Outgoing'),
('INCOMING', 'Incoming'),
)
file = models.ForeignKey('File', on_delete=models.CASCADE, 
related_name='transfers')
state = models.CharField(max_length=10, choices=STATES, 
default='Outgoing')
file_from = models.ForeignKey(User, on_delete=models.SET_NULL, 
null=True, related_name='transfers_from')
file_to = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, 
related_name='transfers_to')
recipient_name = models.CharField(max_length=250)
incoming_date = models.DateTimeField(auto_now=True)
due_date = models.DateTimeField(default=due_date(), null=True)
updated = models.DateTimeField(auto_now=True)
def __str__(self):
return f'{self.file_from} {self.file_to}'

*My Views*
@login_required
def outgoing_file_list(request):
if request.user.is_staff:
files = File.objects.all()
else:
files = File.objects.filter(transfers__file_to_id=request.user.id)

context = {
'files': files,
}
*NOTE:*
When the same file is transferred to a user multiple times, I want the 
query to return the newest item only. That to me will make the file 
accessible per user. Any recommended approach to achieve this is welcome.

*My Template*
**
*#*
*File Type*
*File Number*
*File Name*
*Recipient Name*
*Office Number*
*Transferred To*
*Outgoing Date*
*Due Date*
*Actions*
**
**
**
*{% for file in files %}*
**
*{{ forloop.counter }}*
*{{ file.type }}*
*{{ file.no }}*
*{{ file.name | title  }}*
*{{ file.transfers.recipient_name 
}}*
*{{ file.transfers.recipient_office 
}}*
*{{ file.transfer_to.get_full_name 
}}*
*{{ file.outgoing_date.date }}*
*{{ file.due_date | timeuntil }}*
**
*{% if request.user.is_staff %}*
**
*Receive*
**
**
*{% endif %}*

**
*Transfer*
**
**
**
**
*{% endfor %}*

*NOTE: All related fields in the table do not show ie.*
*file.transfers.recipient_name*
*file.transfers.recipient_office*
*file.transfer_to.get_full_name*
*and the remaining.*

Thanks.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/801238dc-3aff-4bd6-8863-726eb024a163n%40googlegroups.com.


How to use Topaz T-S460-HSB-R USB Electronic Signature Capture Pad in a Django Project

2020-10-09 Thread Francis F. Massaquoi, Jr.
Hi, 

I want to use Topaz Electronic Signature Capture Pad in my Django Web 
Application is it possible? Is there a way to integrate this signature in 
my Web Application I'm using https://github.com/szimek/signature_pad.

Below is a photo of the signature pad.
[image: 61b9noIw2mL._AC_SL1274_.jpg]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/054a19d6-2cee-438c-ab65-10f4a702155cn%40googlegroups.com.


Re: Collaborators

2020-06-20 Thread FRANCIS ODERO
hello am really interested in django backend development
How am i supposed to contant you

On Sat, Jun 20, 2020 at 4:08 AM chaitanya orakala 
wrote:

> Hey John,
> I had sent an email in interest to this position. Please have a look at it
> Thanks
>
> On Fri, Jun 19, 2020 at 7:52 PM John McClain 
> wrote:
>
>> Hello Ali,
>>
>> Please contact me via email or skype to discuss the possibilities.
>>
>> Cheers,
>>
>> John
>>
>> On Fri, 19 Jun 2020 at 12:37, Ali Murtuza  wrote:
>>
>>> Hello I am intrested for Django backend developer
>>>
>>> On Fri, 19 Jun 2020 at 2:55 PM, John McClain 
>>> wrote:
>>>
 Hello all,

 I am looking for long term collaborators on a live django project I own
 and operate.

 This is a bootstrapped project which is generated revenue. However, all
 funds are poured back into the project at the moment.

 There is compensation for the right person(s)

 Please only apply if you have exceptional full stack developer skills.
 This is not a jr. role but would suit an intermediate level developer with
 a few years under their belt.

 Fluent English as a first language is required but the position itself
 is fully remote.

 If you are looking to contribute to a true bootstrapped startup with a
 proven POC, perhaps you would consider this opportunity.

 I am looking forward to speaking with you soon.


 We are looking for expertise in

 1. Marketing Guru who can manage the Sendgrid implementation and
 ongoing marketing campaign creation and management.

 2. Django backend developer to continue improving models or introducing
 new ones to the architecture already in play.

 3, Frontend designer with strong UI UX experience to assist with assets
 to compliment the two rolls identified above

 --
 John McClain
 fundgrazing.com

 Cell: 085-1977-823
 Skype: jmcclain0129
 Email: jmcclain0...@gmail.com

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAN-hv_qi7kLmrfcQaqihT1xP0EpfJbqgt5S6q%3Di8rOFDwgBasw%40mail.gmail.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BGgMvW12F83%3DpqLubJTGqkUzH2eDzqzn1t%2BgMZ3UnCsE6uy%3Dw%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> John McClain
>>
>> Cell: 085-1977-823
>> Skype: jmcclain0129
>> Email: jmcclain0...@gmail.com
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN-hv_pJ-eh2XGYkKFA6NSez89ffOe__oizdqpOMrrOHVRmieg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPcTzRaJAGoAvRAdUDJh_Eo9-hvW1Ef2HGUgudoix0O42h6PdQ%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOLnz-z3v1EEiBRz%3DoZZgqW93HEjogZsynG2akZOpRRgOiynFA%40mail.gmail.com.


Re: Any newbies especially in Cape Town for meetups?

2020-02-17 Thread Francis Butawu
I said Cape Town as i want this to be a group where we will be meeting like
once a month in person and learn form each other as well as helping each
other out

On Mon, Feb 17, 2020 at 3:07 PM Chucky Mada Madamombe 
wrote:

> I suggest a group for everyone in RSA is fine and not just CAPETOWN. I am
> interested!
>
> Regards
>
> Chuck G. Madamombe
> NAM: +264 81 842 1284
> RSA: +27 78 208 7034
> Twitter: @chuckygari
> Skype: chuckygari
> Facebook: Chucky Mada Madamombe
> LinkedIn: Chucknorris Garikayi Madamombe
>
> On Sun, 16 Feb 2020, 00:05 Francis Butawu  wrote:
>
>> Hi All
>>
>> I'm new to Django and I'm looking for some people to organize a meetup
>> with and learn from each other ideally those in Cape Town pls reach out
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/841891a5-2df4-4c2e-ab5c-6f2ee7a9b44d%40googlegroups.com
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJaKOscHUcQDyD29P-tAhfQxQkk%3DwFg6XiyD708YqKb5T-zaHg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJaKOscHUcQDyD29P-tAhfQxQkk%3DwFg6XiyD708YqKb5T-zaHg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Kind regards;

*Francis Butawu*
*IT Developer*

*0721163991 / 0733008074*
LinkedIn <https://www.linkedin.com/in/francisbutawu/>
franc...@techcape.co.za
www.techcape.co.za
skypealpha_geek

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B_DYLnoxcY_vFTTB6E7PBSJY9fSrCtBGMGfLq1X73i1H6OLAQ%40mail.gmail.com.


Re: Any newbies especially in Cape Town for meetups?

2020-02-17 Thread Francis Butawu
That's what I'm thinking of doing

On Mon, Feb 17, 2020, 12:16 PM Bruckner de Villiers <
bruckner.devilli...@gmail.com> wrote:

> Why not start a Django Meetup Group?  There is already a Python Meetup
> Group.  I would be interested.
> Regards,
>
> Bruckner de Villiers
> 083 625 1086
>
> On 2020/02/16, 12:16, "Perceval Maturure"  on behalf of drperce...@gmail.com> wrote:
>
> That’s a good point. How about, could you elaborate on how this can be
> done? Skype calls? Skype groups?
> Please share what you have in mind
> Regards
> Perceval
>
> > On 15 Feb 2020, at 23:42, Francis Butawu  wrote:
> >
> > Hi All
> >
> > I'm new to Django and I'm looking for some people to organize a
> meetup with and learn from each other ideally those in Cape Town pls reach
> out
> >
> > --
> > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/841891a5-2df4-4c2e-ab5c-6f2ee7a9b44d%40googlegroups.com
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/38F77DB0-2AE3-4257-BE5A-32C1E819C6CB%40gmail.com
> .
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CDB75CDD-959F-4576-B12B-A66BA455C550%40gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B_DYLnRHE11pwDcLn2W%3Dh%2B%2B0kJTLwcNvEpgETihkPHpqy2Uxw%40mail.gmail.com.


Re: Study and project partner(s) needed

2020-02-16 Thread Kyl Francis
Hi, I'm interested. How can I reach you?

Le dim. 16 févr. 2020 à 17:39, Realdox Opeyemi 
a écrit :

> I think the person that start this thread should create a WhatsApp group
> ,all of us can discuss there and code through GitHub ...if you like the
> idea ,here is my digit ...+2348163534852
> On Feb 14, 2020 5:15 PM, "Akorede Habeebullah"  wrote:
>
>> Hi guys,
>>
>> I've been learning Django on a solo for a while now and I'm really in
>> need of a Programmer friend/partner who we can always learn together, build
>> projects together. This will really benefit both sides greatly.
>> I am a person you'll really love to make friend with. Interested
>> individuals should pls signify.
>>
>> Thanks.
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/6d4ed94c-3864-4c5b-9f9e-5df7b6a77cdd%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPqMW_T%3DhB8vixu7ufmm%3DSjo%3D9_cSk%3D_viB%3DivaujEbHKRwuRw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-He%3DFCY7GcNthyHXgDqTjoEmJW5WGrKZnAbXXyJm85PUURHw%40mail.gmail.com.


Re: Study and project partner(s) needed

2020-02-16 Thread Kyl Francis
you can create a group from whatsapp or telegram


Le ven. 14 févr. 2020 à 17:15, Akorede Habeebullah  a
écrit :

> Hi guys,
>
> I've been learning Django on a solo for a while now and I'm really in need
> of a Programmer friend/partner who we can always learn together, build
> projects together. This will really benefit both sides greatly.
> I am a person you'll really love to make friend with. Interested
> individuals should pls signify.
>
> Thanks.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6d4ed94c-3864-4c5b-9f9e-5df7b6a77cdd%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-He%3DGCC%3DcmNxuX-o8eLopnCHXB_PovYshwu%2B%3DSijChfceTng%40mail.gmail.com.


Re: Study and project partner(s) needed

2020-02-14 Thread Francis Butawu
How can we all get in touch with each other? I'm interested too

On Fri, Feb 14, 2020, 7:58 PM Hedrick Godson's 
wrote:

> Please I need that too. Can we team up?
> Please check me +255762547915, or email me pls
>
> On Fri, 14 Feb 2020, 19:15 Akorede Habeebullah  wrote:
>
>> Hi guys,
>>
>> I've been learning Django on a solo for a while now and I'm really in
>> need of a Programmer friend/partner who we can always learn together, build
>> projects together. This will really benefit both sides greatly.
>> I am a person you'll really love to make friend with. Interested
>> individuals should pls signify.
>>
>> Thanks.
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/6d4ed94c-3864-4c5b-9f9e-5df7b6a77cdd%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJAxQD%3DcH2bORsO3WB5Q7dJQRNcWEFCm_d-FfdsREbW0GGvtig%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B_DYL%3Dgd7tMa1jfc22ieCk2tTVeZzsxeg6HBFsvtZ1--WW7Mg%40mail.gmail.com.


Re: Python Django Training

2020-02-03 Thread Francis Butawu
Add me also I am interested

On Mon, Feb 3, 2020 at 10:53 AM Umar Kambala  wrote:

> Add me to the group please.. +233(0)203502038
> On Feb 2, 2020 6:50 PM, "Nabil Mokhtar"  wrote:
>
>> Ok we now have many interested members
>> Any one suggest group app we can share material on it with our questions
>> to keep us connected
>>
>> On Sun, Feb 2, 2020, 20:11 Sarvesh singh  wrote:
>>
>>> I m also want to learn.
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/6d5c9ce0-50b7-4391-9f2b-f192a41d1b89%40googlegroups.com
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKgi3KEAjaUbLrCb2C3V-QmM1P42iWMKb3U8MisN9BxqdpZAiw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKgi3KEAjaUbLrCb2C3V-QmM1P42iWMKb3U8MisN9BxqdpZAiw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPkbFbY%2B4WQ0Rrf6ctLF97Bnh7Z4EgJPAFcUVAP3bvf2umoxfQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPkbFbY%2B4WQ0Rrf6ctLF97Bnh7Z4EgJPAFcUVAP3bvf2umoxfQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Kind regards;

*Francis Butawu*
*IT Developer*

*0721163991 / 0733008074*
LinkedIn <https://www.linkedin.com/in/francisbutawu/>
franc...@techcape.co.za
www.techcape.co.za
skypealpha_geek

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B_DYL%3DnS08sFXxAOmWtqYQcYG9LmY9MfGhh%3DvhW__8TnkmcwQ%40mail.gmail.com.


Re: Django CMS

2019-12-25 Thread Kyl Francis
Me too

Le mer. 25 déc. 2019 à 8:48 PM, viho kochoedo  a
écrit :

> Hello,
> I want to know more about Django CMS.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/27c99d0a-bf88-4f7a-9148-f7903a91f08f%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-He%3DGGV5hLzHYr9E4nUHF%3D-LDCzybcTNebKZP16Si0U1PAHQ%40mail.gmail.com.


Re: Maps API

2019-09-13 Thread john francis
How to do bro...

On Thursday, 12 September 2019 22:48:40 UTC+5:30, Mehul Anshumali wrote:
>
> Yss bro 
>
> On Thu, Sep 12, 2019, 8:03 PM Aniket Jain  > wrote:
>
>> Hello guys,
>> Hey anyone is having idea that which API we can use for the grps tracking 
>> system for the vechiles like Uber and ola.
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CADV%2BovL2fdAiu5wqoEDXw3aKgVRW_FSAud3uE%3D_Nux-4vsEzCQ%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a61bc778-012a-46bd-b0aa-4c6d4830c259%40googlegroups.com.


Re: Maps API

2019-09-13 Thread john francis
Please help me too know better... 

On Thursday, 12 September 2019 22:43:02 UTC+5:30, sachinbg sachin wrote:
>
> Use Google GPRS 
>
> On Thu, Sep 12, 2019, 8:03 PM Aniket Jain  > wrote:
>
>> Hello guys,
>> Hey anyone is having idea that which API we can use for the grps tracking 
>> system for the vechiles like Uber and ola.
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CADV%2BovL2fdAiu5wqoEDXw3aKgVRW_FSAud3uE%3D_Nux-4vsEzCQ%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0932ef9a-df5f-44b7-ac23-1b6d29ce0a9d%40googlegroups.com.


Message from a django beginner user

2018-05-15 Thread Francis F. Massaquoi, Jr.
Hi, I'm Francis F. Massaquoi, Jr. with great interest in learning django 
2.0, which is the latest version, I have been searching on youtube for a 
channel that have the latest version tutorial, I have not really find one, 
can someone please help me with a pdf or website, where I can learn django 
to the best, I have been reading some pdf, I have the basic knowledge, but 
I need to advance my knowledge. Or if you can connect with me on skype, 
this is my skype username: francisfmassaquoijr, or if you have a skype 
group, you can please add me, or give me your skype username...

Your urgent response will highly be appreciated. 

Thanks to the admin for accepting me..

We do it the django way, because it's the best way to web app 
development.

-- 
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/e22ff629-023d-41dc-bb08-7d0d0f87fd42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is this possible with Django, new to this!

2017-02-22 Thread Francis Sunday
I think that is possible with Django

On Wednesday, February 22, 2017 at 1:15:15 PM UTC+1, ushills wrote:
>
> Hi, looking for some advice regarding what's possible with Django before I 
> go too far.  
>
> Can I create a view into a database with approximately 20 fields that 
> allows be to drill down into each row and that allows me to view and enter 
> transactional information and view an audit path for how each row has 
> changed over time.
>
> Essentially, each row will be a component type with various cost 
> production criteria, these will be changed over time and in combination 
> produce a total cost for the completed product.
>
> I want users to be able to enter the components, update the cost criteria 
> at regular intervals and view the total cost with views into each component 
> type to view the audit path of how and who has changed the cost criteria.
>
> I could do this as a desktop application in python, however, having it as 
> a web app seems the more modern approach, can Django do this?
>
>
>

-- 
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/42972633-62b7-4fff-9eb5-71c4b7338942%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: application of migration fails

2016-12-12 Thread Francis Fisher
So it turns out that a different user owned the non-managed tables, which
seemed to prevent the django user from accessing certain information about
those tables.

-- 
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/CAFN8OSYecRazFHVYy4fwY%3DzLB4LcCGLLa1SPo%3DBqY7kscYXPQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: application of migration fails

2016-12-12 Thread Francis Fisher
I can see why django is crashing at   File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/introspection.py",
 
line 178, in get_constraints

If I run the query at that line in postgres, I get the following response:
constraint_name|  column_name   
| constraint_type |   array   
---++-+---
 eveshoppinglist_buildline_shopping_list_id_fkey   | shopping_list_id   
| FOREIGN KEY | {eveshoppinglist_shoppinglist.id}
 eveshoppinglist_buildline_item_type_id_fkey   | item_type_id   
| FOREIGN KEY | {invTypes.typeID}
 eveshoppinglist_buildline_build_location_type_id_fkey | 
build_location_type_id | FOREIGN KEY | {invTypes.typeID}
 eveshoppinglist_buildline_pkey| id 
| PRIMARY KEY | {eveshoppinglist_buildline.id}

However, when I fetch the results of that query from python via psycopg2 I 
get:
['eveshoppinglist_buildline_shopping_list_id_fkey', 'shopping_list_id', 
'FOREIGN KEY', ['eveshoppinglist_shoppinglist.id']]
['eveshoppinglist_buildline_item_type_id_fkey', 'item_type_id', 'FOREIGN 
KEY', []]
['eveshoppinglist_buildline_build_location_type_id_fkey', 
'build_location_type_id', 'FOREIGN KEY', []]
['eveshoppinglist_buildline_pkey', 'id', 'PRIMARY KEY', 
['eveshoppinglist_buildline.id']]

In the 2nd and 3rd rows, the final value is an empty list, but in both 
lines should contain 'invTypes.typeID'. Because this result is empty, 
used_cols[0] raises an exception.

So what I need to figure out is, why this query response fails to transfer 
to python, and is the problem within psycopg2, or is it a bad query from 
django. My initial hypothesis is that its because the unmanaged 
table+column names are not entirely lower case.

For reference, this occurs with psycopg2 versions 2.6.1 and 2.6.2 and 
django 1.10.3 and 1.10.4.

More anon...




>>

-- 
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/82905960-4433-4a68-84e7-ddc098641142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: application of migration fails

2016-12-12 Thread Francis Fisher
The above migration crash was when applying to a postgres database, I've 
tried applying this migration to a mysql database and it still crashes, 
albeit differently.

--
  File "evetools/manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 367, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 294, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 345, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py",
 
line 204, in handle
fake_initial=fake_initial,
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
fake_initial=fake_initial)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 244, in apply_migration
state = migration.apply(state, schema_editor)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", 
line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, 
project_state)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/fields.py",
 
line 282, in database_forwards
to_model._meta.get_field(self.new_name),
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 495, in alter_field
old_db_params, new_db_params, strict)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 558, in _alter_field
self.execute(self._rename_field_sql(model._meta.db_table, old_field, 
new_field, new_type))
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 112, in execute
cursor.execute(sql, params)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 
64, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 
94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 
64, in execute
return self.cursor.execute(sql, params)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", 
line 110, in execute
return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in 
execute
self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, 
in defaulterrorhandler
raise errorvalue
django.db.utils.OperationalError: (1138, 'Invalid use of NULL value')

>
>

-- 
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/318af723-8fc3-4fa7-b70f-384495e97bdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: makemigrations generates new migration when nothing has changed

2016-12-12 Thread Francis Fisher
On Wednesday, 30 November 2016 22:43:55 UTC, Mike Dewhirst wrote:
>
> On 1/12/2016 3:56 AM, Francis Fisher wrote: 
> > Any idea why makemigrations would fail to recognise that a migration 
> > has already been generated? 
>
> I think migrations is seeing field choices differently each time it 
> scans the model. Can you use a list rather than a tuple for choices? (Or 
> vice versa - I don't remember) Or import the choices from another module? 
>
> Thanks for this suggestion - I am using a field with choices somewhere in 
the model referenced by a ForeignKey.

I tried switching the choices from a tuple of tuples to a list of lists, 
and I tried defining the choices in another module, I also tried entirely 
removing the choices argument from the field definition, however none of 
those actions resolved the issue. I've since tried this action with django 
1.10.4 but to no avail.

-- 
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/a66060ed-5ae1-4517-a9bd-1dcdc6cb49f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


application of migration fails

2016-12-12 Thread Francis Fisher
Any idea if I'm doing something wrong or if I'm running into a bug?

I added some fields to a model, and generated a migration.

When I apply the migration, the migrate command crashes, with both django 
1.10.3 and 1.10.4.
I had a similar migration issue with another app in the same project, that 
occured in django 1.10 and 1.10.3.

Is this crash a known issue/common pitfall?

Cheers,
Frankie



-
Result of the "makemigrations":

Migrations for 'eveshoppinglist':
  evetools/eveshoppinglist/migrations/0009_auto_20161212_2140.py:
- Rename field build_location_type on buildline to build_facility_type
- Rename field from_location_id on moveline to from_facility_id
- Rename field from_type on moveline to from_facility_type
- Rename field to_location_id on moveline to to_facility_id
- Rename field to_type on moveline to to_facility_type
- Add field build_facility_id to buildline
- Add field build_system to buildline
- Add field build_facility_id to buyline
- Add field build_facility_type to buyline
- Add field build_system to buyline
- Add field from_system to moveline
- Add field to_system to moveline


-
Result of "migrate"

  File "evetools/manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 367, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 294, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 345, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py",
 
line 204, in handle
fake_initial=fake_initial,
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
fake_initial=fake_initial)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 244, in apply_migration
state = migration.apply(state, schema_editor)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", 
line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, 
project_state)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/fields.py",
 
line 282, in database_forwards
to_model._meta.get_field(self.new_name),
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 495, in alter_field
old_db_params, new_db_params, strict)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/schema.py",
 
line 117, in _alter_field
new_db_params, strict,
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 504, in _alter_field
fk_names = self._constraint_names(model, [old_field.column], 
foreign_key=True)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/base/schema.py", 
line 931, in _constraint_names
constraints = self.connection.introspection.get_constraints(cursor, 
model._meta.db_table)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/introspection.py",
 
line 178, in get_constraints
"foreign_key": tuple(used_cols[0].split(".", 1)) if kind.lower() == 
"foreign key" else None,

-- 
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/391cbf70-1727-484d-bb19-aa66c55eb1af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


makemigrations generates new migration when nothing has changed

2016-11-30 Thread Francis Fisher
Any idea why makemigrations would fail to recognise that a migration has 
already been generated?

makemigrations.py is a script which calls makemigrations with appropriate 
django settings. If I run this once, it will generate the initial 
migration, but every time I run it subsequently, it will regenerate a 
migration even though nothing has changed in the model. This is with django 
1.10.3 and postgres. The field sk that is constantly regenerated is a 
foreign key relation to an unmanaged database, but I have referred to this 
in a different app with no bother.

I am using django 1.10.3.

I found a post in this group that had a similar issue with instantiating a 
class in the model that was missing an implementation for __eq__ but that 
doesn't apply in this case as I don't instantiate any class in the model 
file.

Is there any common mistake that leads to this outcome?

--

user@testenv:~/eit/testproj$ ./makemigrations.py 
Migrations for 'sk':
  testproj/sk/migrations/0001_initial.py:
- Create model SKM
user@testenv:~/eit/testproj$ ./makemigrations.py 
Migrations for 'sk':
  testproj/sk/migrations/0002_auto_20161130_1643.py:
- Alter field s on skm
user@testenv:~/eit/testproj$ 
user@testenv:~/eit/testproj$ ./makemigrations.py 
Migrations for 'sk':
  testproj/sk/migrations/0003_auto_20161130_1643.py:
- Alter field s on skm


-- 
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/ad7c5eb6-4542-456e-8e53-675c02e897b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form CommitmentForm needs updating

2015-08-24 Thread Francis Louis
Hi All,

May I ask this question,

I am using Django 1.8.4 with Python 2.7

After I run the development server by running this 
command c:\Python27\python.exe manage.py runserver and access the below 
given URL,

http://127.0.0.1:8000/

I get this error, May I know how to resolve this issue?

Best Regards
Francis

ImproperlyConfigured at /

Creating a ModelForm without either the 'fields' attribute or the 'exclude' 
attribute is prohibited; form CommitmentForm needs updating.

Request Method:GETRequest URL:http://127.0.0.1:8000/Django 
Version:1.8.4Exception 
Type:ImproperlyConfiguredException Value:

Creating a ModelForm without either the 'fields' attribute or the 'exclude' 
attribute is prohibited; form CommitmentForm needs updating.

Exception Location:c:\Python27\lib\site-packages\django\forms\models.py in 
__new__, line 274Python Executable:c:\Python27\python.exePython Version:
2.7.10Python Path:

['c:\\data1\\SocialGame\\sg',
 'C:\\windows\\SYSTEM32\\python27.zip',
 'c:\\Python27\\DLLs',
 'c:\\Python27\\lib',
 'c:\\Python27\\lib\\plat-win',
 'c:\\Python27\\lib\\lib-tk',
 'c:\\Python27',
 'c:\\Python27\\lib\\site-packages',
 'c:\\data1\\SocialGame\\sg',
 'c:\\data1\\SocialGame\\sg\\SocialGame\\../..',
 'c:\\data1\\SocialGame\\sg']

Server time:Mon, 24 Aug 2015 15:03:37 +0800

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/28ad1260-55f4-4eb2-af6c-5daee988e0ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANNOUNCE] Security releases and advisory issued (1.7.6 and 1.8b2)

2015-03-09 Thread Francis Devereux
Hi,

On 9 Mar 2015, at 16:01, Tim Graham <timogra...@gmail.com> wrote:
> 
> Today the Django team issued multiple releases -- Django 1.7.6 and 1.8b2 -- 
> as part of our security process. These releases address a publicly reported 
> security issue, and we encourage all users to upgrade as soon as possible.

Thanks for these fixes.

Is Django 1.6.x affected vulnerable to these issues?

Francis

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0CCDBE6F-283B-40B4-ABB7-CFB45E9D507E%40devrx.org.
For more options, visit https://groups.google.com/d/optout.


Re: Traversing relationships based on lookup strings

2015-03-03 Thread Francis Devereux

> On 2 Mar 2015, at 22:11, James Schneider <jrschneide...@gmail.com> wrote:
> 
> Nothing in Django specifically that I'm aware of (although that's not saying 
> much), but you can probably do something pretty slick with the operator 
> library and attrgetter:
> 
> https://docs.python.org/2/library/operator.html#operator.attrgetter 
> <https://docs.python.org/2/library/operator.html#operator.attrgetter>
Thanks - I thought that I might have to roll my own solution if there wasn't 
anything in Django, but operator.attrgetter looks like it'll make rolling my 
own easier.

Francis

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/F6E09F08-63B7-4CAC-B718-679847CB923B%40devrx.org.
For more options, visit https://groups.google.com/d/optout.


Traversing relationships based on lookup strings

2015-03-02 Thread Francis Devereux
Hi,

Is there a Django function that takes a model instance and a lookup string, and 
returns the value of the related field?

For example:

the_function_i_am_looking_for(trip, 'booking__client__name')

would return the same as:

trip.booking.client.name

Thanks,

Francis

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/FB0F25B1-00B0-4CD5-A62D-B9CE44F189C8%40devrx.org.
For more options, visit https://groups.google.com/d/optout.


Django expat error

2014-11-05 Thread Amal Francis
I have a fresh installation of Django 1.7 on virtualenv. When i run the 
migration python manage.py migrate am getting 

from xml.sax.expatreader import ExpatParser as _ExpatParser
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 24, in 
raise SAXReaderNotAvailable("expat not supported", None)
xml.sax._exceptions.SAXReaderNotAvailable: expat not supported

I am using ubuntu 14.04. Any help, please?
Thanks in advance.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fce8636c-0dfc-4cd0-9830-23c3fe43bff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Writing a test that POSTs to the admin change view

2013-08-19 Thread Francis Devereux
Hi,

I would like to write a test that verifies that a particular message is shown 
when a model is saved in the admin that meets certain criteria (it's a warning 
message).

First off I need to figure out how to post to the admin change view from test 
code. I figured it would be easier to start with an existing model instance and 
edit it rather than try to add a new one, so I've tried code that does the 
following:

- create a new model instance and save it
- get the change view URL for it
- construct a ModelForm with the model instance
- POST to the change URL using the form's initial dictionary as data
(full code below)

The POST returns some validation errors. Is there an easy way to construct the 
data that the admin change view needs? Obviously I could look at the code that 
builds the form on the admin page and add a POST parameter for every input 
field I find on the form, but this would require reading (and writing) a lot of 
code.

As promised here's the (non-working) code I have so far:

from django.contrib import admin
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from goway.admin import TripAdmin
from goway.models import Trip
from goway.tests.service.utils import create_trip


class TripAdminTests(TestCase):
def setUp(self):
self.factory = RequestFactory()

def test_message_when_no_derived_primary_destination(self):
# This is an attempt to create a trip and then post it unchanged to the 
admin change view.
# The next step would be to check that there was a "Couldn't 
automatically work out primary destination, please choose a primary destination 
manually." message.
# Couldn't get the post to the trip change view to work though - got 
validation errors.
old_get_inline_instances = TripAdmin.get_inline_instances
# Hack get_inline_instances() to return an empty list to avoid 
ValidationError: [u'ManagementForm data is missing or has been tampered with']
TripAdmin.get_inline_instances = self.get_inline_instances
try:
user = User.objects.create_superuser('testadmin', 
'nob...@devrx.org', 'secret')
self.client.login(username=user.username, password='secret')

trip = create_trip()
change_url = reverse('admin:goway_trip_change', args=(trip.pk,))
request = self.factory.get(change_url)
request.user = user

trip_admin = TripAdmin(Trip, admin.site)
form_class = trip_admin.get_form(request, trip)
form = form_class(instance=trip)

response = self.client.post(change_url, data=form.initial)

errors = response.context['adminform'].form.errors
self.assertEqual(0, len(errors), msg='Got validation errors: %s' % 
errors)

messages = response.context['messages']
print messages
finally:
TripAdmin.get_inline_instances = old_get_inline_instances

def get_inline_instances(self, *args, **kwargs):
return []

...and here's the output:

Failure
Traceback (most recent call last):
  File 
"/Users/francis/Code/Bright/python/goway/apps/goway/tests/service/trip_admin.py",
 line 41, in test_message_when_no_derived_primary_destination
self.assertEqual(0, len(errors), msg='Got validation errors: %s' % errors)
AssertionError: 0 != 7 : Got validation errors: mapSelect a valid choice. That 
choice is not one of the available choices.tour_itinerarySelect a valid choice. That choice is not one of the 
available choices.primary_destinationSelect a valid choice. That choice is not one of the 
available choices.placeholder_pageSelect a valid choice. That choice is not one of the 
available choices.dynamic_packageSelect a valid choice. That choice is not one of the 
available choices.excursionSelect 
a valid choice. That choice is not one of the available 
choices.typesThis field is 
required.

It isn't critical that I add a test for this - it's not the end of the world if 
the warning message doesn't get shown - but it would be nice to know how to do 
it if there's an easy way!

Thanks,

Francis

-- 
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.


Re: Django not enforcing blank=False on a model

2013-07-30 Thread Francis Devereux
On 30 Jul 2013, at 06:14, Jani Tiainen <rede...@gmail.com> wrote:

> Also, you should note that .save() doesn't imply running validation 
> <https://docs.djangoproject.com/en/1.5/ref/models/instances/#validating-objects>

If you want models to be automatically validated on .save() then you can use 
https://github.com/brightinteractive/django-validate-on-save

Francis

-- 
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.




Re: how to create a databse

2013-01-05 Thread Francis Kayiwa
On Sat, Jan 5, 2013 at 9:41 AM, ANKIT BAGARIA  wrote:
> I have installed mysql as databse and i am not able to create a database. I
> know the command for it but dont know where to type it. Django tutorials
> tell to run the command in database interactive. But I am not able to figure
> out how to to so. Please help me in creating a database.


It helps if you say what Operating System you use.

On mine `which mysqladmin` will tell me where it is (although it is
already on my $PATH)

The steps from my terminal are then

/usr/local/bin/mysqladmin -u $user -p create MyDataBase

It will be a variation of the steps above on your OS.

Cheers and good luck

./fxk

--
"Beer busts, beer blasts, keggers, stein hoists, A.A. meetings, beer
nights..." --Homer Simpson

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



Portable way to prepend string to all rows in a table

2012-12-06 Thread Francis Devereux
Hi,

I currently have the following code in one of my migrations:

cursor = connection.cursor()
cursor.execute('''UPDATE travelbox_accommodationimage SET file = 
CONCAT('travelbox/accommodation/', url)''')
transaction.commit_unless_managed()

This works for us (on MySQL, which we are using due to hosting provider 
constraints), but as a matter of interest I wonder whether it's possible to 
avoid using raw SQL and the CONCAT function which may not be available in all 
databases.


First I tried this:


orm['travelbox.AccommodationImage'].objects.all().update(file='travelbox/accommodation/'
 + F('url'))

However that doesn't work - it executes the following SQL:

UPDATE `travelbox_accommodationimage` SET `file` = 
'travelbox/accommodation/' + `travelbox_accommodationimage`.`url`; 
args=('travelbox/accommodation/',)

which tries to use '+' on strings which fails with this error:

_mysql_exceptions.Warning: Truncated incorrect DOUBLE value: 
'travelbox/accommodation/'


Obviously I could iterate through all of the rows and update them individually, 
but is there a way of doing bulk concatenations on string columns using the 
Django ORM?

Thanks,

Francis

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



Thread-safeness of templates

2011-10-04 Thread Francis Kung
Hi,

My understanding is that Django is (or attempts to be) thread-safe,
and I'm hoping someone can help me track down this problem:

Part of my app uses django templates to create the content of an
email, which it then sends out.   The code is something like,

email = 'a...@def.com'
context = {'email': email}
body = render_to_string('template.html', context)
send_email(to=email, body=body)

where template.html is something like,
Hello, this email is being sent to {{ email }}.

And it's been working fine for over a year... but recently it was
brought to my attention that an email recipient didn't match the email
body - a few people had received emails that made no sense (the email
addresses in the "to" line and the body were different).

I did some searching, and there were a few concurrent requests at the
time; the mix-ups were with emails generated & sent within
milliseconds of each other, and I'm strongly suspect they were in
different requests/threads (based on the email addresses involved).

Is it possible (or known) that render_to_string isn't threadsafe
(django 1.2 / python 2.6)?  Or is the likely cause somewhere else?
Just trying to figure out the best place to start looking.

Thanks in advance!
Francis

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



Re: fieldsets django

2010-06-20 Thread Francis Gulotta
You might want to look into a css solution.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Fri, Jun 18, 2010 at 3:40 PM, Waléria Antunes David <
waleriantu...@gmail.com> wrote:

> I have a form with various fields and I need to split these fields so that
> it looks like the image attached. I was reading about FIELDSETS but do not
> know how to use.
>
> --
> 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 group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 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: Chase Paymentech

2010-06-20 Thread Francis Gulotta
Django bursar should also be mentioned. I'm about to try to use it, but out
of the payment modules I've found it seems the most sane.

http://bitbucket.org/bkroeze/django-bursar/

<http://bitbucket.org/bkroeze/django-bursar/>-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Sun, Jun 20, 2010 at 9:16 AM, Dan Gentry <dgen...@gmail.com> wrote:

> Storing credit card numbers (and other info) isn't the only concern of
> the PCI standards. If your form collects a number an passes it on to
> the processor, you could also be vulnerable.
>
> On Jun 18, 2:09 pm, surtyaar <aaron.su...@gmail.com> wrote:
> > Hi Bobby,
> >
> > You might be interested in a django clone of the sample shopping cart
> > chase paymentech provided (http://store.e-xact.com/).
> >
> > You can get the code and setup instructions here :
> http://github.com/gitaaron/E-xact-django-clone
> >
> > Rgds/
> > Aaron
> >
> > On Apr 20, 10:34 am, Bobby Roberts <tchend...@gmail.com> wrote:
> >
> >
> >
> > > Hey Bill -
> >
> > > It is my understanding that as long as you do not store credit card
> > > information on your servers, PCI compliance is not an issue.  Chase,
> > > Authorize.net, Paypal, ilovechecks.com etc all have API gateways to
> > > handle the transactions via https protocol which satisfies the
> > > industry financial standards.  I'm just wondering if anyone has infact
> > > worked with the Chase API before
> >
> > > On Apr 20, 10:17 am, Bill Freeman <ke1g...@gmail.com> wrote:
> >
> > > > Beware!  There are a number of security vulnerabilities you can have
> when
> > > > handling credit card numbers.  There is something called PCI (Payment
> Card
> > > > Industry, if I'm not mistaken) compliance, the intent of which is to
> > > > try to avoid
> > > > some of the big credit card number stealing hacks that have been in
> the news
> > > > in recent years.
> >
> > > > For most sites it is better to deal with someone like Authorize.net:
>  These
> > > > services let you point your "checkout" link at them, either with a
> back channel
> > > > identified by order number (which you add to the url) to pick up the
> total, and
> > > > perhaps the item list, or a way to provide that in the get or post
> > > > with a suitable
> > > > signature.  They host a page that you get to style, so you can have,
> > > > for example,
> > > > your color scheme and logo.  They accept the credit card information,
> do the
> > > > dance with the payment processor (such as Chase Paymentech), and, if
> > > > payment is successful, send you a packet, email, or provide a
> webservice
> > > > where you can check, so that you know to "ship".  These services do
> all the
> > > > PCI compliance diligence.  You are safe because the credit card
> information
> > > > never touches your website.
> >
> > > > On Mon, Apr 19, 2010 at 10:17 AM, Bobby Roberts <tchend...@gmail.com>
> wrote:
> > > > > Has anyone out there integrated a payment module in django over to
> > > > > Chase Paymentech to process credit cards?  I'm looking for sample
> code.
> >
> > > > > --
> > > > > 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+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > > > > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
> >
> > > > --
> > > > 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 group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > > > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
> >
> > > --
> > > 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 group, send

Multi-table inheritance create child

2010-06-04 Thread Francis Gulotta
Has anyone used the patch from this ticket #7623?
http://code.djangoproject.com/ticket/7623

Does it work well? Is there a better way?

I've got the same problem the submitter has except I was hoping to extend
the auth.User class so I'd still have all of the user methods available in
the new user type.

from django.contrib.auth.models import User

class Customer(User):

#user's customer profile

phone = models.CharField(max_length=255)

referrer = models.TextField()


> def __unicode__(self):

return "%s's customer profile" % self.get_full_name()


I was hoping to make a few dfferen't profile types and have all the user
fields available in the admin without having to recreate every single one in
an admin class.

-Francis

---
Francis Gulotta
wiz...@roborooter.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-us...@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.



"view on site" erroring without sites framework

2010-04-25 Thread Francis Gulotta
I get a "DatabaseError: (1146, "Table 'project.django_site' doesn't exist")"
error when clicking on a "View on site" link. I'd rather not use the
framework as the url is changing around with development and deployment
quite frequently. I think this is the link for the ticket around this issue.

http://code.djangoproject.com/ticket/8960

<http://code.djangoproject.com/ticket/8960>The latest patch in that ticket's
comments seems to work for me. Being new to the project may I ask, is this
ticket not closed due to lack of tests or have a stumbled upon a design
disagreement?

-Francis

---
Francis Gulotta
wiz...@roborooter.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-us...@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: fastcgi path problems

2010-04-22 Thread Francis Gulotta
Just to update this problem a little more, I've opened a question on
serverfault with some additional information which I'll include here.

http://serverfault.com/questions/134863/nginx-fastcgi-problems-with-django

My manage.py fastcgi command.

> python manage.py runfcgi method=threaded host=127.0.0.1 port=8001 
> pidfile=mysite.pid minspare=4 maxspare=30 daemonize=false
>
>
And the versions
nginx version: nginx/0.7.62
Django svn trunk rev 13013

I realize that not everyone will have experience with my setup, but since
I've never had it actually work I'm not married to it. (I'm just working off
of the django advent article) I'd like to keep nginx, but I'd love to hear
about other people's setups that do work.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Wed, Apr 21, 2010 at 5:45 PM, Francis Gulotta <wiz...@roborooter.com>wrote:

> I'm deploying my first django app. I'm familiar with nginx and fastcgi's.
> Currently I get a 404 page regardless of the url and for some reason a
> double slash
> For http://www.site.com/admin/
>
> Page not found (404)
>
> Request Method: GET
>
> Request URL: http://www.site.com/admin//
>
>
>
> My urls.py from the debug output - which work in the dev server.
>
> Using the URLconf defined in ahrlty.urls, Django tried these URL patterns,
>> in this order:
>
> ^listings/
>
> ^admin/
>
> ^accounts/login/$
>
> ^accounts/logout/$
>
>
> my nginx config
>
> server {
>
>listen   80;
>
>server_name  beta.ahrlty.com;
>
>access_log  /home/ahrlty/ahrlty/logs/access.log;
>
>error_log  /home/ahrlty/ahrlty/logs/error.log;
>
>
>>location /static/ {
>
>alias  /home/ahrlty/ahrlty/ahrlty/static/;
>
>break;
>
>}
>
>
>>location /media/ {
>
>alias
>> /usr/lib/python2.6/dist-packages/django/contrib/admin/media/;
>
>break;
>
>}
>
>
>>location / {
>
>include /etc/nginx/fastcgi_params;
>
>fastcgi_pass 127.0.0.1:8001;
>
>break;
>
>}
>
> }
>
>
> and my fastcgi_params
>
> fastcgi_param  QUERY_STRING   $query_string;
>
> fastcgi_param  REQUEST_METHOD $request_method;
>
> fastcgi_param  CONTENT_TYPE   $content_type;
>
> fastcgi_param  CONTENT_LENGTH $content_length;
>
>
>> fastcgi_param  SCRIPT_NAME$fastcgi_script_name;
>
> fastcgi_param  REQUEST_URI$request_uri;
>
> fastcgi_param  DOCUMENT_URI   $document_uri;
>
> fastcgi_param  DOCUMENT_ROOT  $document_root;
>
> fastcgi_param  SERVER_PROTOCOL$server_protocol;
>
>
>> fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
>
> fastcgi_param  SERVER_SOFTWAREnginx/$nginx_version;
>
>
>> fastcgi_param  REMOTE_ADDR$remote_addr;
>
> fastcgi_param  REMOTE_PORT$remote_port;
>
> fastcgi_param  SERVER_ADDR$server_addr;
>
> fastcgi_param  SERVER_PORT    $server_port;
>
> fastcgi_param  SERVER_NAME$server_name;
>
>
>> fastcgi_param  PATH_INFO  $fastcgi_script_name;
>
>
>> # PHP only, required if PHP was built with --enable-force-cgi-redirect
>
> fastcgi_param  REDIRECT_STATUS200;
>
>
> I'm having a hard time debugging this one. Does anything jump out at
> anybody?
>
> Thanks!
>
> -Francis
>
> ---
> Francis Gulotta
> wiz...@roborooter.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-us...@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.



fastcgi path problems

2010-04-21 Thread Francis Gulotta
I'm deploying my first django app. I'm familiar with nginx and fastcgi's.
Currently I get a 404 page regardless of the url and for some reason a
double slash
For http://www.site.com/admin/

Page not found (404)

Request Method: GET

Request URL: http://www.site.com/admin//



My urls.py from the debug output - which work in the dev server.

Using the URLconf defined in ahrlty.urls, Django tried these URL patterns,
> in this order:

^listings/

^admin/

^accounts/login/$

^accounts/logout/$


my nginx config

server {

   listen   80;

   server_name  beta.ahrlty.com;

   access_log  /home/ahrlty/ahrlty/logs/access.log;

   error_log  /home/ahrlty/ahrlty/logs/error.log;


>location /static/ {

   alias  /home/ahrlty/ahrlty/ahrlty/static/;

   break;

   }


>location /media/ {

   alias
> /usr/lib/python2.6/dist-packages/django/contrib/admin/media/;

   break;

   }


>location / {

   include /etc/nginx/fastcgi_params;

   fastcgi_pass 127.0.0.1:8001;

   break;

   }

}


and my fastcgi_params

fastcgi_param  QUERY_STRING   $query_string;

fastcgi_param  REQUEST_METHOD $request_method;

fastcgi_param  CONTENT_TYPE   $content_type;

fastcgi_param  CONTENT_LENGTH $content_length;


> fastcgi_param  SCRIPT_NAME$fastcgi_script_name;

fastcgi_param  REQUEST_URI$request_uri;

fastcgi_param  DOCUMENT_URI   $document_uri;

fastcgi_param  DOCUMENT_ROOT  $document_root;

fastcgi_param  SERVER_PROTOCOL$server_protocol;


> fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;

fastcgi_param  SERVER_SOFTWAREnginx/$nginx_version;


> fastcgi_param  REMOTE_ADDR$remote_addr;

fastcgi_param  REMOTE_PORT$remote_port;

fastcgi_param  SERVER_ADDR$server_addr;

fastcgi_param  SERVER_PORT$server_port;

fastcgi_param  SERVER_NAME$server_name;


> fastcgi_param  PATH_INFO  $fastcgi_script_name;


> # PHP only, required if PHP was built with --enable-force-cgi-redirect

fastcgi_param  REDIRECT_STATUS200;


I'm having a hard time debugging this one. Does anything jump out at
anybody?

Thanks!

-Francis

---
Francis Gulotta
wiz...@roborooter.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-us...@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: Cross database join being forced

2010-04-20 Thread Francis Gulotta
Thanks! That worked like a charm.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Tue, Apr 20, 2010 at 10:06 AM, Tom Evans <tevans...@googlemail.com>wrote:

> On Tue, Apr 20, 2010 at 3:01 PM, wizard <wiz...@roborooter.com> wrote:
> > I'm not sure if this is a bug or an example of not understanding the
> > documentation.
> >
> > I have two models in two different databases. I have a router. I'm
> > trying to get a list of customers from one model (about 30 records
> > worth) and filter for records with that customer in the the other.
> >
> > Here are my models, router and view
> > http://dpaste.com/hold/185738/
> >
> > The view for reference.
> > def index(request):
> >customers =  Edi856CtlRef.objects.values_list('customer', flat =
> > True)
> >orders = Order.objects.all()
> >#later on
> >orders = orders.filter(customer__in = customers)
>
>orders = orders.filter(custom__in = list(customers))
>
> > My questions are:
> > How do I stop this attempted join?
>
> See above.
>
> > and
> > Wouldn't the orm use the router to stop this?
> >
>
> Not yet :/
>
> Cheers
>
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 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: Attribute in model not in database

2010-04-20 Thread Francis Gulotta
Since it's not a django field it wont be stored in the database and wont be
persisted between requests. It does seem to be accecpted practice however to
use variables in your classes for your own uses. Your list will be available
to all your own functions and views like you would expect.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Tue, Apr 20, 2010 at 9:55 AM, Odd <o...@her-e-me.com> wrote:

> I have this model:
>
> class MyModel(models.Model):
>name = models.CharField(max_length=100)
>myList=[]
>
> If I add values to myList, for how long will it be available there? Is
> this a bad approach?
>
> Thanks!
>
> Odd-R.
>
> --
> 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 group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 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: many to many based upon common field

2010-04-14 Thread Francis Gulotta
I think that might be a better way, but the data should never change so I'm
ok with the denormalization. How would I access the po_num in that example?

Order.edi.po_num? or Order.PoNum.po_num?

I think though I was asking the wrong question. I updated this on Stack
Overflow.

What I really need to do is join the two tables so I can do a WHERE on a
> count of the related table. I would like to filter for all Order objects
> that have 0 related EDI856 objects.


At first I was thinking of putting a 'count' field in each model and having
the update logic in the overridden save() functions. This would have the
benefit of spending the computing costs up front instead of on every search
(there are a few hundred thousand records in each table). I imagine this is
a pretty common task but from Googling it seems there's no core django way
to do it, you just have to do it yourself. Is that correct?

I did find however another way to query for the counts using annotations.
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#generating-aggregates-for-each-item-in-a-queryset

Annotations provide exactly the functionality I'm looking for so I'm going
to try them first, but something tells me adding the count field is the
right way to go.

-Francis

---
Francis Gulotta
wiz...@roborooter.com


2010/4/13 Ian Lewis <ianmle...@gmail.com>

> wizard,
>
> Would it make sense to use the intermediate table to hold the field?
>
> Using the stack overflow example:
>
> class Edi856(models.Model):
> pass
>
> class Order(models.Model):
> edi = models.ManyToManyField(Edi856, through='PoNum')
> def in_edi(self):
> '''Has the edi been processed?'''
> return self.edi.all().count()
>
> class PoNum(models.Model):
> order = models.ForeignKey(Order)
> edi = models.ForeignKey(Edi856)
> po_num = models.CharField(max_length=90, db_index=True )
>
>
> The save route also sounds ok, a pre_save signal could also work.
>
>
> On Wed, Apr 14, 2010 at 5:19 AM, wizard <wiz...@roborooter.com> wrote:
>
>> This is sort of an extension of my post from stackoverflow.
>>
>> http://stackoverflow.com/questions/2632573/how-do-i-relate-two-models-tables-in-django-based-on-non-primary-non-unique-keys
>>
>> The gist is I have two tables with a common field and I would like to
>> relate two models with a many to many based off of this field.
>>
>> As far as I can tell I have to build the relations manually. I was
>> thinking of overriding the save method in both models to query the
>> other table and rebuild the relation on save.
>>
>> Does this sound rational?
>>
>> --
>> 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 group, send email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> ===
> 株式会社ビープラウド  イアン・ルイス
> 〒150-0021
> 東京都渋谷区恵比寿西2-3-2 NSビル6階
> email: ianmle...@beproud.jp
> TEL:03-6416-9836
> FAX:03-6416-9837
> http://www.beproud.jp/
> ===
>
> --
> 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 group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 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: dumpdata doesn't seem to respect database routers

2010-04-09 Thread Francis Gulotta
Thank you Russ!

I'm glad I'm not crazy.

I must say that the django project and community have been a joy to get
acquainted with. Not only were you friendly and fast to respond but I see
you already fixed it!

Good day!
-Francis

---
Francis Gulotta
wiz...@roborooter.com


On Thu, Apr 8, 2010 at 10:42 PM, Russell Keith-Magee <freakboy3...@gmail.com
> wrote:

> On Fri, Apr 9, 2010 at 2:34 AM, wizard_2 <wiz...@roborooter.com> wrote:
> > Hi everyone,
> > Mange dumpdata seems to be ignoring my database router and failing on
> > a model thats in a different db.
> >
> > I have two databases, default (mysql db named knothedashboard) and
> > bluecherry (mssql database named dataKNOT). Here's my router. (Should
> > I be using dpaste.com?)
> >
> >def db_for_read(self, model, **hints):
> >if model._meta.db_table == u'ZZOSHPRH':
> >return 'bluecherry'
> >return None
> >
> >def db_for_write(self, model, **hints):
> >if model._meta.db_table == u'ZZOSHPRH':
> >return False
> >return None
> >
> >def allow_syncdb(self, db, model):
> >if model._meta.db_table == u'ZZOSHPRH':
> >return False
> >return None
> >
> >
> > I'm not convinced I'm using my router properly. I think I'm OK with
> > checking the db_table, but I don't know how to check the model name.
> > (I'm new to python and django.) I have allow_syncdb return false for
> > the model, and the second db for read and write - but I don't know why
> > it wouldn’t be respected during the dump.
> >
> > I tried using --database to specify only to dump the default db but it
> > still tried to dump the offending model.
> >
> > django.db.utils.DatabaseError: (1146, "Table
> > 'knothedashboard.zzoshprh' doesn't exist")
> >
> > Is this a bug or am I missing something?
>
> This looks like a bug. dumpdata isn't using routing information at all
> at present, which looks to me like an oversight on my part from the
> introduction of routers.
>
> I've opened ticket #13308 to track the problem; the fix should be
> fairly trivial.
>
> http://code.djangoproject.com/ticket/13308
>
> Thanks for the report!
>
> Yours,
> Russ Magee %-)
>
> --
> 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 group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 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.



Problem deleting object with foreignkey to self

2009-10-01 Thread Lavoie Francis
Hi,

I have a puzzle here I can't solve, if you have an idea or a starting  
point, it would be very useful and appreciated.

In order to have an easy way to link to the next object and the  
previous one (with special ordering), I add to my model two Foreignkey  
pointing to self. These keys point to the previous and next object.

When it saves a new object, it set the previous and the next object  
into these field.

But when I want to delete an object, the inheritance empty all the  
model's objects.

To go around this, I override the delete() method to set to None the  
next and previous of the foreign object.

But I have a problem when I do a batch delete.

Here is a schema
object1, object2, object3

objects1.next = object2
object1.previous = object3
object2.previous = object1
object2.next = object3
object3.previous = object2
object3.nest = object1

So if I delete object 1, I expect this result:
object2.previous = object3
object2.next = object3
object3.previous = object2
object3.next = object2

Here is the steps :

1. It set the previous.next and next.previous to another object  
instead of the one that is going to be delete()
2. Save previous and next object
3. It set the object.previous and object.next to None (no inheritance  
deletion)
4. It save the current object before being delete (no inheritance  
deletion)

The problem happens on step 2.

I need to call save two times on two different object. But the second  
save doesn't work. When delete() is called on the second object, the  
previous or next field that has been change is set to none. But when I  
check in the admin the field has been correctly saved.?!?

Is someone has an idea why it do that?
Or do you have a better way I can look at?

Thank you

Francis

Code:

def remove_product_position(self, selected_product):
 #print("remove_product_position is getting called")
 try:
 previous = selected_product.previous
 except:
 previous = None

 try:
 next = selected_product.next
 except:
 next = None

 if previous == next:
 """ in condition there is only one product """
 previous_product = selected_product.previous
 previous_product.next = selected_product.next
 previous_product.previous = selected_product.previous
 previous_product.save(reorder=False)
 else:
 next_product = selected_product.next
 next_product.previous = selected_product.previous
 next_product.save(reorder=False)

 previous_product = selected_product.previous
 previous_product.next = selected_product.next
 previous_product.save(reorder=False)

 selected_product.previous = None
 selected_product.next = None
 selected_product.save(reorder=False)
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and SSL Deployment using mod_wsgi

2009-08-31 Thread Francis

We setup a Nginx proxy in front of Apache/WSGI and got Nginx to handle
the SSL cert and simply pass on a flag to WSGI if the connection was
coming through http or https.

Next you'll want a SSL middleware, we use: 
http://www.djangosnippets.org/snippets/240/

Now its a matter of configuring which views you want SSL (follow
example in the middleware)

On Aug 28, 11:04 pm, Vitaly Babiy  wrote:
> Hey guys,
> What is the best way to deploy an app that uses mod_wsgi that some parts of
> it need to be behind SSL?
>
> Thanks,
> Vitaly Babiy

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to add an imagefield from script

2009-08-21 Thread Francis

Hi,

I have a model with an imageField that is working fine when using the
admin interface.
But I'm trying to make a script that load a bunch of image from a flat
file.

I can't make it works, the entry get created with a "valid" link to
the image as configured with the "upload_to" parameters,. But it
doesn't copy the image from the original location, so it aim to an
empty location.

for line in toImport:
image_info = line.split(";")
newImage = Image()
newImage.name = image_info[0]
imagefileToImportDir = os.path.join(os.path.dirname
(__file__), imagesDir)
imagefileToImport = os.path.join(imagefileToImportDir,
image_info[1])
try:
file = File(open(imagefile, 'r'))
newImage.file = file
newImage.file.save(image_info[1], file)
newImage.description = image_info[2]
newImage.save()
except IOError:
print("image not found! %s " % imagefile)
continue

Any idea where I go wrong?

Thank you
Francis

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: newbee questions and djapian

2009-06-28 Thread Francis

You can try to import you model in another model and register it. The
problem tho is that you need to override the save() and delete()
method to reindex the search data.

If I think of a better idea, I'll let you know.

Francis


On Jun 27, 7:13 pm, fruity <fru...@freaknet.org> wrote:
> Hi to the list,
>
> I'm new to django, I was following the installation/setup instruction
> for djapian and I don't get what is the mechanism to say "the
> contents(title content author) from the model (for example) of
> django.contrib.flatpages.
> Is that what is defined in the docs as subclassing?
>
> In the examples on the djapian docs the models to search into seems to
> be in the same app, so my question would more be: how do I tell to my
> possible search application to use the content of the fields in the
> models of different apps in the same project?
>
> Sorry if I might sound confuse, I am. Thanks in advance
>
> Salut'
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Problem displaying application data

2009-06-18 Thread Francis

Hi,

In my project, the admin interface is not able to display tables
content of one application. The other application table listing works
fine. I did change the SITE_ID for some test, but now I'm screw an I
can't find any solution to make it works again.

Is there someone with any idea to solve my problem?

Thank you

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem to deploy on production server

2009-06-16 Thread Francis

Is there someone who have more that one instance running on his server
who would like to share how to do it correctly?

And, how can I make my tables data reappear in the admin interface?

Thank you

Francis


On Jun 15, 2:20 pm, Francis <lav.fran...@gmail.com> wrote:
> Also, if I set the SITE_ID to be equal in both config, When I save a
> model entry, I got an error from django:
> ERROR:  canceling statement due to statement timeout
>
> Francis
>
> On Jun 15, 10:40 am, Thomas Guettler <h...@tbz-pariv.de> wrote:
>
>
>
> > Hi,
>
> > do you use the cache module? Be sure, that both projects use
> > different ones.
>
> > Maybe you need to set SESSION_COOKIE_NAME if the domain name is the
> > same.
>
> > Do you use one database or two? (Is settings.DATABASE_NAME the same?)
>
> >   Thomas
>
> > Francis schrieb:
>
> > > Hi,
>
> > > I have completed one web site and I am now ready to deploy it in
> > > production, but I have serious issues where I can't find any
> > > information/clue on the django web site, in the book or on IRC. I have
> > > no idea how I can solve my problem
>
> > > What I want to achieve is the following:
> > > 1 site under http without admin acces
> > > 1 site under https + admin acces
>
> > > My config
> > > python 2.5
> > > django 1.0.2
> > > postgresql
> > > mod_wsgi (i'm using it because djapian doesn't work with mod_python)
>
> > > So what I did was to create two mod_wsgi on two project repositories.
> > > One configured with the admin apps installed (https) an one without
> > > (http).
> > > Results:
> > > When I save an entry to a model, it saves it and redirects to the non
> > > secure http service instead of the secure one, throwing a 404.
>
> > > So I tried to enable the admin apps on both services.
> > > Results:
> > > Now I get a proxy error on the https service and a timeout on the http
> > > service.
> > > Some tables show no result on the http service but show them all on
> > > the other one.
>
> > > If I shut down the https service, some entries can be saved and others
> > > don't.
> > > The same tables that wrongly display nothing are still empty.
>
> > > I tried to give each site a different site_id, but it doesn't help.
>
> > > Help would be very much appreciated,
>
> > > Thank you
>
> > > Francis
>
> > --
> > Thomas Guettler,http://www.thomas-guettler.de/
> > E-Mail: guettli (*) thomas-guettler + de
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem to deploy on production server

2009-06-15 Thread Francis

Also, if I set the SITE_ID to be equal in both config, When I save a
model entry, I got an error from django:
ERROR:  canceling statement due to statement timeout

Francis

On Jun 15, 10:40 am, Thomas Guettler <h...@tbz-pariv.de> wrote:
> Hi,
>
> do you use the cache module? Be sure, that both projects use
> different ones.
>
> Maybe you need to set SESSION_COOKIE_NAME if the domain name is the
> same.
>
> Do you use one database or two? (Is settings.DATABASE_NAME the same?)
>
>   Thomas
>
> Francis schrieb:
>
>
>
>
>
> > Hi,
>
> > I have completed one web site and I am now ready to deploy it in
> > production, but I have serious issues where I can't find any
> > information/clue on the django web site, in the book or on IRC. I have
> > no idea how I can solve my problem
>
> > What I want to achieve is the following:
> > 1 site under http without admin acces
> > 1 site under https + admin acces
>
> > My config
> > python 2.5
> > django 1.0.2
> > postgresql
> > mod_wsgi (i'm using it because djapian doesn't work with mod_python)
>
> > So what I did was to create two mod_wsgi on two project repositories.
> > One configured with the admin apps installed (https) an one without
> > (http).
> > Results:
> > When I save an entry to a model, it saves it and redirects to the non
> > secure http service instead of the secure one, throwing a 404.
>
> > So I tried to enable the admin apps on both services.
> > Results:
> > Now I get a proxy error on the https service and a timeout on the http
> > service.
> > Some tables show no result on the http service but show them all on
> > the other one.
>
> > If I shut down the https service, some entries can be saved and others
> > don't.
> > The same tables that wrongly display nothing are still empty.
>
> > I tried to give each site a different site_id, but it doesn't help.
>
> > Help would be very much appreciated,
>
> > Thank you
>
> > Francis
>
> --
> Thomas Guettler,http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem to deploy on production server

2009-06-15 Thread Francis

Cache is planned for the non secure site, but not configured at this
point.

SESSION_COOKIE_NAME makes no diffrence.
When I log to https://mysite.com/myadmin
it redirect to http after succesful login, I need to manually enter
https.

Saving an entry generate a 502 BAD GATEWAY - The proxy server received
an invalid response from an upstream server.

I have only one database. DATABASE_NAME is the same.

Francis


On Jun 15, 10:40 am, Thomas Guettler <h...@tbz-pariv.de> wrote:
> Hi,
>
> do you use the cache module? Be sure, that both projects use
> different ones.
>
> Maybe you need to set SESSION_COOKIE_NAME if the domain name is the
> same.
>
> Do you use one database or two? (Is settings.DATABASE_NAME the same?)
>
>   Thomas
>
> Francis schrieb:
>
>
>
>
>
> > Hi,
>
> > I have completed one web site and I am now ready to deploy it in
> > production, but I have serious issues where I can't find any
> > information/clue on the django web site, in the book or on IRC. I have
> > no idea how I can solve my problem
>
> > What I want to achieve is the following:
> > 1 site under http without admin acces
> > 1 site under https + admin acces
>
> > My config
> > python 2.5
> > django 1.0.2
> > postgresql
> > mod_wsgi (i'm using it because djapian doesn't work with mod_python)
>
> > So what I did was to create two mod_wsgi on two project repositories.
> > One configured with the admin apps installed (https) an one without
> > (http).
> > Results:
> > When I save an entry to a model, it saves it and redirects to the non
> > secure http service instead of the secure one, throwing a 404.
>
> > So I tried to enable the admin apps on both services.
> > Results:
> > Now I get a proxy error on the https service and a timeout on the http
> > service.
> > Some tables show no result on the http service but show them all on
> > the other one.
>
> > If I shut down the https service, some entries can be saved and others
> > don't.
> > The same tables that wrongly display nothing are still empty.
>
> > I tried to give each site a different site_id, but it doesn't help.
>
> > Help would be very much appreciated,
>
> > Thank you
>
> > Francis
>
> --
> Thomas Guettler,http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Problem to deploy on production server

2009-06-15 Thread Francis

Hi,

I have completed one web site and I am now ready to deploy it in
production, but I have serious issues where I can't find any
information/clue on the django web site, in the book or on IRC. I have
no idea how I can solve my problem

What I want to achieve is the following:
1 site under http without admin acces
1 site under https + admin acces

My config
python 2.5
django 1.0.2
postgresql
mod_wsgi (i'm using it because djapian doesn't work with mod_python)

So what I did was to create two mod_wsgi on two project repositories.
One configured with the admin apps installed (https) an one without
(http).
Results:
When I save an entry to a model, it saves it and redirects to the non
secure http service instead of the secure one, throwing a 404.

So I tried to enable the admin apps on both services.
Results:
Now I get a proxy error on the https service and a timeout on the http
service.
Some tables show no result on the http service but show them all on
the other one.

If I shut down the https service, some entries can be saved and others
don't.
The same tables that wrongly display nothing are still empty.

I tried to give each site a different site_id, but it doesn't help.

Help would be very much appreciated,

Thank you

Francis

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



admin access in https redirect in http

2009-06-12 Thread Francis

Hi folks,

I have set to instance of my server, one serving in http with admin
disable and another one accessible throu https with admin enable.

But this config cause me some trouble, each time I save something in
the administration interface, it redirect me to http instead of https.
(which throw 404)

Is there something I can set to tell the admin site to redirect to
https?

Thank you

Francis

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: how to disable recursive delete in admin

2009-06-11 Thread Francis

And it's what puzzle me.

That's my models :

class Image(models.Model):
name = models.CharField(max_length=50)
file = models.FileField(upload_to=PRODUCT_IMAGES)

class ProductPage(Page):
product_description = models.TextField()
product_id = models.IntegerField()
original_image = models.ImageField(upload_to=PRODUCT_IMAGES)
category = models.ForeignKey(Category)
similar_products = models.ManyToManyField('self',
symmetrical=True, null=True, blank=True)
images = models.ManyToManyField(Image, blank=True)
videos = models.ManyToManyField(Video, blank=True)
(it inherit from page, for menu management - no link to image)

If a link an image in ProductPage and then delete the image later, the
admin site will tell me that it would also delete the ProductPage. I
tried it, and it got deleted.

I'm using the svn version - uptodate


On Jun 11, 11:29 am, Jashugan <jashu...@gmail.com> wrote:
> On Jun 11, 8:08 am, Francis <lav.fran...@gmail.com> wrote:
>
> > Is it possible to disable recursive delete?
>
> > Because I have some pages models that has a m2m relationship with an
> > image/video table. But if I delete an image, I don't want it to also
> > delete the page.
>
> I don't think recursive delete is enabled in m2m relationships, just
> in foreign key relationships. In m2m relationships, the only thing
> that should be deleted is the records in the join table, but not in
> the target or source tables.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



how to disable recursive delete in admin

2009-06-11 Thread Francis

Hi folks,

I have a question related to deletion in the admin interface.

Is it possible to disable recursive delete?

Because I have some pages models that has a m2m relationship with an
image/video table. But if I delete an image, I don't want it to also
delete the page.

thank you

Francis

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: how to delete table from database?

2009-05-23 Thread Francis

Also, There is a plugin for firefox that enable you to manage sqlite
database with a GUI interface.
https://addons.mozilla.org/en-US/firefox/addon/5817

I find it quite handy

On May 23, 7:01 am, ashish tiwari  wrote:
> i create the tables in models.py
>
> i have the problem to delete table from databasei m using SQLITE3
> any one give me the code to how delete the table from database...
>
> thanks
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Prolem dealing with json post data

2009-04-26 Thread Francis

You're perfectly right.

raw_post_data did the trick.

Thank you



On Apr 25, 6:31 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Thu, 2009-04-23 at 21:23 -0700, Francis wrote:
> > Hi, I'm using dojo (also tried with jquery) to sendjsondata to my
> > django application.
>
> > But I can't get it working properly.
>
> The trick to understanding is to think how are you sending the data? In
> particular, what MIME type is being used? Django's HttpRequest.POST
> variable is only set up to handle HTML form encoded data -- either
> application/x-www-form-encoded or multipart/form-data is there are file
> uploaded involved. I doubt very much that theJSONdata is being sent
> with those encodings. Which means that your assumption to use
> request.POST isn't valid.
>
> Instead, pass the submitted data -- obtained via request.raw_post_data
> -- to aJSON-> Python converter (such as simplejson.decodestring()) and
> then pass that dictionary into the form.
>
> Regards,
> Malcolm
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Prolem dealing with json post data

2009-04-23 Thread Francis

Hi, I'm using dojo (also tried with jquery) to send json data to my
django application.

But I can't get it working properly.

The problem is that my json data is manage as a dict key with an empty
string as value.

json data :
{"Home":{"Id":"1","Name":"home"},"Home2":{"Id":"3","Name":"Home2"}}
django request post :


The only way I found is to convert them into a python dictionnary is
to do this :
"""
if request.method == 'POST':
postlist = request.POST.keys()[0]
json_data = json.JSONDecoder().decode(post)
"""

You can note that I need to take the keys()[0] to access the data.
It doesn't look right to me.

Do someone knows what I'm doing wrong ?

Thank you

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: FileField - Forms - upload to not available

2009-03-05 Thread Francis

Did you found any solution?

Because I have the same problem, but on opposite side (works on mac
but not on linux).

I think that you need a trailing "/" to your upload_to path though.

Francis


On Mar 1, 8:21 pm, tom <thomas.st...@gmail.com> wrote:
> here is some more information, maybe that helps. These are just
> different lines of code from different files, but they actually
> describe what's happening:
>
> settings.py
> MEDIA_ROOT = '/Library/WebServer/Documents/media/indiebreed/'
>
> models.py
> file = models.FileField(upload_to="tmp/tracks", max_length = 1000)
>
> json_views.py
>     if request.method == 'POST':
>         form = TrackForm(request.POST, request.FILES)
>         if form.is_valid():
>             new_track = form.save(commit = False)
>             print new_track.file.path
>
> error:
> IOError at /music/tracks/testupload/
> [Errno 2] No such file or directory: u'/Library/WebServer/Documents/
> media/indiebreed/03 Magical Box.mp3'
>
> actually the path should be like this:
> /Library/WebServer/Documents/media/indiebreed/tmp/tracks/03 Magical
> Box.mp3
>
> any ideas?
> ah, i am on a mac and it works under linux
>
> many thanks.
> tom
>
> Path: .
> URL:http://code.djangoproject.com/svn/django/trunk
> Repository Root:http://code.djangoproject.com/svn
> Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
> Revision: 9912
> Node Kind: directory
> Schedule: normal
> Last Changed Author: russellm
> Last Changed Rev: 9911
> Last Changed Date: 2009-02-27 14:14:59 +0100 (Fr, 27 Feb 2009)
> On 28 Feb., 01:47, tom <thomas.st...@gmail.com> wrote:
>
> > Hi,
>
> > I am somehow confused. I am using this in a model:
> > file = models.FileField(upload_to="tmp/tracks/", max_length = 1000)
>
> > and than I am doing this in a form:
> > new_track = form.save(commit = False)
>
> > after that I want to access the file to do some stuff with it, like
> > print new_track.file.path
>
> > when I do this, the path to the file is without the extra path from
> > "upload_to" in the model. how can I access the full path to the file?
> > Or, where will the file be saved to, because it also does not exist
> > within the "upload_to" dir.
>
> > Maybe it would be a solution to access the temp file, does someone
> > know how to access the path string?
>
> > regards, 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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: mptt usage

2009-02-16 Thread Francis

Do you have any suggestion for a better alternative?



On Feb 3, 3:58 pm, adelevie  wrote:
> mptta is slow as hell
>
> On Feb 3, 4:50 am, vicalloy  wrote:
>
> > I thinkmptthave good doc.http://code.google.com/p/django-mptt/
> >mpttjust a set of function to build tree efficient.
>
> > 2009/2/3 Muslu Yüksektepe :
>
> > > i did try it too but i deleted.
>
> > > 2009/2/3 new_user 
>
> > >> Hi, everyone.
>
> > >> Recently I've installedmpttapp on my project. But I cannot find out
> > >> how to use it. Should I use it's functions manually, or could I use
> > >> admin interface to order my models in tree structure?
>
> > >> Thx in advance.
>
>
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



m2m relationship

2008-12-09 Thread Lavoie Francis

Hi,

I have a question regarding m2m relationship.

I've created I table that contain product and has a manytomany  
relationship with an other table that stores images. I would like to  
add the image in the product admin form. I don't want to see all the  
images in the product table, but just those that belongs to the  
current product item. Is that possible?

Thank you

Francis


--~--~-~--~~~---~--~~
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: What do you use for design interface / mockup

2008-10-23 Thread Francis

I prefer not to use software like photoshop or gimp, mainly because
I'm no graphic designer.

What I want to do is to design layout, forms and presentation. To find
the most 'user friendly' interface and to have a clear picture of my
application before writing any code. Then the graphic artist will make
it aesthetically nice.

I found fireworks from adobe, but it looks like more gear towards
designer. It's 300$ no demo.
Pencil for firefox is buggy on mac and it has a very limited set of
widgets. (but it shows much potential)
Omnigraffle looks nice (tried the demo), but it's 200$ and Mac only.

In the end, if Omnigraffle worth the price, I'll go for it.

Thank you for your suggestion,

Francis


On Oct 23, 7:24 pm, "Peter Herndon" <[EMAIL PROTECTED]> wrote:
> At the risk of being flamed, I'd say that nothing is better than OmniGraffle.
>
> That aside, both Gimp and Dia are cross-platform and very reasonable
> choices.  They may not fit the Mac gui, but they work well enough if
> cross-platform is a higher priority than best-of-breed.  You can get
> the job done with them.
>
> If cross-platform is not your highest priority, I'd pick OmniGraffle
> and Acorn, with Photoshop and such as the big guns, as required.
> Though, there's a lot to be said for wireframing in HTML, and for
> paper prototypes.
>
> ---Peter
>
> On 10/23/08, Gerard Petersen <[EMAIL PROTECTED]> wrote:
>
>
>
> > Francis,
>
> > I'm not a designer but I start my global layout on paper or in my head and
> > then it's (x)html and CSS. The first thing that comes to mind on doing this
> > electronically is photoshop (and siblings ... CS3?). And the Gimp but that
> > would not be a good choice on OSX (gui handling wise).
>
> > Regards,
>
> > Gerard.
>
> > Francis wrote:
> >> Hi,
>
> >> What do you use for design interface / mockup?
>
> >> I made some search, omnigraph seems pretty popular. But I often switch
> >> between linux and Mac and omnigraffle isn't cross platform.
>
> >> Is there any tools out there that work on Mac OS X and Linux? (or
> >> something better than omnigraffle)
>
> >> Thank you
>
> > --
> > urls = { 'fun':  'www.zonderbroodje.nl',  'tech':  'www.gp-net.nl'}
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



What do you use for design interface / mockup

2008-10-23 Thread Francis

Hi,

What do you use for design interface / mockup?

I made some search, omnigraph seems pretty popular. But I often switch
between linux and Mac and omnigraffle isn't cross platform.

Is there any tools out there that work on Mac OS X and Linux? (or
something better than omnigraffle)

Thank you



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to save/link/rename thumbnail in model

2008-10-20 Thread Francis

Hi,

I'm trying to save a thumbnail image when I save a picture in one of
my models. But I have three problems.

1. I can successfully create the thumbnail image, but I cannot link it
in my database.

2. Is there a better way to name the thumbnail image?

3. When the save function is called, the image is already save to disk
using the name of the original. Is it posible to use the self.name as
the image name?

Here is my model class :

class ProductImage(models.Model):
name = models.CharField(max_length=50)
file = models.ImageField(upload_to="static/uploadto/prod_images")
file_thumbnail = models.ImageField(upload_to="static/uploadto/
prod_images", blank=True, null=True)
file_size = models.IntegerField(blank=True, null=True)
keyword = models.CharField(max_length=50, blank=True, null=True)
product = models.ForeignKey(Product)

def __unicode__(self):
return self.name

def save(self, size=(60, 20)):
if self.file:
filename = self.file.path
self.file_size = int(os.path.getsize(filename))
image = Image.open(filename)
image.thumbnail(size)
image.save(settings.MEDIA_ROOT + "/static/uploadto/
prod_images/" + str(self.file.name.split('.')[0].split("/")[-1]) +
str("_tn.jpg"), 'JPEG')
self.file_thumbnail = image
super(ProductImage, self).save()


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



PIL with python 2.5 on Leopard - [Solution]

2008-10-20 Thread Francis

I had trouble installing PIL on my Mac with 10.5 Leopard.

I always got an : "Upload a valid image. The file you uploaded was
either not an image
or a corrupted image."

I searched to groups for answer but it seems that others were also
having this problem.

For those who are still looking for a solution, I found it while I was
installing erlang on my system.

You just have to follow these procedures, the only thing I changed,
was that I used the latest labrairies  and the rc1 for libpng.

http://www.libgd.org/DOC_Compiling_GD_on_Mac_OS_X_HOWTO

Good luck.

Francis

--~--~-~--~~~---~--~~
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: bennett p17

2008-08-19 Thread Francis

When you made the modification on page 15. Did you edit the entry with
exemple.com or you have added a new one?

Because the page your create with flatpage look up the SITE_ID in your
settings.py and the id of the entry in the sites models.



On Aug 19, 11:03 am, joe <[EMAIL PROTECTED]> wrote:
> cannot reproduce TemplateDoesNotExist error on page 17? i found
> something* that tells you to change your settings.py SITE_ID = 2
> made it work fine.
> nope - i have no idea what SITE_ID = 2 means either.
>
> * ref: '[EMAIL PROTECTED]' from django users group july-
> ish 2007
--~--~-~--~~~---~--~~
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: django-admin.py not working on OS X 10.5

2008-05-08 Thread Francis

It works without problem here.

1. I copy my trunk into the default python site-package /Library/
Python/2.5/site-packages/django

Normally I use /usr/bin, since local/bin doens't exist on Leopard
(exept if you are using something like fink or macport)
But I tried it to see if it works.
2. I create the directory : sudo mkdir /usr/local/bin
3. then symlink : sudo ln -sf /Library/Python/2.5/site-packages/django/
bin/django-admin.py /usr/local/bin/django-admin.py

it works. /usr/local/bin is already in your path.

Francis

On May 7, 6:46 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I'm setting up a dev environment on a co-worker's Mac running 10.5.2
>
> I have Django cehcked out from trunk, and symlinked into Python 2.5.2.
> I can successfully import Django from within a Python terminal
> session.
>
> I have django-admin.py symlinked from the trunk checkout to /usr/local/
> bin.
>
> When I try to execute: django-admin.py startproject foo, I get an
> error saying:
> django-admin.py: command not found
>
> I have added /usr/local/bin to my .bash_profile, resourced, and
> restarted, but still no dice. Anyone have any ideas on what I did
> wrong? I've doen this many times, just not on 10.5.
>
> TIA,
> Brandon
--~--~-~--~~~---~--~~
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: IDE

2008-03-06 Thread Francis

coda looks very nice.

I'm evaluating textmate and openkomodo before paying for something.

I've used eclipse+pydev before, but everything seems to be made more
complex than necessary(xyz steps for modules). Many web module are
half-baked.

Right now I am quite satisfied with textmate, I'll test coda for sure.



On Mar 6, 8:06 am, "Peter Herndon" <[EMAIL PROTECTED]> wrote:
> I use vim a lot for, as Michael says, quick editing tasks.  For longer
> coding sessions, I use Coda (http://www.panic.com/coda/).  It's
> payware, and it's OS X only, but it is so easy and amazingly
> productive.  You have a terminal session, WebKit-based browser, (S)FTP
> client, and a really decent text editor all in one program.  In
> addition, if you are doing pair-programming, the editor supports live
> shared editing sessions -- you and your coding partner can both be
> working on the same file at the same time.  On top of that, there's a
> visual CSS manipulator, though I don't find it of much use, and some
> reference material linked in, though accessing it requires Internet
> access, and the material is not the best.
>
> There are some things Coda lacks that I'd love to see, including
> either the ability to handle version control integration, or some
> means of running outboard scripts/plug-ins, but overall it makes
> developing Django apps a breeze.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Problem with EmailMultiAlternatives and attachments

2008-03-03 Thread Francis

Hi,

I tried to use the EmailMultiAlternatives to send an email in html and
a text. I also want to include a file to this email.

But the later seems to erase my html content.

Here is my code :

msg = EmailMultiAlternatives(subject, html2text(html_content),
list(email_from), list(email_to),
attachments=((request.session['customer']+".txt.blowfish",
request.session["customer"].content),))

msg.attach_alternative(html_content, "text/html")

msg.send()

I use the latest svn revision
I also tried using msg.attact() instead of attachments, same result!

The alternative text content is sent, but the html one is not. It only
show the file.

Any clue would be much appreciated,

Francis
--~--~-~--~~~---~--~~
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: Xcode as Django IDE

2008-02-13 Thread Francis

how do you get syntax completion?

I can't get it work with textmate. And it's one reason I'm sticking
with eclipse (pydev).


On 13 fév, 17:18, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> Textmate works great for me. I use GetBundle
> (http://projects.validcode.net/getbundle) to get the Django bundle
> which does syntax completion and highlighting for Django-specific
> Python files and Django template HTML.
>
> More info here:http://code.djangoproject.com/wiki/TextMate
>
> /alex
>
> On Feb 13, 2008 3:57 PM, zombat <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi Djangonauts.
>
> > I was looking around for a good IDE for the Mac and have tried simple
> > text editors like Smultron (http://smultron.sourceforge.net/) and full
> > featured IDEs like Eclipse with PyDev but I am still not really
> > satisfied.
> > Simple text editors lack features like code completition or file tree
> > navigation and Eclipse on the other hand is a bit slow on the Mac. So
> > what do you use? Is it possible or reasonable to use Xcode (the
> > "native" Mac IDE)?
>
> > Thomas
--~--~-~--~~~---~--~~
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: Web Development with Django: Windows vs Linux/Mac OS X

2008-02-07 Thread Francis

Hi,

I use to develop on all these platform. I'm somehow surprise that you
find font rendering superb in windows, I'm always annoyed at how ugly
they look in general compared to their Mac and Linux (new Distro)
counterpart.

I switch sometime from Linux to OS X for my development needs. I use
windows mostly at work. The things I hate about windows is how the
system strip down, really bad CLI, no interpreted language,
momoculture of Microsoft ecosystem. OS X and Linux are superb
powerhouse, even if they are different like Christian said.

The main reason I stay with and prefer OS X, is simply because the
system works the closest of how I think. It's a productivity booster,
expose + the dock + big icon + the finder. I find my way more
efficiently and faster than on windows. I also manage multi task far
more efficiently.

Plus, one thing that keep me on OS X, is that I also run my own
business and time is precious. With OS X I never have to manage things
that aren't need to be manage. To the contrary of Linux (I used mainly
Ubuntu and fedora) where there's is always something that need your
attention. The problem is I like to play with it and I easily waist
haft a day compiling/testing/submitting bug/ application that sometime
will work and other time will not work.

Also, I like Apple's hardware, small, noiseless, noplastik finish.

On the server side, I use mainly linux, but also freebsd and solaris.
I never had problem transferring my OS X stuff to one of these OSes.
note: I never tried django on freebsd or solaris but for different
project.

But, if you like your XP system, maybe you should stick to it.

Francis



On Feb 7, 3:49 am, Aleandro <[EMAIL PROTECTED]> wrote:
> Hi, I'm a Windows XP longtime user but I have also Ubuntu Linux 7.10
> on my dual-boot computer. I've just discovered Python and Django and I
> have to decide what os to use for web development with Django.
>
> In fact, while I use Ubuntu Linux on my production server, I'm really
> satisfied with my Windows web development environment:
>
> - gVim, TortoiseSVN, the command prompt and all major browsers at my
> fingertips (IE, Firefox, Opera and Safari);
> - Python, Django and PostgreSQL/MySQL installed in just a few simple
> steps;
> - Adobe Photoshop;
> - superb font rendering with cleartype and no wasted time installing
> new hardware.
>
> Considering that the latest trend in web development is to use UNIX
> based OSes (Linux or Mac OS X) also for the development side, I have a
> simple and direct question for you: what are the tangible
> disadvantages of Django web development on Windows compared with a
> UNIX based OS?
>
> Thanks
> Aleandro
--~--~-~--~~~---~--~~
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: Looking for a security/encryption programmer for small contract

2008-02-05 Thread Francis

Lets say I use pycrypto with AES, like this.

obj = AES.new('mykey', AES.MODE_CFB)
mytext = "Big secret"
cipher = obj.encrypt(mytext)

Can I use the same key or I have to change it everytime?
Would this be sufficiently secure?

Francis


On 23 jan, 11:25, Francis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm building a web application for one of my clients with django. But
> I need to do something that I have never did before and I am somehow
> really short on time to learn it.
>
> So I am looking for someone who has experience withencryption/
> security in python. It is to be incorporated into my django app.
>
> What's need to be done :
> - Take a message, encrypt it using a secure method (should be better
> or equal than OTP), return the encrypted message.
>
> What should be considered:
> - The user who receives the encrypted message, should be able to
> uncrypt it into his Windows workstation. I'm looking for a existing
> software that can do the job.
>
> If you're are up to the task and want to make extra money just let me
> know.
> What I want from you is :
> Your experience in the matter at hand
> If you want to make a package (fixe price) just let me know when you
> can finish it and your price.
> If you want to be paid per hour, give me a time estimate and your
> hourly rate. Plus when you can finish it.
>
> Thank you
>
> Francis
--~--~-~--~~~---~--~~
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: Looking for a security/encryption programmer for small contract

2008-01-31 Thread Francis

Hi,

Thank you for all the information, it seems like you think it easy to
do, as everyone accept to help me for free :-)

The solution used before was to send to encrypted string in clear in a
email. It used a perl impletation of the one-time pad.

Emanuele, your said : As for safety, nothing is safer than OTP, but
are we sure that your customer
is able to go to great lengths to distribute long key streams over a
perfectly safe channel to the sales representatives?

Isn't the encrypted string secure?

The method to send the string can't be secure. It is sent by email.
The point is to encrypt it on the server, send it over an unsecure
network. Then, when the sales rep. receive it, he will decrypt it.

I  tried tonight the gnupg. It works fine on my mac with thunderbird,
but my client use outlook (gpg plugin is quite old), so I think I'll
have to try with python-crypto. But pycrypto need to be compiled, I
don't know if I can host it where I want. I'll check this out.

Thank you

Francis


On 23 jan, 11:25, Francis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm building a web application for one of my clients with django. But
> I need to do something that I have never did before and I am somehow
> really short on time to learn it.
>
> So I am looking for someone who has experience withencryption/
> security in python. It is to be incorporated into my django app.
>
> What's need to be done :
> - Take a message, encrypt it using a secure method (should be better
> or equal than OTP), return the encrypted message.
>
> What should be considered:
> - The user who receives the encrypted message, should be able to
> uncrypt it into his Windows workstation. I'm looking for a existing
> software that can do the job.
>
> If you're are up to the task and want to make extra money just let me
> know.
> What I want from you is :
> Your experience in the matter at hand
> If you want to make a package (fixe price) just let me know when you
> can finish it and your price.
> If you want to be paid per hour, give me a time estimate and your
> hourly rate. Plus when you can finish it.
>
> Thank you
>
> Francis
--~--~-~--~~~---~--~~
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: Looking for a security/encryption programmer for small contract

2008-01-23 Thread Francis

Only one person (or very limited group) will receive the encrypted
message by email. It will hold customer information need by the sale
rep. So no user will have to deal with the encrypted data.

Server receive customer info -> encrypt critical info -> sent email to
sales rep.
sales rep. decrypt the information.

I never work with that stuff before, except key for ssh login.
So I'm looking for something secure, that will be possible to the sale
rep to uncrypt de message/part of the message with a gui front end.

Thank you for you help


On Jan 23, 12:57 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> >>> - Take a message, encrypt it using a secure method (should be better
> >>> or equal than OTP), return the encrypted message.
>
> >> parties, Blowfish and DES3 are popular choices and likely to be
>
> > just a point of fact: neither of these are >= to OTP.
>
> They're all strong cryptographically, but all shared-secret
> solutions suffer the same fate of having to figure out how to
> securely share your key/OTP if you aren't both the sender and the
> recipient.
>
> I do like OTP for logins over insecure connections if absolutely
> needed, but otherwise, I don't see non-public-key as a great win :)
>
>
>
> > also, on a side note, i wouldn't use 3DES for any new implementations.
> [snip]
> > i'd highly recommend AES instead.
>
> Good point...I remember hearing something about that a while
> back, but I tend to use public-key for just about everything so
> it didn't register in my active memory.
>
> -tim
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Looking for a security/encryption programmer for small contract

2008-01-23 Thread Francis

Hi,

I'm building a web application for one of my clients with django. But
I need to do something that I have never did before and I am somehow
really short on time to learn it.

So I am looking for someone who has experience with encryption/
security in python. It is to be incorporated into my django app.

What's need to be done :
- Take a message, encrypt it using a secure method (should be better
or equal than OTP), return the encrypted message.

What should be considered:
- The user who receives the encrypted message, should be able to
uncrypt it into his Windows workstation. I'm looking for a existing
software that can do the job.

If you're are up to the task and want to make extra money just let me
know.
What I want from you is :
Your experience in the matter at hand
If you want to make a package (fixe price) just let me know when you
can finish it and your price.
If you want to be paid per hour, give me a time estimate and your
hourly rate. Plus when you can finish it.

Thank you

Francis


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to remove email heading "Content-Type"?

2008-01-22 Thread Francis

Hi,

I'm using the attach_alternative command to send html emails.

But when I use this command, I always get a "Content-Type: text/html;
charset=utf-8" heading in all my emails.

Is it possible to get rid of it?

Thank you

Francis

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Rendering text and html message from template

2008-01-15 Thread Francis

Is it possible to render a text version of a html template with
render_to_response
I would like to use only one template, and tha the text version just
discard all the html tag

like :

text_content = render_to_response('email.html', { "info":
oinfo.info, }, mimetype="text/text")
html_content = render_to_response('emai.html', { "info":
oinfo.info, }, mimetype="application/html")
msg = EmailMultiAlternatives(subject, text_content, email_from,
email_to)
msg.attach_alternative(html_content, "text/html")
msg.send()


Thank you

--~--~-~--~~~---~--~~
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: learning django and python

2007-11-14 Thread Francis

I think the best way now is to try and post specific question when you
encounter deadends.

I run django on a mac, but if you need help you better start by
yourself (and you will learn more).
It is easier if you use sqlite and to learn, sqlite is more than
enough.

So follow the instruction on the doc page and install the svn version.
If you're using Tiger you need to install svn first, if you're running
Leopard, svn is builtin.

svn : http://subversion.tigris.org/project_packages.html
install : http://www.djangoproject.com/documentation/install/

Have fun!

Francis


On Nov 14, 10:11 am, sebey <[EMAIL PROTECTED]> wrote:
> ok ok thanks love some more resurces
>
> On Nov 14, 2:10 pm, cjl <[EMAIL PROTECTED]> wrote:
>
> > Buy me a mac and I'd be happy to create an OSX version of Instant
> >Djangofor you!
>
> > Just kidding, but there are many websites explainingDjango
> > installation on OSX. You can still follow along with my tutorial after
> > you have installed it.
>
> > Sorry I can't be of more help. I actually tried a 'hackintosh'
> > installation of Tiger under vmware so I could create an OSX version,
> > but it ran so slow it was unusable.
>
> > -CJL


--~--~-~--~~~---~--~~
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: Dictionnary problem trough session

2007-11-06 Thread Francis Lavoie
Ok, I found my problem.

Because I was storing a object into the session dictionnary, when I called
method to add, modify or delete object's value, the session didn't get
saved.



2007/10/31, Francis Lavoie <[EMAIL PROTECTED]>:
>
> But Isn't the same thing as saving the object in the
> request["session"]["myobject"] ?.
>
> The dictionnary is not being erase entirely, but it is the associate value
> that are reset to empty string. I though at first that I might trigger the
> __init__ , but when I trace it, the object is not being reinitialyse.
>
> Is it possible that the object is only keep in memory because I use a
> third level method to assign the values?
>
> class object1:
>def __init__(self):
>self.key1 = object2()
>
> class object2:
>def do2(self, v):
>self.key2 = { "value": v }
>
> In views.py I do :
>
> myobj = object1()
> myobj.key1.do2("value")
>
>
>
> 2007/10/30, Malcolm Tredinnick <[EMAIL PROTECTED]>:
> >
> >
> > On Tue, 2007-10-30 at 16:40 -0400, Francis Lavoie wrote:
> > > Hi,
> > >
> > >
> > > I have a shopping_cart class that I use with a session to store orders
> >
> > > information.
> > >
> > >
> > > In this shopping cart, I have other object like customer contact.
> > >
> > >
> > > class CustomerContact:
> > > def __init__(self):
> > > self.address = {}
> > >
> > > def add_address(self, add_dict, Company, Contact, Address, City,
> > > State, Zip, Country, Phone, Fax, Email):
> > > self.address[add_dict] = { "Company" : Company,  "Contact" :
> > > Contact,
> > > "Address" :
> > > Address, "City" : City,
> > > "State" :
> > > State,  "Zip" : Zip,
> > > "Country" :
> > > Country, "Phone" : Phone,
> > > "Fax" :
> > > Fax, "Email" : Email }
> > >
> > >
> > > it is quite basic.
> > >
> > >
> > > In my shopping cart I assign a variable to this object in __init__.
> > >
> > >
> > > Step 1.  User fill the address required fields, then commit, it will
> > > set three addresses [add_dict] for billing, shipping, other
> > > To set the address I
> > > use : 
> > > request.session['shopping_cart'].customer_contact.add_address("billing",
> > alltheinfo)
> > >
> > >
> > > Step 2. It display a payment page which also shows the filled address.
> > > Address are display correctly
> > >
> > >
> > > Step 3. Then it display a validation page. My dictionnary is somehow
> > > reset, the keys are still there but nothing is assign to it.
> > >
> > >
> > >
> > >
> > > Is my logic erroneous? I just dont understand why my dictionnary get
> > > reset between step2 and step3.
> >
> > At step 1 you fill in something in memory. You then return to display a
> > new page to the user. So between step 1 and step 2, all information in
> > memory is effectively lost. Once the user submits the form in step 2, it
> >
> > might not even be the same process that is handling the reply, since web
> > servers can use multiple processes and/or threads to handle requests.
> >
> > So you need to save the data after step 1. Since this a Django mailing
> > list, I'd suggest using a Django model and saving it to the database.
> >
> > Regards,
> > Malcolm
> >
> > >
> > --
> > The early bird may get the worm, but the second mouse gets the cheese.
> > http://www.pointy-stick.com/blog/
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: Request for Leopard users

2007-10-31 Thread Lavoie Francis
I don't know how to reproduce this error.

But If I check the comment :
This is really a bug in Leopard. UTF-8 doesn't look like a valid value  
for the LANG environment variable. It should be something of the form  
language[_territory][.codeset], where UTF-8 is only the codeset part.

LANG on my system is set to fr_CA.UTF-8, which is valid.

But python doesn't seems to take it into account, if I import locale  
and try :

locale.getlocale()
I got : (None, None)


But this with the default python that comes with Leopard. Not the one  
in macport.



Le 07-10-31 à 23:31, Malcolm Tredinnick a écrit :

>
> Can anybody using Apple's Leopard OS confirm #5846 exists by default?
>
> This is either a mistake on the part of the reporter or a total bozo  
> bug
> on Apple's part. I'd like to establish which.
>
> Thanks,
> Malcolm
>
> -- 
> I don't have a solution, but I admire your problem.
> http://www.pointy-stick.com/blog/
>
>
> >


--~--~-~--~~~---~--~~
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: Recommendations on running Django on Leopard

2007-10-31 Thread Francis Lavoie
If you only plan to do developpement or testing, why is the included web
server not enought?

I upgrade to Leopard yesterday night. I'll reinstall django tonight, but I
don't use apache or mod_python since it only a developpement front end.


2007/10/31, jeffself <[EMAIL PROTECTED]>:
>
>
> I just installed Leopard last night and haven't gotten around to
> installing Django yet.  Should I use the default Python installation
> or should I install Python myself like I did in Tiger?  Any issues
> with psycopg2 or the egenix stuff?  I'm not worried about mod python
> yet since I'm still in the learning stages of Django so I'm using
> Django as the web server.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Dictionnary problem trough session

2007-10-31 Thread Francis Lavoie
But Isn't the same thing as saving the object in the
request["session"]["myobject"] ?.

The dictionnary is not being erase entirely, but it is the associate value
that are reset to empty string. I though at first that I might trigger the
__init__ , but when I trace it, the object is not being reinitialyse.

Is it possible that the object is only keep in memory because I use a third
level method to assign the values?

class object1:
   def __init__(self):
   self.key1 = object2()

class object2:
   def do2(self, v):
   self.key2 = { "value": v }

In views.py I do :

myobj = object1()
myobj.key1.do2("value")



2007/10/30, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
>
> On Tue, 2007-10-30 at 16:40 -0400, Francis Lavoie wrote:
> > Hi,
> >
> >
> > I have a shopping_cart class that I use with a session to store orders
> > information.
> >
> >
> > In this shopping cart, I have other object like customer contact.
> >
> >
> > class CustomerContact:
> > def __init__(self):
> > self.address = {}
> >
> > def add_address(self, add_dict, Company, Contact, Address, City,
> > State, Zip, Country, Phone, Fax, Email):
> > self.address[add_dict] = { "Company" : Company,  "Contact" :
> > Contact,
> > "Address" :
> > Address, "City" : City,
> > "State" :
> > State,  "Zip" : Zip,
> > "Country" :
> > Country, "Phone" : Phone,
> > "Fax" :
> > Fax, "Email" : Email }
> >
> >
> > it is quite basic.
> >
> >
> > In my shopping cart I assign a variable to this object in __init__.
> >
> >
> > Step 1.  User fill the address required fields, then commit, it will
> > set three addresses [add_dict] for billing, shipping, other
> > To set the address I
> > use : 
> > request.session['shopping_cart'].customer_contact.add_address("billing",
> alltheinfo)
> >
> >
> > Step 2. It display a payment page which also shows the filled address.
> > Address are display correctly
> >
> >
> > Step 3. Then it display a validation page. My dictionnary is somehow
> > reset, the keys are still there but nothing is assign to it.
> >
> >
> >
> >
> > Is my logic erroneous? I just dont understand why my dictionnary get
> > reset between step2 and step3.
>
> At step 1 you fill in something in memory. You then return to display a
> new page to the user. So between step 1 and step 2, all information in
> memory is effectively lost. Once the user submits the form in step 2, it
> might not even be the same process that is handling the reply, since web
> servers can use multiple processes and/or threads to handle requests.
>
> So you need to save the data after step 1. Since this a Django mailing
> list, I'd suggest using a Django model and saving it to the database.
>
> Regards,
> Malcolm
>
> >
> --
> The early bird may get the worm, but the second mouse gets the cheese.
> http://www.pointy-stick.com/blog/
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Dictionnary problem trough session

2007-10-30 Thread Francis Lavoie
Hi,

I have a shopping_cart class that I use with a session to store  
orders information.

In this shopping cart, I have other object like customer contact.

class CustomerContact:
 def __init__(self):
 self.address = {}

 def add_address(self, add_dict, Company, Contact, Address, City,  
State, Zip, Country, Phone, Fax, Email):
 self.address[add_dict] = { "Company" : Company,  "Contact" :  
Contact,
 "Address" :  
Address, "City" : City,
 "State" :  
State,  "Zip" : Zip,
 "Country" :  
Country, "Phone" : Phone,
 "Fax" : Fax,  
"Email" : Email }

it is quite basic.

In my shopping cart I assign a variable to this object in __init__.

Step 1.  User fill the address required fields, then commit, it will  
set three addresses [add_dict] for billing, shipping, other
To set the address I use : request.session 
['shopping_cart'].customer_contact.add_address("billing", alltheinfo)

Step 2. It display a payment page which also shows the filled  
address. Address are display correctly

Step 3. Then it display a validation page. My dictionnary is somehow  
reset, the keys are still there but nothing is assign to it.


Is my logic erroneous? I just dont understand why my dictionnary get  
reset between step2 and step3.


--~--~-~--~~~---~--~~
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: Python 2.5, Postgres, Psycopg2 on OS X

2007-10-25 Thread Francis Lavoie

have you tried to import the module into python directly?



Le 07-10-25 à 18:58, Frank a écrit :

>
> All-
>
> Having a rough go getting database bindings in OS X.
>
> I've installed psycopg2 using the package here:
> http://pythonmac.org/packages/py25-fat/mpkg/psycopg2-2.0.5.1-py2.5- 
> macosx10.4.zip
>
> When I run 'python manage.py shell' I get the following... any ideas
> on how to fix this?
>
> Traceback (most recent call last):
>   File "manage.py", line 11, in 
> execute_manager(settings)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 275,
> in execute_manager
> utility.execute()
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 225,
> in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 70, in
> run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 84, in
> execute
> output = self.handle(*args, **options)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 166, in
> handle
> return self.handle_noargs(**options)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/commands/shell.py",
> line 17, in handle_noargs
> from django.db.models.loading import get_models
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/db/__init__.py", line 17, in 
> backend = __import__('%s%s.base' % (_import_path,
> settings.DATABASE_ENGINE), {}, {}, [''])
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/db/backends/postgresql_psycopg2/
> base.py", line 14, in 
> raise ImproperlyConfigured("Error loading psycopg2 module: %s" %
> e)
> django.core.exceptions.ImproperlyConfigured: Error loading psycopg2
> module: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/psycopg2/_psycopg.so, 2): Library not  
> loaded: /
> usr/local/pgsql/lib/libpq.4.dylib
>   Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/
> lib/python2.5/site-packages/psycopg2/_psycopg.so
>   Reason: image not found
>
>
> >


--~--~-~--~~~---~--~~
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: Error During Django Intall on Mac

2007-10-24 Thread Francis Lavoie

Because this is a secured area in your system.

If you want to change something you need admin/root acces like when  
you install software.

try :

sudo ln -s /usr/local/lib/python2.3/site-packages/django_src/django/ 
bin/django-admin.py /usr/local/bin/django-admin.py

it will ask for your password

Francis


Le 07-10-24 à 02:22, jnap a écrit :

>
> I am new at this so I apologize if this is a stupid question...
>
> Why do I keep getting a permission denied error when I run the
> following:
>
> jnap:/usr jnap$ ln -s /usr/local/lib/python2.3/site-packages/
> django_src/django/bin/django-admin.py /usr/local/bin/django-admin.py
> ln: /usr/local/bin/django-admin.py: Permission denied
>
> Thanks for your help!
>
>
> >


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



python mvc framework and java mvc framework

2007-10-19 Thread Francis

Hi,

For personnal information and curiosity, I was looking at the
available java mvc web framework out there.

One thing that I found particular, is that the dynamic language camp
market their framework as productive environnement, easy and so. While
the java framework emphasis on the enterprise-quality application.

On the other hand, java web framework look quite complicated with lot
of xml and manual configuration with no real advantage. Java verbosity
and static checking may help to find bug earlier than with python.
Python doesn't force you to include exception, assertion etc.. which
may lead to spent more time debuging or delevering application that
broke more often.

My question is to someone who actually try both, are they similar in
productivity and enterprise quality?

Francis


--~--~-~--~~~---~--~~
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: py2app & py2ex

2007-10-19 Thread Francis Lavoie
Hi,

I though of doing something similar a couple of month ago without reading
about It, I somehow change my mind.

I really like django, but I don't think it is well suite for this kind of
use. What i decide to do is a python client application which use the web
server as a web service to update information when online.

I didn't start my project yet, but one thing I explore, is to use a html
widget into my graphical interface and generate html with a python template
system (like the one django use).

Maybe more experienced django developper have a different opinion or
solution. It would be very useful.

Francis


2007/10/19, ArqEco <[EMAIL PROTECTED]>:
>
>
> Hello friends,
>
> "The Story That Won't Go Away" comes back!
>
> I am a newcomer to Django and just read some posts from one year ago
> about creating standalone programs with Django and py2app or py2exe.
>
> What is the status of this issue now? Anyone found a solution?
>
> I need to develop a very simple issue tracker and (non-software)
> project management application to be used for a small team of up to
> five members.
>
> The application is being designed to be installed on desktop and
> notebook computers (where it will be used out of the office
> [offline]), and will have a synchronization feature.
>
> I think that even the built in Django development server would be fine
> to me.
>
> I tried a very simple py2app setup but stoped at the question of
> calling "python manage.py runserver" from my starting script.
> execfile() doesn't allow arguments ("runserver"). Any suggestion?
>
> These are newcomer questions but I am not a professional developer.
>
> Thank you for your patience :-)
>
> Márcio
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Mac installation problem with mysqldb

2007-10-15 Thread Francis

I installed django yesterday on my Mac and it wasn't that simple. I
got stuck with mysqldb-python problem. I found similar problems on the
mailling list without answers.
http://groups.google.com/group/django-users/browse_thread/thread/16b76b7536bc3a1d/e4d222fe60d3f932?lnk=gst=mac+mysqldb#e4d222fe60d3f932

I think other mac user will find this helpful so I'll post my solution/
hack (maybe a note on the installation page would be nice too). These
problem are only repported when using python 2.5 and up.

Config :
Mac OS X.4
Python 2.5.1
Mysql 5.0.51

Problem 1. While installing mysqldb-pythohn
The setup script will not find the config_mysql file. So you have to
edit the setup_posix.py file and set de mysql_config.path.
mysql_config.path = "/usr/local/mysql/bin/mysql_config"

Problem 2. While starting django
The mysqldb-python has a bug since the last upgrade, 4 months old,
that look for mysql's libraries at the wrong place. The script is
looking for /usr/local/mysql/lib/mysql (note the extra mysql).
That folder doesn't exist. Some people on the net suggest to create a
directory and copy the file into it. Well, I prefer just to symlink.
To make it work you'll have to do this :

$ cd /usr/local/mysql/lib
$ sudo ln -s . mysql

Now reinstall mysqldb-python

You're done.

Francis


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Sending encrypted email

2007-10-04 Thread Francis

Hello,

I need to send an email with a encrypted part in it. Is there a built-
in way to do this in python or django (since it is a django apps).
Maybe the entire can be encrypted, but it is only a piece that
requires it.

i look at some encryption mechanism, but nothing seem to be
straightforward. (PGP, OTP)

Francis


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Sorting product

2007-09-26 Thread Francis Lavoie
Hi, 

I have a question related to sorting items.

I have a page that list products. These products are in different
categories, some belongs to other products (like addons). But I need to
sort them as the most important product is at the top. The problem is
that I can't come up with a good solution. I though to add an sorting
(int) field. But it seem to be too complicated to manage. How to switch
the sorting number in the admin interface, etc..

Is there something in django that can automatically manage that kind of
stuff (maybe I miss it in the doc)? Or any hint for a better solution
will be helpful.

Thank you

Francis

--~--~-~--~~~---~--~~
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: recursive relationship foreignkey

2007-08-19 Thread Francis Lavoie
Hi,

I still have this error with null=True .

model.py: 
class Category(models.Model):
name = models.CharField(max_length=36)
description = models.CharField(max_length=200)
parent = models.ForeignKey('self', null=True, blank=True)

class Admin:
# Admin options go here
pass

then I did (to reset de database) : python manage.py flush 

and `python manage.py sql myapp` returns :

BEGIN;
CREATE TABLE `myapp_category` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(36) NOT NULL,
`description` varchar(200) NOT NULL,
`parent_id` integer NULL
)
;
ALTER TABLE `myapp_category` ADD CONSTRAINT
parent_id_refs_id_5d9ae1d8600b3d85 FOREIGN KEY (`parent_id`) REFERENCES
`myapp_category` (`id`);


Regards,

Francis


On dim, 2007-08-19 at 13:02 -0700, olivier wrote:

> Hi,
> 
> On 19 août, 21:51, Francis Lavoie <[EMAIL PROTECTED]> wrote:
> > I'm trying to implement a recursive relationship with a foreignkey, but I 
> > failed to make it work.
> > If I dont use blank=True, the admin interface doesn't let me add the 
> > category, otherwise I received the error.
> 
> You need also null = True.
> 
> blank is for django, null is for the backend (btw, OperationalError
> are always propagated from the backend).
> 
> Regards,
> 
> Olivier
> 
> 
> > 

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



recursive relationship foreignkey

2007-08-19 Thread Francis Lavoie
Hi,


I'm trying to implement a recursive relationship with a foreignkey, but I 
failed to make it work.
My goal is to have a table containing different categories and sub categories 
of equipment. the relationship with 'self' is for the subcategories.

But I can't create the Master categories. here's my error:

Traceback (most recent call last):

  File
"/usr/lib/python2.5/site-packages/django/core/handlers/base.py",
line 77, in get_response
response = callback(request, *callback_args,
**callback_kwargs)

  File

"/usr/lib/python2.5/site-packages/django/contrib/admin/views/decorators.py", 
line 55, in _checklogin
return view_func(request, *args, **kwargs)

  File
"/usr/lib/python2.5/site-packages/django/views/decorators/cache.py", 
line 39, in _wrapped_view_func
response = view_func(request, *args, **kwargs)

  File
"/usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py", 
line 261, in add_stage
new_object = manipulator.save(new_data)

  File
"/usr/lib/python2.5/site-packages/django/db/models/manipulators.py", 
line 110, in save
new_object.save()

  File
"/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 247, in save
','.join(placeholders)), db_values)

  File "/usr/lib/python2.5/site-packages/MySQLdb/cursors.py",
line 164, in execute
self.errorhandler(self, exc, value)

  File
"/usr/lib/python2.5/site-packages/MySQLdb/connections.py", line
35, in defaulterrorhandler
raise errorclass, errorvalue

OperationalError: (1048, "Column 'parent_id' cannot be null") 



here's my object :


class Category(models.Model):
name = models.CharField(max_length=36)
description = models.CharField(max_length=200)
parent = models.ForeignKey('self',blank=True)

class Admin:
# Admin options go here
pass


If I dont use blank=True, the admin interface doesn't let me add the category, 
otherwise I received the error.

Any help would be appreciated.

Thank you

Francis


--~--~-~--~~~---~--~~
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: Multilingual site best practices

2007-08-10 Thread Francis

1. You should use a quick description and then write the full text in
the po file.

2.  You are better of using english in the {%trans%} bloc because
gettext don't support UTF-8 or character outside the limited ascii.

no clue for 3.

Francis


On Aug 10, 11:42 am, Vincent Foley <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I work for a company who develops web sites and web applications for
> clients in Quebec.  People in Quebec mainly speak french, but there
> are english speaking people too.  Most sites we make eventually want
> to have a french and english version with french being the "main"
> version.
>
> I would like to know if anyone could share best practices for
> multilingual sites.  I also have some questions:
>
> 1. In the {% trans %} and {% blocktrans %} tags, should I include the
> full text, or just a quick description and enter the full text in
> the .po files?
>
> 2. As I said, french is the main language in Quebec, so if I write a
> site in french and am later asked to translate it, will the accented
> characters cause a problem if they're used in the msgid of the .po
> files?
>
> 3. It seems the server always has to be restarted after the .po files
> have been compiled.  Is that so?  If I don't have root access to the
> server to restart Apache, is there a way I can have the new
> definitions appear on the site?
>
> Thanks for the input,
>
> Vincent.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



database error instead of 400

2007-06-25 Thread Francis Lavoie
I have a problem with my 400.html when I put the site in production
(another server).

Both desktop and server are running ubuntu 7.04.
The Desktop use the builtin webserver and the server is running apache
with mod_python

On my localhost with debug = True and debug = False, everything is
working as expected. But when I sync the code with the production web
server and I corrected the static path, the server cannot handle 400
error and throw a database error instead. (I don't use the database, I
just have it configured for future use with the default django services)

The apache user has read/write permission on the database file.

here is the error :
Mod_python error: "PythonHandler django.core.handlers.modpython"


Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 299, in 
HandlerDispatch
result = object(req)

  File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", 
line 163, in handler
return ModPythonHandler()(req)

  File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", 
line 136, in __call__
response = self.get_response(req.uri, request)

  File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 
95, in get_response
return callback(request, **param_dict)

  File "/var/lib/python-support/python2.5/django/views/defaults.py", line 79, 
in page_not_found
return http.HttpResponseNotFound(t.render(RequestContext(request, 
{'request_path': request.path})))

  File "/var/lib/python-support/python2.5/django/template/context.py", line 97, 
in __init__
self.update(processor(request))

  File "/var/lib/python-support/python2.5/django/core/context_processors.py", 
line 18, in auth
'user': request.user,

  File "/var/lib/python-support/python2.5/django/contrib/auth/middleware.py", 
line 5, in __get__
request._cached_user = get_user(request)

  File "/var/lib/python-support/python2.5/django/contrib/auth/__init__.py", 
line 71, in get_user
user_id = request.session[SESSION_KEY]

  File 
"/var/lib/python-support/python2.5/django/contrib/sessions/middleware.py", line 
18, in __getitem__
return self._session[key]

  File 
"/var/lib/python-support/python2.5/django/contrib/sessions/middleware.py", line 
56, in _get_session
expire_date__gt=datetime.datetime.now())

  File "/var/lib/python-support/python2.5/django/db/models/manager.py", line 
67, in get
return self.get_query_set().get(*args, **kwargs)

  File "/var/lib/python-support/python2.5/django/db/models/query.py", line 211, 
in get
obj_list = list(clone)

  File "/var/lib/python-support/python2.5/django/db/models/query.py", line 103, 
in __iter__
return iter(self._get_data())

  File "/var/lib/python-support/python2.5/django/db/models/query.py", line 430, 
in _get_data
self._result_cache = list(self.iterator())

  File "/var/lib/python-support/python2.5/django/db/models/query.py", line 170, 
in iterator
cursor = connection.cursor()

  File "/var/lib/python-support/python2.5/django/db/backends/sqlite3/base.py", 
line 45, in cursor
detect_types=Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES)

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



Re: Kid and css file

2007-06-12 Thread Francis Lavoie
Le lundi 11 juin 2007 à 13:37 -0700, Tyson Tate a écrit :

> On Jun 11, 2007, at 11:18 AM, Francis wrote:
> 
> > So far everything is working fine. But I have founded no working
> > solution to make my /static/css /static/images /static/javascript
> > works.
> 
> Read this:
> 
> http://www.djangoproject.com/documentation/static_files/
> 
> -Tyson


Perfect, that solved my problem.



Thank you


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Kid and css file

2007-06-11 Thread Francis

Hi,

I'm new to django, I have some experience with turbogears and I want
to try out django.

When I'll be more familiar with django I don't mind to change my kid
template to django template. But for the moment I would prefer to run
it with kid.

So far everything is working fine. But I have founded no working
solution to make my /static/css /static/images /static/javascript
works.
So there's is no image, no css formating and no javascript in my page,
only the kid serialize output.


Here is my call in the template (I use media, since it look to be the
django naming convention)


@import "/media/css/standard.css";

 

any clue would be really helpful,

Thank you


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >