Define Meta attributes at runtime

2011-09-30 Thread Isaac

Hi folks,

I'm wondering if it's possible to set / redefine Meta attributes of a 
given model at runtime.


The problem arises because I'm using a framework with many classes 
defined there, and interacting in a right way. I need to redefine some 
of Meta attributes of that class, but without overriding framework file, 
because it can cause many trouble in any update.


Anyone know how I can access them?

To set an example:

folder1
__init__.py
models.py

from folder1.models import ModelTrouble

ModelTrouble.Meta.verbose_name = "my_verbose_name"

Thanks in advance
Isaac

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



Looking for 4b gateway implementation

2011-10-07 Thread Isaac

Hi folks,

I'm looking for a django app or python package to interact with 4b 
gateway. I know there are others implemented, like sermepa or paypal, 
but can't find anyone with 4b.


Anyone know something about it?

Thanks in advance,

Isaac

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



Set order from admin

2011-08-10 Thread Isaac

Hi folks,

I've having trouble to find a clear solution to my problem. All I want 
is to set a relation between 2 classes, and set filter order from admin 
to the rest of queries.


pseudocode:

Class A
has_many B
Class B
foreign_key A

And then, I want to retrieve B objects from a given A instance in the 
same order as introduced (or changed) in admin.


Any clue about some clear mode to implement it in django?

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



Adding new js to admin

2011-08-11 Thread Isaac

Hi there folks,

I'm trying to add raw tinyMCE support for my project. I don't want to 
use the django-tinymce app, as it introduces some features that I don't 
want to load in my project.


I followed instructions from
https://code.djangoproject.com/wiki/AddWYSIWYGEditor
and can't get it working. I've tried to insert that js tuple from model 
and from modeladmin, but neither works. I'm using django 1.3, and all I 
need is to introduce the right js scripts in admin templates, but don't 
know how to do it.


Any clue?

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



Showing per-user information in admin

2011-08-12 Thread Isaac

Hi dudes,

I'm having trouble at finding a solution for my problem. All I want to 
do is tune django admin to show, for a given user an a given model, only 
instance related to that user.


my pseudocode

class User
...
class A
foreign_key User

A1 related to User1
A2 related to User1
A3 related to User2

then, I want that User1 was only be able to see A1 and A2, and User2 was 
only be able to see A3.
I know that I can create filters to allow user to filter instances, but 
all I want is not to allow user to make that decision, it will be only 
able to see what its related.


Any clue about how to use admin in this way?

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



Problem with translations

2011-08-17 Thread Isaac

Hi folks,

I'm having a problem with a single module and its translations.

This module has some lazy translation (the same as other modules), but 
in admin, it spreads an error.

Error is the following:

TemplateSyntaxError at /admin/tieredpricing/pricingtier/add/
Caught TypeError while rendering: Lazy object returned unexpected type.
Request Method:GET
Request URL:http://localhost:8000/admin/tieredpricing/pricingtier/add/
Django Version:1.3
Exception Type:TemplateSyntaxError
Exception Value:
Caught TypeError while rendering: Lazy object returned unexpected type.
Exception Location:
/usr/local/lib/python2.7/dist-packages/django/utils/functional.py in 
__wrapper__, line 197

Python Executable:/usr/bin/python
Python Version:2.7.1

In template 
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/includes/fieldset.html, 
error at line 6

Caught TypeError while rendering: Lazy object returned unexpected type.
1 
2{% if fieldset.name %}{{ fieldset.name }}{% endif %}
3{% if fieldset.description %}
4 {{ fieldset.description|safe }}
5{% endif %}
6{% for line in fieldset %}

At line 6.

Then I traced that error to its dispatcher, and I found the following:

at line 402 of file django/forms/forms.py there is the following line:
self.help_text = field.help_text or ''

my problem is that field.help_text must contain an unicode string (u'') 
and not that weird object that is containing,



I've found a way to solve it, and is to call __unicode__() function on 
that object, that explicitly gives me the right unicode string, but that 
code is django core, and I don't know if it's a django issue.


Can anybody help me plz?

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



Re: RUNSERVER SERIOUS PROBLEM! Please help me pls

2020-08-03 Thread Isaac
Send the screenshot of your wsgi.py file 

On Tuesday, 4 August 2020 05:47:29 UTC+1, Phan Nguyen wrote:
>
>
>
> On Tuesday, August 4, 2020 at 11:42:32 AM UTC+7, Phan Nguyen wrote:
>>
>> *So I was be able to work with Django very well the past weeks. But 
>> certainly, I manually moved a 'src' folder(contain manage.py) which is 
>> originally in a Dev folder, to another folder where I write all the code of 
>> html and python for this webserver. And it turns out to be not working 
>> anymore.Now, all the admin site and other urls path cannot be run. I am 
>> using Mac OS. (error picture attached) please tell me if you need more 
>> screenshot to clarify. I appreciate any help. Thank you so much!*
>>
>> [image: Screen Shot 2020-08-04 at 11.36.30.png]
>>
>>

-- 
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/f766ba0c-de3a-4526-bd9f-810f94ee2b15o%40googlegroups.com.


Multiple websites but one authentication system

2021-08-26 Thread Isaac
Am working on a company website and there will be having more websites as 
time goes on, they don't want to be creating authentication system in each 
of their website. To avoid stress in creating multi account on these 
platform, there is a need to have one website that will do everything 
relating to authentication and authorization, just Google is.
 For example we will have domain1.com which will handle everything relating 
to  authentication and authorization(Signup,Signin,Password reset, Password 
change, Logout) while other domains like domain2.com, domain3.com, 
domain5.com etc will be falling back to domain1.com for authenticating 
users. Plz any suggesting on how i can do this will be highly 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/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com.


Re: Multiple websites but one authentication system

2021-08-26 Thread Isaac
Am trying to understand what you said sir but am still confuse, how will 
the domain2.com recognize that this person is a user ? Also how will the 
database schema  look like ? Will the two database be connected in a way ? 

On Thursday, 26 August 2021 at 09:29:47 UTC+1 eugenet...@gmail.com wrote:

> My suggestion is that you can create a single entry where after login the 
> system redirects users to the home page containing all these domains as 
> icons and then the user selects the one he wants.
>
> On Thu, 26 Aug 2021 at 10:18, Isaac  wrote:
>
>> Am working on a company website and there will be having more websites as 
>> time goes on, they don't want to be creating authentication system in each 
>> of their website. To avoid stress in creating multi account on these 
>> platform, there is a need to have one website that will do everything 
>> relating to authentication and authorization, just Google is.
>>  For example we will have domain1.com which will handle everything 
>> relating to  authentication and authorization(Signup,Signin,Password reset, 
>> Password change, Logout) while other domains like domain2.com, 
>> domain3.com, domain5.com etc will be falling back to domain1.com for 
>> authenticating users. Plz any suggesting on how i can do this will be 
>> highly 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene@aims-cameroon.org
>eugenet...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>

-- 
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/a58a4fdb-8bcb-4639-b65f-02a9979a6689n%40googlegroups.com.


Re: ANN: django-currencies 0.2.2

2010-12-03 Thread Isaac XxX
Nice app!

I will keep an eye to it, maybe it can be useful for one of my projects

On Fri, Dec 3, 2010 at 11:17 AM, Panos Laganakos
wrote:

> Description:
>
> django-currencies allows you to define different currencies, and
> includes template tags/filters to allow easy conversion between them.
>
> Download: http://pypi.python.org/pypi/django-currencies/0.2.2
> Documentation: http://packages.python.org/django-currencies/
> Source Code: https://launchpad.net/django-currencies
>
> --
> 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.
>
>

-- 
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: Trouble with stockphoto

2007-01-16 Thread Isaac Alston



You do have to add to urls.py. I'm using stockphoto on one of my
sites, you can see my site's code here:
http://svn.jayparlar.com/website/trunk/awwca/


Thanks for this. What I meant was the urls.py in the stockphoto
directory (sorry I didn't make it clear). I notice that you've not
changed this (but you have changed the urls.py for the whole site, as
was in the install :-) ). Here's my urls.py for the whole site, I
can't see why it doesn't work:

http://dpaste.com/4716/

The problem does not seem to occur when I go to /stockphoto (I get a
TemplateSyntaxError (saying it can't find 'load markup'), but I think
that's good because it shows it's finding a template ;-) :-)). The
problem occurs when I go into the 'edit' part of an admin page, and
the link to the photo is given as:

http://127.0.0.1:8000/admin/stockphoto/photo/2/photos/2007/01/11/Family-2006-09-10_012.jpg

for example.

Here is my settings.py: http://dpaste.com/4717/ ; of particular note
are STOCKPHOTO_BASE and STOCKPHOTO_URL which may be causing this.

Any advice would be appreciated.

Thanks,

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-16 Thread Isaac Alston



Your paste bin links don't seem to be working for me, but I'm going to
guess that your STOCKPHOTO_BASE and STOCKPHOTO_URL aren't right. The
link to the .jpg itself shouldn't have 'admin' in it anywhere, unless
you have your media setup in a very odd way.

This is strange, I'll paste them somewhere else, sorry about that:
http://pastebin.com/860489

Just in case that's broken as well:
STOCKPHOTO_BASE='/photos/'
STOCKPHOTO_URL='/photos/'

MEDIA_ROOT = '/home/isaac/django/threeci/smedia/'
MEDIA_URL=''

All of my media is in /smedia. I'm using runserver so I don't have a
'media server' setup yet - I've put something into urls.py from the
Django docs, which lets you serve stuff out of a folder without
setting up a 'proper' server while in development.


For my site, for example, one of the .jpgs have the link:
http://media.awwca.ca/site_media/stockphoto/2006/09/17/HPIM1621a.JPG

Is this taken from the admin 'edit' page for your photo?

Thank you very much for your time.

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-16 Thread Isaac Alston



Hmm, that MEDIA_URL worries me. Can you try setting that to something
more concrete?


Ok, I tried setting it to "127.0.0.1:8000" (was the only thing I could
think of) and it didn't do anything, so I decided to do a fresh
install of stockphoto. Upon doing this, I now receive a new error:
"threeci.stockphoto: string index out of range" when I try to syncdb
(or go to the app). Curiouser and curiouser.

The only changes I've made, was set the stockphoto urls to '' (because
I just wanted a default install - I thought perhaps 'photos' was
causing the problem).

I wish it worked.

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-17 Thread Isaac Alston



Can you paste the full traceback for the string index error?

That's the problem: there isn't one (that I can see), the error is
given by runserver:

$ python manage.py runserver
Validating models...
threeci.stockphoto: string index out of range
1 error found

Is there elsewhere I can look?

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-17 Thread Isaac Alston


On 17/01/07, Isaac Alston <[EMAIL PROTECTED]> wrote:

> Can you paste the full traceback for the string index error?
That's the problem: there isn't one (that I can see), the error is
given by runserver:

$ python manage.py runserver
Validating models...
threeci.stockphoto: string index out of range
1 error found


Ok, I figured this part out. I looked at the stockphoto/models.py
code, and discovered it was doing something like STOCKPHOTO_URL[-1],
which was obviously causing the error, but I couldn't work out why.
Then I realised that if STOCKPHOTO_URL was already defined in
settings.py as '' then it would be trying to index an empty string
(which would fail). I removed my entries to STOCKPHOTO_URL and that
error has now disappeared.

Now everything is at a default install, but it's not fixed anything,
the link in admin is still:
http://127.0.0.1:8000/admin/stockphoto/photo/5/stockphoto/2007/01/17/newser.jpg
for example. Highly frustrating.

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-17 Thread Isaac Alston



The problem is most likely with your MEDIA_URL. Make sure it ends with a '/'


Thank you very much. That seems to be it fixed :-D. First I had
MEDIA_URL set to:
' ' then
'127.0.0.1:8000', then
'127.0.0.1:8000/' then
'/', then finally
'/smedia'

which got it working. I'm so happy :-). The only thing I'm concerned
about is a) why didn't it want a URL and b) what's going to happen
when I deploy? How will this change?

Many thanks,

--
Isaac

--~--~-~--~~~---~--~~
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: Trouble with stockphoto

2007-01-17 Thread Isaac Alston


Ok, that's great, thanks for everything.

--
Isaac

--~--~-~--~~~---~--~~
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: memcached backed

2007-01-29 Thread Isaac Sparrow

I think Mark is referring to the actual 'replace' functionality of
memcached. From http://www.danga.com/memcached/

replace -- sets in the cache only if the key already exists

As opposed to:

set -- unconditionally sets a given key with a given value

Isaac


On 1/29/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On 1/28/07 8:08 PM, [EMAIL PROTECTED] wrote:
> > why doesn't the memcached backend support 'replace'?
>
> I'm not sure what you mean::
>
> >>> cache.set("key", "val1")
> >>> cache.get("key")
> "val1"
> >>> cache.set("key", "val2")
> >>> cache.get("key")
> "val2"
>
> Isn't that "replace"?
>
> Jacob
>
> >
>


-- 
Random Geek Stuff: http://l0wbyt3.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Django 0.95 released

2006-07-29 Thread Isaac Sparrow

We doubted the 0.95 release would happen this week when you mentioned
it at the Django meet and greet at OSCON. Guess you were right :)

Great work!

Isaac

On 7/29/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> We've packaged and released Django version 0.95, which packages all of
> the significant advances in Django development since the 0.91 release
> in January 2006.
>
> For more information see these two documents:
>
> http://www.djangoproject.com/weblog/2006/jul/29/095/
> http://www.djangoproject.com/documentation/095_release_notes/
>
> Thanks to all the great people who made this possible!
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com
>
> >
>


-- 
Random Geek Stuff: http://l0wbyt3.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Quick question for web hosting production

2021-10-14 Thread Isaac Moctezuma
scomer

El mié, 13 oct 2021 a las 1:13, Derek () escribió:

> Here's a similar question on StackOverflow:
>
>
> https://stackoverflow.com/questions/65141036/deploy-react-and-django-with-nginx-and-docker
>
>
> On Friday, 8 October 2021 at 16:17:27 UTC+2 patz...@gmail.com wrote:
>
>> I want to ask a quick question guys that, is it possible to host 2 apps
>> in one cloud service? like for example, angular for the front end and
>> django for the backend? and they would use one ip address right but on a
>> different port?
>>
>>
>> --
> 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/5599824d-f931-4e2b-aadc-34bfc35e7ea7n%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/CABqUN3HnKfJKQoSsQaQ-5uGhCVaA47Vs4L2LK_Fa7EyCo3_%3DTg%40mail.gmail.com.


Re: help

2021-10-26 Thread Boateng Isaac
If you're using a virtual environment try installing django in that
environment again

On Mon, 25 Oct 2021, 7:59 pm Planet X,  wrote:

> hey there i can not figure out while django is installed to but its
> showing django-admin is not recongnized as an internal or external command
> please help
>
> --
> 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/0261503c-4384-46a1-aa30-b37e53713abfn%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/CAPtHQ6%3DhT86yRdSt6O7KC2vZzMJQnXqTYGzdgFn2cg0KjCLgJw%40mail.gmail.com.


Re: django windows authentication

2023-05-19 Thread Isaac Samuel
https://django-windowsauth.readthedocs.io/en/latest/


On Fri, May 19, 2023, 09:44 Chelsea Fan 
wrote:

> Hello guys, what is windows authentication and how is it work in django
> and how can  I realize it?
>
> --
> 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/CAJwZndcVcsV_-68akHijcu14%2BOhBpOwgDvu0Qyu8Tr4qqUW_Sw%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/CAAU4h89O-Y6zJ2SnBnc%2BYnghhwvb2hYawPY1xUYdjxAAT3ktRQ%40mail.gmail.com.


Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Isaac XXX

Hi folks,

I'm developing a new application that should get high traffic. Right 
now, I've other projects with the follow architecture:


Nginx on front: serving static content and redirecting to apache for 
dynamic data

Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single frontend/backend (1 
nginx, 1 apache, 1 postgresql). The requirements for this new project 
are really large, and I think I will need to scale all system. Can 
anyone suggest me an all-in-one tutorial, discussing the main points on 
scale a system?


I know there are different alternatives for DB (master-slave, 
clustering...), nginx can serve as a reverse proxy or not... and I need 
to merge all this information in a single scalable system, but I can't 
find an unified source of information.


Can anyone help me on it?

--
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: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Isaac XXX

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I lack 
the exact information about how to join systems, and what I was looking 
for was a source of cohesive information on all systems. At least, when 
I finish to build that system, I will write this tutorial.


For someone who can help me, I will describe here what I thought it can 
be this structure:


- 1 nginx, as a reverse proxy on frontend, serving static/media and 
redirecting content to apache clusters

- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac

On 10/29/2012 04:23 PM, Tom Evans wrote:

On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX  wrote:

Hi folks,

I'm developing a new application that should get high traffic. Right now,
I've other projects with the follow architecture:

Nginx on front: serving static content and redirecting to apache for dynamic
data
Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single frontend/backend (1
nginx, 1 apache, 1 postgresql). The requirements for this new project are
really large, and I think I will need to scale all system. Can anyone
suggest me an all-in-one tutorial, discussing the main points on scale a
system?

I know there are different alternatives for DB (master-slave,
clustering...), nginx can serve as a reverse proxy or not... and I need to
merge all this information in a single scalable system, but I can't find an
unified source of information.

Can anyone help me on it?


There is unlikely to be one authoritative source that will explain
precisely how to scale an app - part of this is it is domain specific
what "scale" and "app" mean!

So first off, "scale". You can scale up, or out. Scaling up means
running everything on faster hardware. Due to how IT progresses, every
18 months you can replace your server with something twice as fast.
Scale out means running everything over more boxes. Scale up is
trivial, just spend more money, scale out can be harder.

Most parts of the stack are easy to scale, because HTTP itself is
stateless and therefore easy to scale. Eg, if you have a nginx
frontend, serving static files and proxying to backend servers for
static content, and the nginx server is overloaded, it is easy to add
a balancer to route HTTP requests to multiple nginx servers.

The same is true for dynamic content - need more workers, add more
machines, and tell nginx to talk to more machines.

The only tricky aspect of scale out is database. Most databases do not
have a simple 'scale out' option. With postgres, you can setup
master-slave trees, but this only expands your read capacity, all
writes have to go through one server (and then all the slaves, making
it more expensive the more slaves you add).

The only true way of scaling out with database servers is to shard
your data, splitting it up by some arbitrary algorithm (usually on
user), but sharding isn't easy, you will have to design your database
and app around it. There are some very good videos, docs and talks
from the likes of Facebook and the like, sharding is not a panacea and
requires a lot of work.

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-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: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX

Hi Tom,

you're right, I was not really explicit about what were my lacks of 
information. Right now, the following points are the ones I can't found 
a howto for the desired deployment:


- Create a master-slave system on postgresql, maintaining all systems up 
to date, distributing reads, and centralizing writes
- How to configure a cluster of reverse proxies (a single reverse proxy 
can not be enought, and I need to plan to deploy more than 1 load balancers)


The rest (configure apache with mod_wsgit, configure nginx to serve 
static content and so on), is now solved on my current deployments, so 
it should not be a problem on a distributed environment.


Cheers,

Isaac

On 10/29/2012 05:23 PM, Tom Evans wrote:

On Mon, Oct 29, 2012 at 4:03 PM, Isaac XXX  wrote:

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I lack the
exact information about how to join systems, and what I was looking for was
a source of cohesive information on all systems. At least, when I finish to
build that system, I will write this tutorial.

For someone who can help me, I will describe here what I thought it can be
this structure:

- 1 nginx, as a reverse proxy on frontend, serving static/media and
redirecting content to apache clusters
- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac


I'm confused about what you are confused about - you seem to grasp
precisely what is required.

IE, which of the following Qs are you stuck at:

How to configure nginx to reverse proxy and balance to other http servers?
How to configure apache, mod_wsgi and django?
How to configure pgsql in a master/multiple slave environment?
How to configure django to issue write requests to the write master,
and distribute reads to read-only slaves?


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-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: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX
Thank you so much for tips. I will keep them when I start to test 
environment for performance.


Cheers

Isaac

On 10/29/2012 06:44 PM, Cal Leeming [Simplicity Media Ltd] wrote:

Hi Isaac,

If there is one thing I have learnt about scaling apps, it's about 
trying things out for yourself.


Sure there are some best practice guidelines (i.e. serving files from 
nginx, or using apache's X-SendFile rather than streaming out via the 
webapp), but if someone comes along and tells you to use X instead of 
Y, then you don't get the advantages of learning "the hard way".


Another important note is that scaling rarely goes up on a 1:1 ratio, 
i.e. the configuration and resources required to handle X number of 
requests/sec, may be completely different if you need to handle Y 
number of requests/sec.


And often what works for one person, won't work for another (scaling 
is entirely dependant on your application, despite what any of these 
cloud providers might tell you!)


In my own experience, I've found that;

* SSDs with Percona MySQL, resolves a LOT of performance problems - 
but don't abuse it

* Lots and lots and lots of query tuning and InnoDB tuning
* New Relic to identify bottlenecks
* IO contention is a big thing
* Snowball prevention (i.e. you set max clients to X, your backend 
can't handle it, your requests stack up, the load balancer forces time 
out, and your database gets smashed - or you set max memory too high, 
server goes into swap etc).

* uWSGI + nginx is amazing
* Identify where your bottlenecks are (in my own experience, IO/memory 
tends to come up more often than CPU)


Sadly I haven't tried PSQL so I can't offer any advice on this - 
Percona are dragging MySQL kicking and screaming into the 21st century 
and really doing some amazing things, but it's by no means perfect!


The above has helped us grow past 8k-12k requests/minute, the largest 
database we manage is around 1.1 billion rows weighing in at 160GB+, 
and we maintain around 60+ servers.


I should reiterate, the above is purely based on my own experience and 
use cases - I am by no means an expert on the subject and I'm still 
learning approaches on a daily basis - so this is really meant as 
"food for thought" rather than a "this is how you should do things".


Hope this helps a bit!

Cal

On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX <mailto:vyrp...@gmail.com>> wrote:


Hi folks,

I'm developing a new application that should get high traffic.
Right now, I've other projects with the follow architecture:

Nginx on front: serving static content and redirecting to apache
for dynamic data
Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single
frontend/backend (1 nginx, 1 apache, 1 postgresql). The
requirements for this new project are really large, and I think I
will need to scale all system. Can anyone suggest me an all-in-one
tutorial, discussing the main points on scale a system?

I know there are different alternatives for DB (master-slave,
clustering...), nginx can serve as a reverse proxy or not... and I
need to merge all this information in a single scalable system,
but I can't find an unified source of information.

Can anyone help me on it?

-- 
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
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
<mailto: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-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.


--
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: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX

Hi there,

maybe you're right, but I'm not really worried about RAM footprint, or 
resources consumption. I'm concerned now on architecture, setting a 
right scalable system, and a right cluster of systems, without lacks of 
communications between them.


Underlaying technologies can be easily replaced (say apache-mod_wsgi for 
gunicorn or uwsgi), and some performance improvements can be made, but 
this is not what I'm looking for. I'm looking for the tools to generate 
a robust system, balancing requests through several systems, and 
allowing increase the size of this system (adding more servers) without 
trouble.


Cheers,

Isaac

On 10/29/2012 05:18 PM, Some Developer wrote:

On 29/10/2012 16:03, Isaac XXX wrote:

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I 
lack the exact information about how to join systems, and what I was 
looking for was a source of cohesive information on all systems. At 
least, when I finish to build that system, I will write this tutorial.


For someone who can help me, I will describe here what I thought it 
can be this structure:


- 1 nginx, as a reverse proxy on frontend, serving static/media and 
redirecting content to apache clusters

- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac


Why not just ditch Apache entirely and just use Nginx for serving all 
media (both static and dynamic)? You can then save quite a few 
resources as you only need to run one HTTP server rather than two.


Using Nginx to serve Django content works well. Just serve your Django 
application via FastCGI or uWSGI and you'll significantly simplify 
your configuration and reduce RAM usage on your servers as well.




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



Alternatives to celery

2012-01-15 Thread Isaac XXX

Hi folks,

I need a solution to create cron-like jobs into my django projects. I've 
a server with several projects.


I've testes celery, and it seems to work well with only 1 project, but 
when I need to set up several projects with celery support, I can't 
figure how to do it (because daemonization of celeryd process, described 
here 
http://celery.readthedocs.org/en/latest/cookbook/daemonizing.html#daemonizing 
only describes how to start workers for a single process because this 
directive CELERYD_CHDIR="/opt/Myproject/").


Well, my question is the following:

Is there any good tutorial about deploying django with celery on several 
projects, sharing celery support? if not, is there any alternative 
viable to celery for django?


I've found APScheduler, that seems to be a good scheduler for python, 
but integration with django seems a bit tricky. Is it a good alternative?


I will be pleased to read all your feedback about it.

Thanks in advance,

Isaac

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



Video conference on django app

2012-01-16 Thread Isaac XXX

Hi folks,

I know that it's not mainly django topic, but I know here's is a well 
documented community through several areas.


I need to set a video conference (1 on 1) feature for a project in 
django. Can you provide me some hints about open-source (or 
free-royalty) apps, or frameworks, to get a simple videochat running in 
my nginx-apache-django environment?


I don't care if I need to install aditional server (like red5), but will 
be helpful if you provide some tutorial about how to deploy it along app.


Thanks a lot!

Isaac

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



Force exception raising when transaction fails

2012-11-20 Thread Isaac XXX

Hi everybody,

I run into a weird scenario, caused by a complex code involving threads 
and so on.


The problem arised in some point, with a DatabaseError exception, saying:

/current transaction is aborted, commands ignored until end of 
transaction block/


Obviously, the line which arises that error is the next one after 
transaction is corrupted. So, my question is: how do I can force django 
to raise exceptions when a given transaction fail?


An example is the following

func1()
func2() <-- Here, a db transaction fails, making all next calls raise 
that DatabaseError exception

func3() <-- Here DatabaseError is raised

I just want that func2 notice me that there is an error with its 
transaction.


Thank you in advance

Vyrphan


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



"Principle of least privilege" in accessing a DB from an app

2013-01-13 Thread Isaac Perez
Hi guys,

I'm creating a new app and I'd like to know how would be the best way to 
implement the principle of least privilege.
At the moment the DB has 5 users:

   - 1 is the root user for the DB (which I don't want it to be used by the 
   webapp)
   - 1 has read access to the data fields
   - 1 has write access to the data fields
   - 1 has read access to the users table
   - 1  has write access to the users table

What I intend to achieve is that if in any occasion we've got a sql 
injection for whatever the reason, the access to the DB from the app form 
will be as limited as possible.

If using python directly I would create a DB connection for each 
functionality so they use the right DB user and have the right permissions.

In Django, though, as you have to configure the default DB access in the 
settings and it has to sync, etc... I'm not sure what will be the best way 
to implement that splitting of privileges.

I've configured the 5 connections in the settings but not sure how to best 
use them for the different functions of authenticate, read and write from 
the DB.

Any ideas?


Thanks,
Isaac

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/JHYEv19RHOYJ.
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: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Isaac Perez
Hi Dennis,

yes, we are going to filter the input and the parameterized queries.
But I always prefer to have more than one layer of security.
And users won't be using any sql queries, they will just input text.

Does the django configuration always need to have full access to the DB?

Thanks,
Isaac

2013/1/14 Dennis Lee Bieber 

> On Sun, 13 Jan 2013 09:05:51 -0800 (PST), Isaac Perez
>  declaimed the following in
> gmane.comp.python.django.user:
>
> > What I intend to achieve is that if in any occasion we've got a sql
> > injection for whatever the reason, the access to the DB from the app form
> > will be as limited as possible.
> >
>
> You do THAT by not allowing user input directly into the SQL in the
> first place. ALL proper DB-API compliant database adapters use
> parameterized queries, and will properly escape and wrap the parameter
> data to prevent injection attacks.
>
> And, so far as I can tell, Django's ORM is even less susceptible
> than direct DB-API to injection attacks, since besides passing user data
> through the parameter system, it uses Python syntax to access the
> relation attributes ("table columns").
>
> If you are building raw SQL in which the user specifies both the
> column and the value for that column, you need to design the interface
> so that the column is never entered as text by the user, but is selected
> from a pre-defined list of columns. This ensures that column (and even
> table) names are clean for the building of the schema related part of
> the SQL statement; the data values are, of course, then passed using the
> DB-API parameter system and not "hand inserted" into the SQL.
>
> If you follow these two criteria:
> 1) always use parameterized queries to pass user entered data
> 2) never use user entered text for schema entities when building dynamic
> queries
> you will not be subject to an SQL injection attack.
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@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-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: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Isaac Perez
Hi Tom,

my main goal is to avoid that the access to the users table by anything
else other than the authentication module.
I understand that writing the app correctly and filtering the input, etc...
will do the same, but it's just another layer of security.

I'll take a look to the DB routers and how this can be implemented.

Thanks for your reply.

Cheers,
Isaac

2013/1/14 Tom Evans 

> On Sun, Jan 13, 2013 at 5:05 PM, Isaac Perez
>  wrote:
> > Hi guys,
> >
> > I'm creating a new app and I'd like to know how would be the best way to
> > implement the principle of least privilege.
> > At the moment the DB has 5 users:
> >
> > 1 is the root user for the DB (which I don't want it to be used by the
> > webapp)
> > 1 has read access to the data fields
> > 1 has write access to the data fields
> > 1 has read access to the users table
> > 1  has write access to the users table
> >
> > What I intend to achieve is that if in any occasion we've got a sql
> > injection for whatever the reason, the access to the DB from the app form
> > will be as limited as possible.
> >
> > If using python directly I would create a DB connection for each
> > functionality so they use the right DB user and have the right
> permissions.
> >
> > In Django, though, as you have to configure the default DB access in the
> > settings and it has to sync, etc... I'm not sure what will be the best
> way
> > to implement that splitting of privileges.
> >
> > I've configured the 5 connections in the settings but not sure how to
> best
> > use them for the different functions of authenticate, read and write from
> > the DB.
> >
> > Any ideas?
> >
>
> Hi Isaac
>
> Personally I think this is overkill, but you can achieve exactly what
> you want by using DB routers to allow Django to select the right DB
> connection to use at the right time.
>
> However, what's the point? If your DB router correctly tells Django to
> use the "data write" DB handle when saving data fields on an object
> loaded from the "data read" DB handle, then it would do so whenever
> asked to save an object. So saving objects would always use the write
> handle.
>
> In effect, by separating out read and write handles, all you are
> protecting against is Django accidentally generating a query to modify
> your DB when it is attempting to generate a query to read from your
> DB.
>
> 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-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.
>
>

-- 
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: "Principle of least privilege" in accessing a DB from an app

2013-01-15 Thread Isaac Perez
Hi John,

I think you are going one step further of what I intended to protect from.
That makes me think about what you are saying but I think it's going to be
too complicated, I'll have to see the risk of that happening.

In a few words what I want to protect from is that an sql query could be
passed in the main input text box and it could access other users passwords
or information.
Also don't feel comfortable with the app having root access to all the DB
if it doesn't need it for it's main function, just in case.
It may be unlikely that this happens and we are implementing other input
controls, etc...
But I thought it would have been easy enough to just have different
connections and use each one for a different function inside the app.
If routing does that, I think it's enough.

If the whole app gets compromised, we are in trouble :-)

Thanks for your reply
Isaac


2013/1/14 John 

>  Hi Isaac,
>
> I've thought about this but never implemented it...
>
> I don't think DB routers will really do what you want; you are making the
> assumption that your Django project is compromised and you need separation
> at the DB level, which means that every route is also compromised as all
> the access credentials need to be available to your Django project.
>
> As far as I can see, the only way to do this and to avoid the potential
> for code vulnerabilities, privilege escalation, etc, is to split the whole
> project into separate sub-projects (matching separate use cases), each with
> its own DB access credentials with matching (minimum) database privileges,
> but all sharing the same database. You then separate the sub-projects
> according to your risk appetite:
>
>- Separate URL spaces within the same FQDN that are handed off by
>different web handlers to different django sub-projects on the same server.
>- Separate FQDNs within the same web server, each with its own virtual
>host and web handler.
>- Separate FQDNs on separate VMs on the same physical host, with the
>DB on a different VM. Implement IP tables and/or virtual firewall to limit
>DB access to the web VMs.
>- Separate FQDNs on separate physical hosts in the same datacentre...
>- Separate hosts in different datacentres with DB replication (over
>VPN?), allowing only the replication of a 'write' database to write into a
>corresponding 'read' database. This is not quite 'sharing the same
>database' as above, but the replication cluster can be treated as a single
>database.
> - etc.
>
> Once you have separated the apps in this way, you can apply whatever
> additional layers (eg IP address filtering for VPN-only access, SSL client
> cert authentication) to mitigate against attacks to the more sensitive
> aspects. Note: if you don't protect the more sensitive parts by other
> means, then there is little point in separating the project in the first
> place, unless you think that 'security by obscurity' is a valid defence
> mechanism.
>
> I cannot think of another way to deal with the threat that I think you are
> trying to mitigate, but it would be interesting to see if anyone has any
> other ideas.
>
> John
>
>
> On 14/01/13 14:41, Isaac Perez wrote:
>
> Hi Tom,
>
>  my main goal is to avoid that the access to the users table by anything
> else other than the authentication module.
> I understand that writing the app correctly and filtering the input,
> etc... will do the same, but it's just another layer of security.
>
>  I'll take a look to the DB routers and how this can be implemented.
>
>  Thanks for your reply.
>
> Cheers,
> Isaac
>
> 2013/1/14 Tom Evans 
>
>> On Sun, Jan 13, 2013 at 5:05 PM, Isaac Perez
>>  wrote:
>> > Hi guys,
>> >
>> > I'm creating a new app and I'd like to know how would be the best way to
>> > implement the principle of least privilege.
>> > At the moment the DB has 5 users:
>> >
>> > 1 is the root user for the DB (which I don't want it to be used by the
>> > webapp)
>> > 1 has read access to the data fields
>> > 1 has write access to the data fields
>> > 1 has read access to the users table
>> > 1  has write access to the users table
>> >
>> > What I intend to achieve is that if in any occasion we've got a sql
>> > injection for whatever the reason, the access to the DB from the app
>> form
>> > will be as limited as possible.
>> >
>> > If using python directly I would create a DB connection for each
>> > functionality so they use the right DB user and have the right
>> perm

Getting related values from map table with foreign keys

2013-01-25 Thread Isaac Perez
Hi,

I'm building an app that has some text with tags, the tags are mapped to 
the text through a mapping table (toxi model).
Something like that:
TEXTID <-->TAGID<-->TAGID
TEXT  TEXTID TAG
What would be the best way to display the text and its tags?

I'm very new to django, and programming in any case,  I can create a list 
for the texts for a certain user, but I don't see how to add only the tags 
for that text in the same list or create somehow a hash with both values.

Is there a django way to do this?

Thanks,
Isaac

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




How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
Hi everybody,

I have a model inherited from a third application call Video in that
model they have the thumbnail field with blank = True, this make in
the admin site that user could left in blank the thumbnail field,
that's something I don't want to happen, I want to make in the
admin.py in VideoAdmin the field thumbnail required, how is possible
that ??? anybody knows how to achieve that ???

I am working with django 1.3

Regards,
Ariel

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
It is a third application I can't do that, that's why I want to do it in
the adminModel.

Could you help me please ???



On Wed, Jan 30, 2013 at 10:34 AM, Black9design.com
wrote:

> Remove the line blank=True and it will be required.
>
> On Jan 30, 2013, at 7:01 AM, Ariel Isaac  wrote:
>
> > Hi everybody,
> >
> > I have a model inherited from a third application call Video in that
> > model they have the thumbnail field with blank = True, this make in
> > the admin site that user could left in blank the thumbnail field,
> > that's something I don't want to happen, I want to make in the
> > admin.py in VideoAdmin the field thumbnail required, how is possible
> > that ??? anybody knows how to achieve that ???
> >
> > I am working with django 1.3
> >
> > Regards,
> > Ariel
> >
> > --
> > 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?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Problem with layout

2011-05-31 Thread Isaac XxX
Hi friends,

recently I upgraded my django installed version to 1.3.

To test it, i got a free html/css template from a page, and started a little
web. The surprise came when I open development webserver, with all static
files configured properly, and the resulting website (without any
modification, only serving the same web template from django instead of
filesystem) is wider, and some parts are malformed.

I used the same html template (without modifications), and the same images
and CSS (CSS only modified to get properly routes).

Then, i set the same index.html and served from django server as static file
(without using django routes, only servinc static html file). This file is
malformed too, at the same way as serving as django page. The last test was
to open that html file, from the same browsers, but this time from
filesystem, instead of from django. File display correctly all layout.

Any idea about what is happening?

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



Re: Showing per-user information in admin

2011-08-13 Thread Isaac XxX
Thanks a lot derek! It's just all I was looking for :)

On Fri, Aug 12, 2011 at 4:03 PM, Derek  wrote:

> On Aug 12, 1:29 pm, Isaac  wrote:
> > Hi dudes,
> >
> > I'm having trouble at finding a solution for my problem. All I want to
> > do is tune django admin to show, for a given user an a given model, only
> > instance related to that user.
> >
> > my pseudocode
> >
> > class User
> >  ...
> > class A
> >  foreign_key User
> >
> > A1 related to User1
> > A2 related to User1
> > A3 related to User2
> >
> > then, I want that User1 was only be able to see A1 and A2, and User2 was
> > only be able to see A3.
> > I know that I can create filters to allow user to filter instances, but
> > all I want is not to allow user to make that decision, it will be only
> > able to see what its related.
> >
> > Any clue about how to use admin in this way?
> >
> > Thanks in advance
>
> See:
>
> http://lincolnloop.com/static/slides/2010-djangocon/customizing-the-admin.html#slide45
> for an example of this. Note how the default queryset is now filtered
> per user.
>
> --
> 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.
>
>

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



Django admin and changes

2010-12-12 Thread Isaac XxX
Hi mates,

i'm having trouble using django admin. Currently, i've finished a project,
and it is the only issue i've open.

When i add or update something through django admin interface, the rest of
the web does not notice it. I need to restart server, and then all behaves
in the normal way (new records are displayed).

I'm not using any cache, so cache is not the problem. I will deploy my
project in a production environment soon, and this is an issue that must be
arranged before this last step.

Thanks 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-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 with translations

2011-01-03 Thread Isaac XxX
Recently, i've found a problem with i18n translations in Django.

All my translations are located inside views functions, templates and some
of them are in a file called forms.py (where i store some of my forms).

The problem arise when I render that forms. First render time, seems that
locale is applied, but next times the same locale is displayed again,
without beign able to change it through locale selector. The rest of
translations are behaving correctly. Any clue about what's happening with
translations outside of views and templates files?

Thank you in advance

Isaac

-- 
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: i18n issue with compilemessages

2011-01-15 Thread Isaac XxX
The problem seems to come from your python path, that is not well defined.

Try to define path in an absolute (not realtive) fashion.

import os

os.environ['PYTHONPATH'] = '/path/to/myproject'
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'

and then, apache should be able to execute compile messages

Greetings,

Isaac

On Fri, Jan 14, 2011 at 7:48 AM, Akash  wrote:

> Following are the environment I am working on:
> 1. Django 1.2.3
> 2. Python 2.4
> 3. wsgi
> 4. Centos 5.4
>
> From apache, I can run makemessage command, and it works. It creates
> the *.po files.
> I use the following statement for this.
> os.system("django-admin.py makemessages -l hi")
>
> But I am unable to do compilemessages from apache. Following are the
> steps which I tried out:
>
> os.system("django-admin.py compilemessages") AND
> subprocess.Popen(["django-admin.py", "compilemessages"])
>
> The command works fine from command line though, when run from project
> location.
> $django-admin.py compilemessages.
>
> but when I do python manage.py shell and then try to run it using
> os.system, I get the following error:
> 
>  File "/usr/lib/python2.4/site-packages/django/core/management/
> commands/compilemessages.py", line 52, in handle
>compile_messages(locale)
>  File "/usr/lib/python2.4/site-packages/django/core/management/
> commands/compilemessages.py", line 10, in compile_messages
>basedirs.extend(settings.LOCALE_PATHS)
>  File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
> line 276, in __getattr__
>self._setup()
>  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> line 40, in _setup
>self._wrapped = Settings(settings_module)
>  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> line 74, in __init__
>raise ImportError("Could not import settings '%s' (Is it on
> sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
> e))
> ImportError: Could not import settings
> 'igp_distribution_manager.settings' (Is it on sys.path? Does it have
> syntax errors?): No module named igp_distribution_manager.settings
> 256
>
> So I am not sure If I should be using os.system for this,  or if there
> is another way to run it from apache.
>
> I am sure I am doing something wrong out here.
> If someone have faced this before and have got some solution, then
> please guide me to get through it.
>
> Regards,
> Akash
>
> --
> 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.
>
>

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



Full Archive of Tutorial Code?

2011-02-16 Thread cousin isaac
Aloha,

I'd like to see what the final code of the tutorial ought to look like
so am wondering if there is an archive somewhere of the completed
project?

Thanks,

Cousin Isaac

-- 
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 work with views like classes

2011-03-16 Thread Isaac XxX
Hi folks,

Currently i'm getting trouble with a single feature in django. When i've
some inheritance in templates, like the following

TemplateA

TemplateB inherits A

TemplateC inherits B
TemplateD inherits B

If I need to define something depending on provided data in TemplateA or
TemplateB, then all views that render TemplateC and TemplateD should provide
the needed data. For example

Template A
...
{% my_var %}
...

How can define "my_var" as global variable for all views that would render
an inherited template of A (or B, or whatelse needed) without recurring to
middlewares?

I've have programmed many time in RoR, and is really simple to define global
vars, or complex inheritance patterns to share common data.

BTW, I though about decorators, implement some "pre-post" processment, but
it's not as clean as i want, because I should get the specific context
(normally RequestContext, but it can be another one in other projects)
rendered by view.

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



Re: How to work with views like classes

2011-03-17 Thread Isaac XxX
Thanks for your responses.

The problem here is that there are some "dirty" solutions to this problem,
but i'm sure there is a good way to proceed with it.

This issue should be really simple to resolve if django make use of classes
instead of functions for views, and then, template would be benefited
receiving that class as parameter, using all provided data from that class
(and its superclasses).

Anyway, I think the django solution to accomplish it is to use middleware
nowadays, like i18n or authentication django plugins do.

On Thu, Mar 17, 2011 at 12:52 PM, Daniel Roseman wrote:

> On Thursday, March 17, 2011 11:35:55 AM UTC, chubz wrote:
>>
>> What I've found as a solution, though I don't know how much it is
>> recommended as a programming practice is to have your variable defined in a
>> "custom" request context and then use that request context instead of the
>> default one.
>>
>> You create you request context and based on the default context then just
>> set it up in settings to be used for the whole site.
>> You can star of on this link than expand to other sites:
>>
>> http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
>>
>> I'm still in the process of gathering all the information, and would like
>> to see a response from a more experienced and versed py/django programmer on
>> this matter.
>>
>> What's the trade off. I know it comes down to : "We're all conseting
>> adults here" so don't do bad stuff or bad stuff will be done unto you. But
>> still, is there any other concerns with this solution?
>>
>> hope this helps.
>>
>
> Why should there be concerns? This is the proper way to define data that
> needs to be sent to every template.
>
> The alternative is to define custom templatetags in the base templates that
> get their own data from wherever they need to get it from.
> --
> DR.
>

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



Selecting a shopping cart

2011-03-21 Thread Isaac XxX
Hi there,

Recently I decided to develop a project that will involve some shopping cart
capabilities (we will sell some products, mainly by using credit card
payment methods).

I've been checking some packages - frameworks, and I can decide wich is
better fit for me. By now, I visited the following:

- LFS: Not a bad choices, but I found it a bit hard to be customized.
- Satchless: Maybe an early stage
- Satchmore: Seems a good choice, but still beign a framework. Maybe an app
is better fitted for me.
- DjangoShop: Seems that people are developing it to be a django built-in,
and it can be an interesting point to use it. However, there is not good
documentation / examples about its use and capabilities

By the way, I wish that selected package offer me a really deep level of
customization, but giving an inicial ready-to-use base to be started from.
Something like LFS do (only install framework and initialize db, and then
you have a shop ready), but being able to customize it in the way I want
(use or not portlets, use custom templates for whole / part of web, activate
shopping cart only in parts of the given web site...)

Thanks in advance,

Greetings

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



E-Commerce - Payment

2011-04-05 Thread Isaac XxX
Hi folks,

after some time spent in investigating django solutions for shopping carts,
i got satchmo as my one. I've developed a custom shopping cart, and this app
is ready to be published. The problem arised when I started to look for some
information about how to manage payments: all information is abstract and
nothing concise. By now, I only want to manage credit card payments
directly, bank transfers and maybe a paypal alternative.

Paypal seems to be clear at how to manage, but I don't know really how to
manage credit card data: can be stored? shall I transfer directly that ssl
channeled data to my bank? shall I manage it handly?
A good documentation source is really wellcome.

I know it is a transversal issue to django, but by now I don't know where to
ask it.

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



Re: E-Commerce - Payment

2011-04-05 Thread Isaac XxX
And then, some advice at how to manage "credit card gateways"? or some
information source about it?

Sorry if this is a beginner question, but is my first e-commerce
application, and had never deal with payments and credit card information.

On Wed, Apr 6, 2011 at 8:37 AM, Kenneth Gonsalves wrote:

> On Wed, 2011-04-06 at 08:25 +0200, Isaac XxX wrote:
> > Paypal seems to be clear at how to manage, but I don't know really how
> > to
> > manage credit card data: can be stored? shall I transfer directly that
> > ssl
> > channeled data to my bank? shall I manage it handly?
>
> are you *sure* you want to handle credit cards by your self? I think
> such things stopped somewhere in the last century - the safest way is to
> use some credit card gateway.
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> 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.
>
>

-- 
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: E-Commerce - Payment

2011-04-05 Thread Isaac XxX
Thanks for advice and responses, I will take a look at payment gateway
solutions, looking for one well fit to me

On Wed, Apr 6, 2011 at 8:56 AM, Mike Ramirez  wrote:

> On Tuesday, April 05, 2011 11:25:12 pm Isaac XxX wrote:
> > Hi folks,
> >
>
> > Paypal seems to be clear at how to manage, but
>
> Use a gateway service, much easier and less costly.
>
> >I don't know really how to  manage credit card data:? can be stored?
>
> Yes but the infrastructure is important on how all this is handled, I
> worked
> for a comapny that channeled its cc payments to an internal oracle server
> which there passed the data to the cc service.  The cc data was routed
> through
> webserver to the internal network, to the app, to the oracle server. all
> over
> an encrypted channel.  From there it was processed and payment
> made/recieved.
> This is the only place oracle existed on the network, the site was driven
> by
> mysql clusters.  The reason for choosing oracle was transaction support,
> they
> were using mysql 4.x. This was in 2004/05. This is also a large company
> with
> lots of resources.
>
> Note, the oracle server was well defended and locked down.
>
> You would want to store everything encrypted and have only trusted folks in
> charge of it. Data security companies have had breeches in security, most
> these being caused by the employees of the data center. This is just the
> tip
> of the iceburg so to speak. It's just easier to use a gateway service.
>
> this recent thread has good information on them with django:
> http://groups.google.com/group/django-
>
> users/browse_frm/thread/45794a54c2e3f466/16288a41d7e628ce?hl=en&lnk=gst&q=Payment+Gateway
>
>
> Mike
>
>
> --
> "A great many people think they are thinking when they are merely
> rearranging
> their prejudices."
> -- William James
>
> --
> 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.
>
>

-- 
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: E-Commerce - Payment

2011-04-06 Thread Isaac XxX
Thank you a lot for your explanation. These concepts are really new for me,
and now seems to be some light on this issue.

On Wed, Apr 6, 2011 at 9:04 AM, Kenneth Gonsalves wrote:

> On Wed, 2011-04-06 at 08:56 +0200, Isaac XxX wrote:
> > And then, some advice at how to manage "credit card gateways"? or some
> > information source about it?
>
> basically a credit card gateway is a company (usually a very big
> company) which will process your credit cards for you. All you need to
> do is to pass them the information like bill amount. The customer will
> interact with them and pay to them. They will then intimate you as to
> the success or failure of the payment and return the customer to your
> site. You then proceed. Usually integration with the gateway is done
> through an integration kit which the company gives you. Basically a few
> scripts written in php or jsp or whatever. They will also give you some
> sort of password and an url to send the info to. If you check the
> archives of this list, you will find any number of recommendations of
> gateways to use. The important thing is that the contract with the
> gateway will be between them and your client, and neither you nor your
> client will ever be held liable for mistakes. (of course if you are
> dealing in leaked cables, the gateway may suddenly ditch you).
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> 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.
>
>

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



Compressing images before saving to database

2016-09-16 Thread Isaac Tetteh
hello,

I have a project where users upload photos of any type. But i want to 
compress the images before saving them. Is pillow the best i can use or Is 
there a built in or 3rd party library to do this. Its link to documentation 
will be appreciated too. 

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 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/8b2ba24a-f339-4cc8-aab4-12a454cbab84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


HOSTING DJANGO

2019-05-13 Thread Isaac Imafidon
Please have anyone here hosted django site using namecheap ? I want to know 
how he or she did it. 

-- 
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/7e4b4e4a-1d0e-40f8-9cff-2ee8533e8457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django form not saving items to database

2019-07-08 Thread KIKOYO ISAAC
Some lessons about templates with django


On Mon, Jul 1, 2019 at 8:29 AM Joe Reitman  wrote:

> Try this:
>
>
> def sell(request):
>  if request.method == 'POST':
>   form = ProductsForm(request.POST)
>   if form.is_valid():
>   print('form is valid')
>   form.save()
>   return redirect('home')
>
>  else:
>  form = ProductsForm()
>  return render(request, 'sell/products_form.html', {'form': form})
>
>
> On Monday, July 1, 2019 at 6:35:31 AM UTC-5, brian wrote:
>>
>> model
>>
>> class Products(models.Model):
>>
>> UNIT = (
>> ('whole', 'whole unit'),
>> ('item', 'per single item'),
>> )
>>
>>
>> # category = models.ForeignKey(Category, related_name='products', 
>> on_delete=models.CASCADE)
>> ProductName = models.CharField(max_length=255)
>> user = models.ForeignKey(User, on_delete=models.CASCADE)
>> ProductDescription = models.TextField(max_length=500, blank=True)
>> price = models.FloatField()
>> location = models.CharField(choices = COUNTIES, max_length=300)
>> # category = models.CharField( choices = CATEGORIES, max_length=10, 
>> default='other')
>> category = models.ForeignKey(Category, related_name='products', 
>> on_delete=models.CASCADE)
>>
>> unitofsale = models.CharField(max_length=10, choices=UNIT)
>> image = models.FileField(upload_to='products_images/', blank=True)
>> sublocation = models.CharField(max_length=100)
>> created= models.DateTimeField(auto_now_add=True)
>> # slug = models.SlugField(max_length=200,db_index=True)
>>
>> class Meta:
>> ordering = ('-created',)
>> # index_together = (('id', 'slug'),)
>>
>> view
>>
>> def sell(request):
>>  if request.method == 'POST':
>>   form = ProductsForm()
>>   form = ProductsForm(request.POST, request.FILES, instance = 
>> request.user)
>>   if form.is_valid():
>>   print('form is valid')
>>   form = form.save(commit=True)
>>   user = request.user
>>   form.user = user
>>   form.save()
>>   return redirect('home')
>>
>>  else:
>>  form = ProductsForm()
>>  return render(request, 'sell/products_form.html', {'form': form})
>>
>> template
>>
>> > enctype="multipart/form-data">
>> {% csrf_token %}
>> 
>> 
>> 
>> Product Name
>> {{  form.ProductName}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Product Price
>> {{ form.price }}
>> 
>> 
>> 
>> 
>> 
>> 
>> County
>> {{  form.location}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Sub-location
>> {{ form.sublocation }}
>> 
>> 
>> 
>> 
>> 
>> 
>> Category
>> {{  form.category}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Unit of Sale
>> {{ form.unitofsale }}
>> 
>> 
>> 
>> 
>> 
>> 
>> Product Description
>> {{  form.ProductDescription}}
>>
>> 
>>
>>
>> 
>> 
>> 
>> Upload Product Image
>> {{ form.image }}
>> 
>> 
>> 
>> 
>> 
>> 
>>  Sell 
>>
>> 
>>
>>
>> 
>> 
>>
>>
>> 
>>
>> {##}
>> 
>>
>>
>> --
> 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/0066c21c-e4c4-43ed-9314-05ec360bbac9%40googlegroups.com
> 
> .
> For more options, visit htt

Re: Django admin application for Android

2019-07-17 Thread KIKOYO ISAAC
great dude!!


On Tue, Jul 16, 2019 at 11:12 PM Derek  wrote:

> Can you explain more about the GOLD plan - what is it and how much does it
> cost?
> Monday, 15 July 2019 12:51:58 UTC+2, Jens-Joris Decorte wrote:
>>
>> Hello Django developers!
>>
>> Being both a Django developer and a heavy user of Django applications, I
>> found myself accessing the admin interface of my Django sites quite often
>> via my smartphone when I am on the road.
>> I was stoked to see the new responsive admin since Django 2.0, which made
>> this process much smoother.
>>
>> Lately I've been developing an *Android app* to access your site's
>> admin. It ports the *responsive design to ALL Django versions* and
>> includes even more features to make the experience very mobile friendly.
>> I have just released this app on the Google Play Store
>>  so
>> feel free to check it out or to share it with other Django developer /
>> users. Any feedback will also be appreciated!
>>
>> The app can be found here:
>> https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin
>>
>> [image: Django-admin-1]
>>  [image:
>> Django-admin-2.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 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/65005436-711a-416f-8812-1ea88cffdf64%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Having issue sending email when model is save and not updated.

2020-03-30 Thread Isaac Imafidon
Am working on an ecommerce project and i want to be able to do two things 
before the model save .
1) I want to update the cost of an item
2) I want to send two  email to the receiver . One when the object just 
gets created while the other when the object gets updated. 
I go through django documentation about pre_save signal and post_save 
signal but don't really understand it.

This is my model
  
class Item(models.Model):
# set of possible order statuses
ITEM_STATUSES = (('PICK UP','PICK UP'), #default
('IN TRANSIT','IN TRANSIT'), # To let ur customer know their order 
is now been process
('DELIVERED','DELIVERED'),#Now delivered to them

)
cost = models.DecimalField(max_digits=10, decimal_places=2)
sender_name = models.CharField(max_length=150)
sender_email = models.EmailField()
receiver_name = models.CharField(max_length=150)
receiver_email = models.EmailField()

Before this model is save i want to update the cost by adding 10% of the 
cost variable to create a new cost that will be shown in the view also i 
want to send email to receiver_email  variable. Once the user update the 
model i want to still add my 10% to the cost and instead of sending email 
one, i will send email two. 
Something like this 

Model as before
if just_created :
   update the cost by 10% before save to the database
   send email 1 carrying the new cost variable and the receiver name to 
receiver email
   then save()
else:
   update the cost by 10% before saving to the database
   send email 2 carrying the new cost variable and the receiver name to 
receiver email
   then save()

Please guys i really need your help in 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9ed1900-b432-49f2-8899-4a96a02eef66%40googlegroups.com.


Re: Deploying my Django App to Heroku

2021-04-21 Thread Nzekwe Isaac
Try running makemigrations and migrations again before deploying again

On Wed, 21 Apr 2021, 22:30 ejike@gmail.com, 
wrote:

> Good day All,
>
> Please I am trying to deploy my App which uses Django/Python as the
> backend and React as the frontend to Heroku but I keep getting this error
> in the attached picture.
>
> Also attached is a screenshot of my Models.py.
>
> I would be very grateful for any assistance.
>
> Kind Regards,
>
> --
> 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/287b1a3a-abc5-4848-ade7-2de414e7b549n%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/CACD%2B4V%3DPmh1OJbEYPW5u6vJG_aovPE-2vnHmwNGQrddbNjqHQg%40mail.gmail.com.


Re: Deploying my Django App to Heroku

2021-04-23 Thread Nzekwe Isaac
I think there's a problem with your database. Try deleting your dbsqlite
database and run migrations a again.

On Fri, 23 Apr 2021, 12:50 Ejike Enyinnaya,  wrote:

> Good day Isaac,
>
> I ran makemigrations and migrate before deploy as seen in my screenshots
> but I am still having the same problem.
>
> Find attached my screenshots.
>
> Please what else should i look at?
> BR,
> Ejike Chiboka
> 0804537; 08166516400
>
>
> On Wed, Apr 21, 2021 at 11:44 PM Nzekwe Isaac  wrote:
>
>> Try running makemigrations and migrations again before deploying again
>>
>> On Wed, 21 Apr 2021, 22:30 ejike@gmail.com, 
>> wrote:
>>
>>> Good day All,
>>>
>>> Please I am trying to deploy my App which uses Django/Python as the
>>> backend and React as the frontend to Heroku but I keep getting this error
>>> in the attached picture.
>>>
>>> Also attached is a screenshot of my Models.py.
>>>
>>> I would be very grateful for any assistance.
>>>
>>> Kind Regards,
>>>
>>> --
>>> 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/287b1a3a-abc5-4848-ade7-2de414e7b549n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/287b1a3a-abc5-4848-ade7-2de414e7b549n%40googlegroups.com?utm_medium=email&utm_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/CACD%2B4V%3DPmh1OJbEYPW5u6vJG_aovPE-2vnHmwNGQrddbNjqHQg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACD%2B4V%3DPmh1OJbEYPW5u6vJG_aovPE-2vnHmwNGQrddbNjqHQg%40mail.gmail.com?utm_medium=email&utm_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/CADe59C9cyhquav%2Be-%3Dgh59Kaj2xDeqmnUg0e4vHtJcX1VK8Ztg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CADe59C9cyhquav%2Be-%3Dgh59Kaj2xDeqmnUg0e4vHtJcX1VK8Ztg%40mail.gmail.com?utm_medium=email&utm_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/CACD%2B4VmnG7WD5%2BrJX7z0ZPjYZ9iPv6Ykc6QZw4Rb6aCDi39veA%40mail.gmail.com.


Re: Multiple websites but one authentication system

2021-08-26 Thread Isaac Imafidon
Thanks everyone that contributed, you guys have really shown me much love.
Am so grateful . Much appreciated. 🙏🙏

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, 26 Aug 2021 at 11:02, Christian Ledermann <
christian.lederm...@gmail.com> wrote:

> I did this in the past by setting up
> https://github.com/jazzband/django-oauth-toolkit as an authentication
> server at login.my-domain.com and then connecting the other websites with
> https://github.com/python-social-auth/social-app-django to it
>
>
>
> On Thu, 26 Aug 2021 at 10:15, Steven Mapes  wrote:
>
>> You could use oauth between the projects. Look into
>> https://django-oauth-toolkit.readthedocs.io/en/latest/ which would
>> enable you to set up domain one as your authentication backend which the
>> others could use
>>
>> On Thursday, 26 August 2021 at 09:46:11 UTC+1 Isaac wrote:
>>
>>> Am trying to understand what you said sir but am still confuse, how will
>>> the domain2.com recognize that this person is a user ? Also how will
>>> the database schema  look like ? Will the two database be connected in a
>>> way ?
>>>
>>> On Thursday, 26 August 2021 at 09:29:47 UTC+1 eugenet...@gmail.com
>>> wrote:
>>>
>>>> My suggestion is that you can create a single entry where after login
>>>> the system redirects users to the home page containing all these domains as
>>>> icons and then the user selects the one he wants.
>>>>
>>>> On Thu, 26 Aug 2021 at 10:18, Isaac  wrote:
>>>>
>>>>> Am working on a company website and there will be having more websites
>>>>> as time goes on, they don't want to be creating authentication system in
>>>>> each of their website. To avoid stress in creating multi account on these
>>>>> platform, there is a need to have one website that will do everything
>>>>> relating to authentication and authorization, just Google is.
>>>>>  For example we will have domain1.com which will handle everything
>>>>> relating to  authentication and authorization(Signup,Signin,Password 
>>>>> reset,
>>>>> Password change, Logout) while other domains like domain2.com,
>>>>> domain3.com, domain5.com etc will be falling back to domain1.com for
>>>>> authenticating users. Plz any suggesting on how i can do this will be
>>>>> highly 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...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>> --
>>>> *TUYIZERE Eugene*
>>>>
>>>>
>>>>
>>>> *Msc Degree in Mathematical Science*
>>>>
>>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>>>> Garden-Lime, Cameroon*
>>>>
>>>> Bsc in Computer Science
>>>>
>>>> *UR-Nyagatare Campus*
>>>>
>>>> Email: eugene@aims-cameroon.org
>>>>eugenet...@gmail.com
>>>>
>>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>>
>>> --
>> 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/29ad46bc-86ce-45bc-a83a-441fe2208e6an%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/29ad46bc-86ce-45bc-a83a-441fe2208e6an%40googlegroups.com?utm_medium=email&utm_source=footer>
&g

Re: Multiple websites but one authentication system

2021-08-26 Thread Isaac Imafidon
Thanks specially sir

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, 26 Aug 2021 at 11:02, Christian Ledermann <
christian.lederm...@gmail.com> wrote:

> I did this in the past by setting up
> https://github.com/jazzband/django-oauth-toolkit as an authentication
> server at login.my-domain.com and then connecting the other websites with
> https://github.com/python-social-auth/social-app-django to it
>
>
>
> On Thu, 26 Aug 2021 at 10:15, Steven Mapes  wrote:
>
>> You could use oauth between the projects. Look into
>> https://django-oauth-toolkit.readthedocs.io/en/latest/ which would
>> enable you to set up domain one as your authentication backend which the
>> others could use
>>
>> On Thursday, 26 August 2021 at 09:46:11 UTC+1 Isaac wrote:
>>
>>> Am trying to understand what you said sir but am still confuse, how will
>>> the domain2.com recognize that this person is a user ? Also how will
>>> the database schema  look like ? Will the two database be connected in a
>>> way ?
>>>
>>> On Thursday, 26 August 2021 at 09:29:47 UTC+1 eugenet...@gmail.com
>>> wrote:
>>>
>>>> My suggestion is that you can create a single entry where after login
>>>> the system redirects users to the home page containing all these domains as
>>>> icons and then the user selects the one he wants.
>>>>
>>>> On Thu, 26 Aug 2021 at 10:18, Isaac  wrote:
>>>>
>>>>> Am working on a company website and there will be having more websites
>>>>> as time goes on, they don't want to be creating authentication system in
>>>>> each of their website. To avoid stress in creating multi account on these
>>>>> platform, there is a need to have one website that will do everything
>>>>> relating to authentication and authorization, just Google is.
>>>>>  For example we will have domain1.com which will handle everything
>>>>> relating to  authentication and authorization(Signup,Signin,Password 
>>>>> reset,
>>>>> Password change, Logout) while other domains like domain2.com,
>>>>> domain3.com, domain5.com etc will be falling back to domain1.com for
>>>>> authenticating users. Plz any suggesting on how i can do this will be
>>>>> highly 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...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/efe93e26-23cb-4557-a763-1c2790bf541bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>> --
>>>> *TUYIZERE Eugene*
>>>>
>>>>
>>>>
>>>> *Msc Degree in Mathematical Science*
>>>>
>>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>>>> Garden-Lime, Cameroon*
>>>>
>>>> Bsc in Computer Science
>>>>
>>>> *UR-Nyagatare Campus*
>>>>
>>>> Email: eugene@aims-cameroon.org
>>>>eugenet...@gmail.com
>>>>
>>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>>
>>> --
>> 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/29ad46bc-86ce-45bc-a83a-441fe2208e6an%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/29ad46bc-86ce-45bc-a83a-441fe2208e6an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Best Regards,
>
> Christian Leder

Re: Looking for co founders

2021-09-03 Thread Isaac Moctezuma
también

-- 
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/CABqUN3GKmoDQ7OjVG9XdG3UYwzdAfoO_toizb-b7Ook%2B7LUL_w%40mail.gmail.com.


I think I've found a bug in the Dev server

2019-08-01 Thread Isaac Way
If I send a request to an invalid URL, the NEXT request sent to that URL is 
processed incorrectly by Django. I've ruled out any client side shenanigans

I've detailed it in a stack overflow question: 
https://stackoverflow.com/questions/57313270/django-dev-server-processing-the-same-ajax-request-inconsistently

-- 
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/61771d7e-bf34-4854-a26a-587b78dae3ee%40googlegroups.com.


Re: Start-up project for fresher student:

2019-08-03 Thread KIKOYO ISAAC
Let's do an e-commerce project

On Sat, Aug 3, 2019, 14:35 Desh Deepak  wrote:

> Yes, sure
>
> On Sat, 3 Aug 2019, 15:54 SHUBHAM .SINGH. RATHORE, <
> shubhamsingh...@gmail.com> wrote:
>
>> Hey I am interested in this startup project
>>
>> On Tue, 23 Jul 2019 12:48 am iampawam goswami, <
>> callmekumarpa...@gmail.com> wrote:
>>
>>> Hello everybody
>>> I what starts my django project what will be the best startup
>>> application for practices to fresher...Please reply me.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAM%3DXy2p1SiSL2WoPvCc8g_%3DB_zaojf%3DfWkDBA_dpDfwd4gtgPQ%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/CALkhXJVc%3DFFdrqCXdaoQ%3DJTavjywG%2BjuFAg0xxaDS7cw1Dk_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/CAJ0m4xhmY_7tG25044v%3D0EqxQz-4T%2BHDPWNRgtwzxdv1oF09tw%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/CAKXkcrcN8McDHGKkbGS9Bkx5mZszXee2_zAH2i1FdbjKw3rp1w%40mail.gmail.com.


How to filter using foreign key and render on HTML

2019-09-06 Thread Isaac Ndutumo
Am developing a web app where i want to view per client details 

view.py 
class DirectorListView(ListView):
model = Director
paginate_by = 10

def get_queryset(self):
query = self.request.GET.get('q')
if query:
search = Director.objects.filter(first_name__icontains=query)
return search
else:
return Director.objects.order_by('first_name')

model.py

class  Client(models.Model):
name = models.CharField(max_length=200)
registration_number = models.CharField(max_length=200)
vat_number = models.CharField(max_length=200,null=True,blank=True)
ownership = 
models.CharField(max_length=200,choices=choices,default='Private')
year = models.CharField(max_length=200)
number_year = models.IntegerField(null=True,blank=True)
country = models.CharField(max_length=200)
sector = 
models.ForeignKey(Sector,related_name='client',on_delete=models.SET_NULL,null=True)
location = models.CharField(max_length=200)
postal_address = models.CharField(max_length=200)
email = models.EmailField()
website = models.CharField(max_length=200,null=True)
mobile_number = models.CharField(max_length=200)
contact_person = models.CharField(max_length=200)
contact_number = models.CharField(max_length=200)
date_time = models.DateField(default=timezone.now)
registration_certificate = 
models.FileField(upload_to='certificate/%Y/%m/%d/',null=True,blank=True)
vat_certificate = 
models.FileField(upload_to='vat/%Y/%m/%d/',null=True,blank=True)

def __str__(self):
return self.name

class Director(models.Model):
client = models.ForeignKey(Client, 
related_name='director',on_delete=models.SET_NULL,null=True)
first_name = models.CharField(max_length=200)
last_name = models.CharField(max_length=200)
phone_number = models.CharField(max_length=200)
email = models.EmailField()
id_number = models.CharField(max_length=200,null=True,blank=True)
postal_address = models.CharField(max_length=200,null=True,blank=True)
position = models.CharField(max_length=200,null=True,blank=True)
kra = models.FileField(upload_to='kra/%Y/%m/%d/',null=True,blank=True)
national_id = 
models.FileField(upload_to='ids/%Y/%m/%d/',null=True,blank=True)


def __str__(self):
return "{}  {}".format(self.first_name, self.last_name)

client_detail.html

{% extends 'base.html' %}
{% block content %}
{% load humanize %}



 
 Name {{ client.name }}  
 Year of operation {{client.number_year}} 





 
 Company No {{client.registration_number}} 
 Email {{client.email}} 




 
 Documents   VAT   Registration Certificate 
 
 Country {{client.country}} 










  ASSESTS


  BANK 
STATEMENT


   
OFF-TAKERS 


DIRECTORS 








 


Turnover   
Expenses  
Income
Currency
Year
Employees


 {% for financial in client.financial.all %}

 
{{ financial.turnover|intcomma}}  
{{financial.expenses|intcomma}}  
{{ financial.income|intcomma }}
{{financial.currency}}
{{financial.year}}
{{financial.number_employees}}


{% endfor %}









Add Financials 
Add Assets
Add Directors 
Add Bank 
Statements
Add 
Off-Takers
 

 








{% endblock %}



When i click on DIRECTORS it displays all directors of all the clients i 
have, how can filter based on client pk?


-- 
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/2d9f3d28-71f6-4e50-9cf7-8b9399f40262%40googlegroups.com.


Bulk SMS website using django

2020-02-20 Thread Isaac Imafidon
I have a project to develop a bulk sms website using django, but i have not 
develop this kind of website before. Also the client want to be able to 
have users that log in and buy credit that they will use to send sms to any 
part of the world. Also i don't know any recommended company to buy the 
reseller at an affordable price that will make my client be able to make 
profit from he's business. I really need you guys support on this, also if 
anyone have develop this kind of website before and just brief me on how to 
go about it.

-- 
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/1707833a-44c2-43f9-8f66-c7fca1a2540d%40googlegroups.com.


Re: Python Django Training

2020-02-21 Thread Isaac Ndutumo
Hello, I am interested in learning Python with you.  Add me

On Fri, Feb 21, 2020 at 4:42 PM Bharati Nilam 
wrote:

> Hi,
> I also from Hyderabad and I'm also interested in the training. please tell
> me how to join?
>
> Regards,
> Bharati
>
> On Thu, 20 Feb, 2020, 6:19 PM Thiagu Palaniappan, <
> thiagarajan@gmail.com> wrote:
>
>> I'm also interested. Please add me in the group.
>>
>>
>> Thanks & Regards,
>> Thiagu
>>
>> On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
>> wrote:
>>
>>> I am interested also. Please let me know the details.
>>>
>>> On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:
>>>
>>>> Hi,
>>>>
>>>> I am from Hyderabad. I am Python Developer by Profession. I am eager
>>>> take up any Python , Django Training (online Preferrable or Weekends).
>>>> Members who require can contact me or share me  there idea.
>>>>
>>>> Regards,
>>>> Srikanth.K
>>>>
>>>> --
>>>> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%40mail.gmail.com?utm_medium=email&utm_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/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>>
>> Thanks & Regards,
>>
>> *Thiagu Palaniappan*
>>
>> M +91 (0) 9994318799
>>
>> *DXC Technology*
>> 8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
>> post, Ramapuram, Chennai - 600 089.
>>
>> dxc.technology <http://www.dxc.technology/> / Twitter
>> <https://twitter.com/dxctechnology> / Facebook
>> <https://www.facebook.com/DXCTechnology/> / LinkedIn
>> <https://www.linkedin.com/company/dxctechnology>
>>
>> --
>> 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/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.gmail.com?utm_medium=email&utm_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/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Kind Regards
Isaac

-- 
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/CAMje%2B21OuhTCJiBWZsxCf_%2BQddy97f8piyi2oxSY265g6JY6xQ%40mail.gmail.com.


Re: Bulk SMS website using django

2020-02-21 Thread Isaac Imafidon
What is the country code ? I tried to send whatsapp message but the number 
is not identified, because no country code is included. Can you please 
repost the number with the country code ?
 

On Friday, 21 February 2020 14:26:08 UTC+1, Jani Eric wrote:
>
> Hello. Text me on this number: 03351931286 .this is my what's app no
>
> On Fri, Feb 21, 2020, 12:52 PM Isaac Imafidon  > wrote:
>
>> I have a project to develop a bulk sms website using django, but i have 
>> not develop this kind of website before. Also the client want to be able to 
>> have users that log in and buy credit that they will use to send sms to any 
>> part of the world. Also i don't know any recommended company to buy the 
>> reseller at an affordable price that will make my client be able to make 
>> profit from he's business. I really need you guys support on this, also if 
>> anyone have develop this kind of website before and just brief me on how to 
>> go about it.
>>
>> -- 
>> 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/1707833a-44c2-43f9-8f66-c7fca1a2540d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/1707833a-44c2-43f9-8f66-c7fca1a2540d%40googlegroups.com?utm_medium=email&utm_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/f91eba88-b4a9-44f3-b59d-69576ab8ccc5%40googlegroups.com.


Re: Bulk SMS website using django

2020-02-21 Thread Isaac Imafidon
Thanks alot for your support. I have visited Twilo website, and see their
packages its very good. Thanks alot i think i will go with Twilo.

On Fri, 21 Feb 2020 at 15:20, Jody Fitzpatrick <
jody.lee.fitzpatr...@gmail.com> wrote:

> Hi, look at Twilio. They seem to be a great choice, cost is going to vary
> - just charge extra per message on top of what they charge. Building out
> this service on your own will be difficult without the help of a third
> party to send the messages.
>
> --
> 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/cdcfc982-6504-4eee-917d-b2414c6a89d7%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/CADzUEaibv%3DAmjz08%2B%3DeM2agmfWZt2kqSP0BD-e%2BSQcdEkqPTDw%40mail.gmail.com.


Selecting all and posting

2020-02-23 Thread Isaac Ndutumo
Am working on a hospital system where the billing model requires users to 
select varies items from the bill list and post them by creating a receipt 
or an invoice. Am new in JavaScript programming combined with Django.

Any help on below tasks will be highly appreciated 

   1. Select all or few and post either as a receipt or invoice. 
   2. Show total of selected items dynamically 


  Find attached capture for bill view.

-- 
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/1b59fa26-910c-4fb6-81c4-a7b38291abf7%40googlegroups.com.


How to model postal address in django ???

2012-03-30 Thread Ariel Isaac Romero Cartaya
Hi everybody, is there any model in Django to represent postal
address, I mean is there already models like Countries, provinces and
cities with theirs relations to make this, and how to model the others
attributes: streets, postal code, between streets and perhaps latitude
and longitude  to use google maps 

How hope you can help me.
Any help would be appreciated.

Regards,
Ariel

-- 
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 model postal address in django ???

2012-04-02 Thread Ariel Isaac Romero Cartaya
Thank you very much for your answer Mario.

Regards,


On Sun, Apr 1, 2012 at 4:02 AM, Mario Gudelj  wrote:
> You can use django-countries for county names and codes
> -http://code.google.com/p/django-countries/
> or https://bitbucket.org/smileychris/django-countries
>
> There are probably more apps out there.
>
> For geo-coding you can try http://geodjango.org/. It's awesome but it may be
> a bit hard to implement. If you find it a bit hard you can always use
> Google http://djangosnippets.org/snippets/2241/. Note that you only get
> 2 free lat long lookups a day with google.
>
> Cheers,
>
> -m
>
>
>
>
> On 31 March 2012 03:54, Ariel Isaac Romero Cartaya 
> wrote:
>>
>> Hi everybody, is there any model in Django to represent postal
>> address, I mean is there already models like Countries, provinces and
>> cities with theirs relations to make this, and how to model the others
>> attributes: streets, postal code, between streets and perhaps latitude
>> and longitude  to use google maps 
>>
>> How hope you can help me.
>> Any help would be appreciated.
>>
>> Regards,
>> Ariel
>>
>> --
>> 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.
>>
>
> --
> 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.

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



I need a django application to embed a chat javascript in admin site

2012-05-23 Thread Ariel Isaac Romero Cartaya
Hi everybody,

I need a django application to embed a chat javascript in the admin app of
my web site, I would like when the users are authenticated be able to
contact by chat any other user authenticated in the admin site.

How could I do this ???
Is there an application to make this ???

Regards,
Ariel

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



Working with static files

2019-10-17 Thread ISAAC NELSON S.B. KARGBO
Hello everyone, i am new to Django and i am learning to develop a 
"todo_list app", but i have a problem with my css static files.
Please help me on how to do about it.

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/d85a4531-bca7-4912-8cba-e01620c8769a%40googlegroups.com.