Re: Django, GraphQL and React Native

2020-06-12 Thread ADEWALE ADISA
can you show your graphene code ?

On Fri, 12 Jun 2020, 15:39 ndifreke umoren,  wrote:

> @Waled thanks for your response. That's exactly what I did but I keep
> having no data sent back. I tested my API with graphiql and it works
> perfectly but on React Native, I keep getting "Network Error: Network
> failed" error. I'd love all the help I can get solving this problem. Thanks.
>
> On Friday, June 12, 2020 at 12:56:34 AM UTC+1, Walid Kambagha wrote:
>>
>> You can use Apollo the same way you’d use with React to connect to the
>> API.
>>
>> On Thu, 11 Jun 2020 at 22:21, ndifreke umoren 
>> wrote:
>>
>>> Hello everyone. I am working on a React Native mobile app with a GraphQL
>>> endpoint I built using Python Django. Please I need help connecting the API
>>> with the client.
>>>
>>> --
>>> 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/250b31a2-b276-4d75-a93a-b1e004491e55o%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/0e4decb3-7f78-466f-96ac-8d01f474b3f7o%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/CAMGzuy_BB_N6ypuCwQwpGHCwT%2BCsCGK8JWroENZtd2_Wj6mycA%40mail.gmail.com.


Re: Django Admin CSS Not loading

2018-07-11 Thread ADEWALE ADISA
UC browser doesn't render some website very well. Though uc browser is fast
and save bandwidth,  it's like it doesn't 100% compatible with css and js
rules.  So this not django issue
On Jul 11, 2018 3:07 PM, "Kayode Oladipo"  wrote:

> I have this problem specific to UC Browser;
> App related CSS are being loaded but the ones for Django admin panel are
> not.
> They load well in Internet Explorer but UC is my preferred browser.
>
> Anyone know how to fix this?
> Thanks for your help.
>
> Cheers from Nigeria.
>
> --
> 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/CA%2BARzD_Gio9JfxNC7TELowVKWBr8Omm%
> 3Dcv4Q6q36UQEiyWmnDQ%40mail.gmail.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/CAMGzuy9S%2B8Zxau7NJDsOgzWKzRk-UKdDRC2pDLus_FM-mVr80g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hosting a django/python website/web app

2017-11-03 Thread ADEWALE ADISA
Is Hostigator support django app ?
On Nov 3, 2017 5:34 PM, "Basilaik"  wrote:

I have completed my my website using django/python, and got a hosting
account with hostgator, i tried uploading it to the cpanel, but i dont know
how to do the configuration.
has any one ever hosted a website done with django on cpanel?

-- 
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/7980b2a1-dc81-4b3b-bf80-8ec67eea3ec4%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/CAMGzuy9LLYBgKWN7nxutLrLweugJsRo6egSCKTndjYe5%3DXLXpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Creating login page with Django using HTML and CSS

2017-10-09 Thread ADEWALE ADISA
You can also check the following link:

https://simpleisbetterthancomplex.com/tutorial/2017/02/18/how-to-create-user-sign-up-view.html
On Oct 9, 2017 3:34 AM, "Tunde Bakare"  wrote:

> Hello,
>
> I am new to Django. And i have gone through materials for steps and ways
> to create Login page for an application with Django using HTML and CSS.
>
> Anyone has materials and easy step by step i can use to learn.
>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+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/d10571fe-e232-4aa7-851d-dbc5c4a18012%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/CAMGzuy__wCGd1vPLwwiME-qB3GEDWB%2B7FRmfwq5cda7deKbMjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.core.exceptions.ImproperlyConfigured:

2017-10-02 Thread ADEWALE ADISA
are u sure u are running the command from the root of your project where
the folder "website" and file manage.py is ?
try to cd to your project root, then run
python manage.py runserver
On Oct 2, 2017 6:51 AM, "harsh sharma"  wrote:

> i am getting this error whenever i m trying to run django-admin runserver
>
> django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but
> settings are not configured. You must eit
> her define the environment variable DJANGO_SETTINGS_MODULE or call
> settings.configure() before accessing settings.
>
> my wsgi file
>
> import os
> from django.conf import settings
> from django.core.wsgi import get_wsgi_application
>
> settings.configure(DEBUG=True)
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")
>
> application = get_wsgi_application()
>
> --
> 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/568cdb67-2a6f-4e3b-9ba8-842d0c721e7a%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/CAMGzuy-fCGft6__LEfU1JaieorsLCJZE---PRNQkCVBKBRdUBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: figuring out bug with django cookies: not working on server

2017-10-02 Thread ADEWALE ADISA
can you show the code where you set the cookie before retrieving it
On Oct 2, 2017 6:35 PM, "Samuel Muiruri"  wrote:

> I have a site that relies on checking if a cookie exists for service_id and
> if it does checks if you can upload files for service... this works nicely
> offline but on pushing changes to server it created a bug where even though
> the cookie can be seen (on the dev console)
>
> [image: enter image description here]
> 
>
> and I assign the cookie to a context variable which ends up saying None even
> though I can see the cookie from the dev console.
>
> class PictureCreateView(CreateView):
> model = Picture
> fields = "__all__"
> template_name = 'accounts/upload-file.html'
>
> def get_context_data(self, **kwargs):
>
> context = super(PictureCreateView, self).get_context_data(**kwargs)
> context['service_id'] = self.request.COOKIES.get('service_id', None)
>
> return context
>
> on the template
>
> {% if service_id %}
> #display form{% else %}
> Sorry it seems you're missing some vital data needed before ...
> {% endif %}
>
> any ideas?
>
> here's a screen record (local & live): https://youtu.be/aud59Avp1aI
>
> --
> 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/fd1f686b-dded-4aaa-8f6b-274419afa0a1%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/CAMGzuy-N_znhTLZqD0zc4ED78pFNAgCH3ns17eYR3ZR0xOrcyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django select filter

2017-09-12 Thread ADEWALE ADISA
you can make it interesting by using ajax to post the selected month to
your view which u ve already written to accept the month variable. use the
variable to filter the necessary queryset in your view, then return the
response in json format. you can now collect it from your ajax response,
use javascript to dynamically update your table.
On Sep 13, 2017 12:43 AM, "sum abiut"  wrote:

> Hi,
> I am working on an app which has a dropdown/select option which contain
> months of the year. What i want to accomplished is when the user click on
> the drop down and select a particular  month of the year the app should
> display a table filter by that particular   selected month.
>
>
> Please point me to the right direction to get me started.
>
> cheer
>
> --
> 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/CAPCf-y5JQoekZfW%3DymeNJHyXQj6ExJHweENW2gAfQiBh
> nXg6%3DA%40mail.gmail.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/CAMGzuy_crJPMm%2Bh8DyhGHAc5AqtseM6e5PMp55BYybfP1X7L6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django hosting / Email Account

2017-08-25 Thread ADEWALE ADISA
Thanks all. Am able to create 5 mail account after buying hosting service
despite the fact that i don't want to host my application with them because
they don't provide python hosting unless i purchase VPS. so i will be using
their mail and domain, then host my app on pythonanywhere.com.


On Fri, Aug 25, 2017 at 3:23 AM, wang sheng <wans...@gmail.com> wrote:

> I recommend to use  some "email cloud service " such as "mailgun" or "
> sendcloude.com "
>
> 2017-08-25 4:24 GMT+08:00 ADEWALE ADISA <solixzsys...@gmail.com>:
>
>> thanks Guerrero,
>> i too taught so, i have sent mail to my registrar but they have not
>> reply. before when am hosting php site, i use to host the site with the
>> registrar, so the will give me link to cpanel where i can create email
>> account.
>> but now this registrar the not give me link to cpanel, that what is not
>> clear to me
>> On Aug 24, 2017 5:23 PM, "Gerardo Palazuelos Guerrero" <
>> gerardo.palazue...@gmail.com> wrote:
>>
>>> hi,
>>> For sure not from pythonanywhere.com
>>>
>>> Your domain registrar may have some free emails accounts (like godaddy
>>> which allows you to create email accounts for your domain purchased with
>>> them).
>>>
>>> Otherwise, you will have to buy the service (like in gmail for business
>>> or in fastmail.com)
>>>
>>>
>>>
>>> --
>>> Gerardo Palazuelos Guerrero
>>>
>>>
>>> On Thu, Aug 24, 2017 at 10:12 AM, ADEWALE ADISA <solixzsys...@gmail.com>
>>> wrote:
>>>
>>>> Good day friends;
>>>> Please help me to clarify this issue:
>>>>
>>>> I just purchase a domain name , let say abc.com.
>>>> I want to host my django application on pythonanywhere.com using my
>>>> domain name abc.com.
>>>> Now i want to create up to three email accout for my clients using my
>>>> domain name e.g 1...@abc.com, 4...@abc.com.
>>>> Please where would i create this mail account ? Is it from my domain
>>>> registrant  where i purchase abc.com or pythonanywhere.com ?
>>>>
>>>> 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/ms
>>>> gid/django-users/CAMGzuy-m%3DH5evUgvzDKRoX2mOOik82TOsUNU8_%2
>>>> BZ1xpbX1PKog%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAMGzuy-m%3DH5evUgvzDKRoX2mOOik82TOsUNU8_%2BZ1xpbX1PKog%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/CAJ8iCyMM%3DdS%3DwwpWjvmG7f7Yp6EQ_tv4o_w9dj
>>> c8Ec3O1FA5Jg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAJ8iCyMM%3DdS%3DwwpWjvmG7f7Yp6EQ_tv4o_w9djc8Ec3O1FA5Jg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/CAMGzuy-Lw%3DtumtdFaRwnbpAeVrLg0X9%2Bp1KG%
>> 2B5zJhEveGNJhiQ%40mail.gmail.com
>> &

Re: django hosting / Email Account

2017-08-24 Thread ADEWALE ADISA
thanks Guerrero,
i too taught so, i have sent mail to my registrar but they have not reply.
before when am hosting php site, i use to host the site with the registrar,
so the will give me link to cpanel where i can create email account.
but now this registrar the not give me link to cpanel, that what is not
clear to me
On Aug 24, 2017 5:23 PM, "Gerardo Palazuelos Guerrero" <
gerardo.palazue...@gmail.com> wrote:

> hi,
> For sure not from pythonanywhere.com
>
> Your domain registrar may have some free emails accounts (like godaddy
> which allows you to create email accounts for your domain purchased with
> them).
>
> Otherwise, you will have to buy the service (like in gmail for business or
> in fastmail.com)
>
>
>
> --
> Gerardo Palazuelos Guerrero
>
>
> On Thu, Aug 24, 2017 at 10:12 AM, ADEWALE ADISA <solixzsys...@gmail.com>
> wrote:
>
>> Good day friends;
>> Please help me to clarify this issue:
>>
>> I just purchase a domain name , let say abc.com.
>> I want to host my django application on pythonanywhere.com using my
>> domain name abc.com.
>> Now i want to create up to three email accout for my clients using my
>> domain name e.g 1...@abc.com, 4...@abc.com.
>> Please where would i create this mail account ? Is it from my domain
>> registrant  where i purchase abc.com or pythonanywhere.com ?
>>
>> 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/ms
>> gid/django-users/CAMGzuy-m%3DH5evUgvzDKRoX2mOOik82TOsUNU8_%
>> 2BZ1xpbX1PKog%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMGzuy-m%3DH5evUgvzDKRoX2mOOik82TOsUNU8_%2BZ1xpbX1PKog%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAJ8iCyMM%3DdS%3DwwpWjvmG7f7Yp6EQ_tv4o_
> w9djc8Ec3O1FA5Jg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJ8iCyMM%3DdS%3DwwpWjvmG7f7Yp6EQ_tv4o_w9djc8Ec3O1FA5Jg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


django hosting / Email Account

2017-08-24 Thread ADEWALE ADISA
Good day friends;
Please help me to clarify this issue:

I just purchase a domain name , let say abc.com.
I want to host my django application on pythonanywhere.com using my domain
name abc.com.
Now i want to create up to three email accout for my clients using my
domain name e.g 1...@abc.com, 4...@abc.com.
Please where would i create this mail account ? Is it from my domain
registrant  where i purchase abc.com or pythonanywhere.com ?

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/CAMGzuy-m%3DH5evUgvzDKRoX2mOOik82TOsUNU8_%2BZ1xpbX1PKog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


facebook share

2017-07-11 Thread ADEWALE ADISA
hi guys,
I am having issues with django-social-share. Am trying to add facebook
share to my django app using django-social-share, but the issue is i just
want to share a section of my page like div or article.
The problem is its share the whole page on facebook instead of section.
Please any help ?

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


Re: django WYSIWYG editor

2017-06-15 Thread ADEWALE ADISA
thanks, i will look at the documentation
On Jun 15, 2017 3:32 PM, "Karol Bujaček" <l...@fossilgroup.net> wrote:

> On 06/15/2017 04:16 PM, ADEWALE ADISA wrote:
>
>>
>> Pls, I need a recommendation for the best easy to implement editor that
>> non technical user can use to add image, table to document in django admin
>> textarea.
>> I want my users to be using django admin as there backend when creating
>> blog content and they needed the following functionality:
>>
>> 1. inserting table to article
>> 2. insering images
>> 3. adding color to the table background
>>
>> All this functions without user  editing html
>>
>> Thanks.
>>
>>
>>
> Hello,
>
> You can try django-tinymce (check https://github.com/aljosa/django-tinymce
> for documentation and example). It is quite easy to use, you've use only a
> "HTMLField()" in your model, instead of Textarea etc.
>
> Karol
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-users/06ff56d4-82ac-39c1-3f29-0bcb79329eeb%40fossilgroup.net.
> 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/CAMGzuy9ARUZMRaxiA_9BZWk0JowRKjRWTzb_tFdVsLFBEUdDyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django WYSIWYG editor

2017-06-15 Thread ADEWALE ADISA
Pls, I need a recommendation for the best easy to implement editor that non
technical user can use to add image, table to document in django admin
textarea.
I want my users to be using django admin as there backend when creating
blog content and they needed the following functionality:

1. inserting table to article
2. insering images
3. adding color to the table background

All this functions without user  editing html

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


Re: SESSION_EXPIRE_AT_BROWSER_CLOSE

2017-01-22 Thread ADEWALE ADISA
thanks again Mr James.
am able to solve the problem now by running the management command "python
manage.py clearsessions".
This pratically delete all the session stored on the django session
database.

so SESSION_EXPIRE_AT_BROWSER_CLOSE behave as it should now.
On Jan 22, 2017 9:41 AM, "James Bennett"  wrote:

> Make sure you're not looking at users who already had a session cookie set
> before you changed the setting. Existing cookies might not get immediately
> rewritten to have the shorter expiration.
>
> --
> 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/CAL13Cg-ycUN1cjiy_sbtdvRYa0sF4KMVHUK%
> 2B%2BTipC1GCy0XWww%40mail.gmail.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/CAMGzuy9ncC3hq0D0j%3DYkXF%3DK%2B5is5COnThs2Y5_cq6sXZAz7_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: SESSION_EXPIRE_AT_BROWSER_CLOSE

2017-01-22 Thread ADEWALE ADISA
Thanks Mr James for the urgent reply.
Even when the server and the user pc are restarted after the setting, the
situation is the same.
from the django docs; there is a section that goes :

Note

Some browsers (Chrome, for example) provide settings that allow users to
continue browsing sessions after closing and re-opening the browser. In
some cases, this can interfere with the SESSION_EXPIRE_AT_BROWSER_CLOSE
setting and prevent sessions from expiring on browser close. Please be
aware of this while testing Django applications which have the
SESSION_EXPIRE_AT_BROWSER_CLOSE setting enabled.

Maybe this is what is causing the issue. but i just think that people must
have a way of going around this problem.
On Jan 22, 2017 9:41 AM, "James Bennett"  wrote:

> Make sure you're not looking at users who already had a session cookie set
> before you changed the setting. Existing cookies might not get immediately
> rewritten to have the shorter expiration.
>
> --
> 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/CAL13Cg-ycUN1cjiy_sbtdvRYa0sF4KMVHUK%
> 2B%2BTipC1GCy0XWww%40mail.gmail.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/CAMGzuy-oT2j8JxGDMrfda7-wSnXpm2jeQ-v2h%3DXrPNUxUUqerA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


SESSION_EXPIRE_AT_BROWSER_CLOSE

2017-01-22 Thread ADEWALE ADISA
Good day;
Please i need help on the issues am facing on
SESSION_EXPIRE_AT_BROWSER_CLOSE django settings.py. In my setting file i
have:

SESSION_EXPIRE_AT_BROWSER_CLOSE = True

but unfortunately, whenever my users close there browsers and open it
again, they are login automatically, which shows that the session did not
expire.
Am facing this issue on all browers.
On chrome, when i went to the settings and manually choose to expire
cookies, the  SESSION_EXPIRE_AT_BROWSER_CLOSE worked.
In deployed application, i can not be asking my users to be changing
cookies setting in their browsers.
Please how can i achieve session expire after closing browser irrespective
of user browser settings. Or if there is javasctipt snippet i can use to
control this.

Thanks in advance.
soliu - fxSoftlogix

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


Re: Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread ADEWALE ADISA
Restart the server
On Dec 22, 2016 4:27 PM, "pradam programmer" 
wrote:

> Hi Guys,
> I am unable to rectify this error I am doing the following things:
> 1. I am running the project in django 1.7 later upgraded to 1.7.11 to
> check whether I fix the issue but no use. :(
> 2. In settings.py I commented the allowed_host = [*] still no use :(
> I don't know why this error is coming..?
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+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/CAGGVXBN%2BkjQZeyr2gTMEQm8NLJA8s1MeLJ7t
> Gsjh__wA5D-LLA%40mail.gmail.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/CAMGzuy8QL1FEodO%2BW30g_c9w5z801jMrgdaM6y90woraSjj6KQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: init queryset return 'expected string or buffer'

2016-11-13 Thread ADEWALE ADISA
May be you should show your reservation model class. Because there, if you
make your food_name field to be equal to a foreignKey(Food), your form
class would be easier to write
On Nov 13, 2016 12:08 AM, "احسان خراسانی"  wrote:

> Hi
> my queryset return this error
>
> expected string or buffer
>
>
>
> class Reserve(forms.ModelForm):
> food_name = forms.ModelChoiceField(queryset=Food.objects.all())
>
> def __init__(self, year=None, month=None, day=None, serve_date=None, *
> args, **kwargs):
> super(Reserve, self).__init__(*args, **kwargs)
> self.year = year
> self.month = month
> self.day = day
> self.serve_date = serve_date
> date_stamp =  time.strptime(serve_date,"%Y-%m-%d")
> serve_date = datetime.date(*date_stamp[:3])
> self.fields['food_name'].queryset = Food.objects.filter(
> serve_date__year = year, serve_date__month = month,
> serve_date__day = day)
>
> class Meta:
> model = Reservation
> fields = ('food_count', 'food_name')
>
>
> --
> 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/0fac06b1-181c-45cf-8ba2-871f6a4beed7%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/CAMGzuy9f9WSULs4G_%3Dy8Ke7Ra4Z9RcRETKEh-0e-nH7vC-5jEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: init queryset return 'expected string or buffer'

2016-11-13 Thread ADEWALE ADISA
I think the argument to modelchoicefield  should be dictionary of string
not query set object.
On Nov 13, 2016 12:08 AM, "احسان خراسانی"  wrote:

> Hi
> my queryset return this error
>
> expected string or buffer
>
>
>
> class Reserve(forms.ModelForm):
> food_name = forms.ModelChoiceField(queryset=Food.objects.all())
>
> def __init__(self, year=None, month=None, day=None, serve_date=None, *
> args, **kwargs):
> super(Reserve, self).__init__(*args, **kwargs)
> self.year = year
> self.month = month
> self.day = day
> self.serve_date = serve_date
> date_stamp =  time.strptime(serve_date,"%Y-%m-%d")
> serve_date = datetime.date(*date_stamp[:3])
> self.fields['food_name'].queryset = Food.objects.filter(
> serve_date__year = year, serve_date__month = month,
> serve_date__day = day)
>
> class Meta:
> model = Reservation
> fields = ('food_count', 'food_name')
>
>
> --
> 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/0fac06b1-181c-45cf-8ba2-871f6a4beed7%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/CAMGzuy_MFkQLKv8f9Z79ZKL1%3DC4UUZ9qkJ-m8oTSOEJ9yq8iCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using django pagination or slicing

2016-10-31 Thread ADEWALE ADISA
Thanks fedowag.
On Oct 31, 2016 12:01 PM, "王安刚" <fedo...@gmail.com> wrote:

> hi
> i prefer method 2
>
> you can get all the list from db and store it in redis using zadd
> each time an ajax request comes, you get the data you need using zrange
>
>
> 在 2016年10月31日星期一 UTC+8上午9:05:07,ADEWALE ADISA写道:
>>
>> Hello,
>> Please I need an advice on the best approach to take on the following
>> issues.
>> I have a database table consist of about 1000 record. I need to be
>> displaying like 20 records at a time on a page such that when the user
>> scroll the browser another batches will be append to the browser.
>> Below are the 3 ways am aiming to achieve this:
>>
>> 1. Using django pagination feature.
>>
>> 2. Everytime records need to be appended to the browser , an ajax call is
>> made to the view, then the queryset is slice using appropriate lower and
>> upper band. Then the returned record is appended to the browser.
>>
>> 3. Fetch the whole records from the database and transfer everything to
>> the browser, then JavaScript is now use to slice and be appending as needed.
>>
>> NOTE: The webpage would work like yahoo.com mobile site.
>> Please with approach is the best in term of performance and speed.
>>
>> 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/022fd700-0edb-419c-9a0d-6e9714229599%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/022fd700-0edb-419c-9a0d-6e9714229599%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Using django pagination or slicing

2016-10-31 Thread ADEWALE ADISA
Thanks very much Ludovic for the advice.
On Oct 31, 2016 9:53 AM, "ludovic coues" <cou...@gmail.com> wrote:

> I would use 1 + 2 from your list.
>
> 3 might work on 1000 record, depending on how much data there is per
> record. But if you grow to more than 10,000 record, the page loading
> can take minutes. I have experienced that issue with two different
> project.
>
> Django pagination by itself won't give you the infinite scroll you are
> expecting. But it should give you an easy interface for slicing the
> data from your db.
>
> An easier way might be class based view. The following exemple create
> a view to a list of object, paginated:
>
> from django.http import JsonResponse
> from django.views.generic import ListView
>
> class ModelListView(ListView):
> model = RecordModel
> paginate_by = 20
>
> It will try to use the template at app/record_model_list.html, the
> context will have the keys paginator, page, is_paginated, object_list.
> You can override the method render_to_response to return a json
> response.
> The documentation on ListView is at [1] and there is an exemple for
> returning JsonResponse at [2]
>
>
> [1] https://docs.djangoproject.com/en/1.10/topics/class-
> based-views/generic-display/
> [2] https://docs.djangoproject.com/en/1.10/topics/class-
> based-views/mixins/#more-than-just-html
>
>
>
>
> 2016-10-31 2:04 GMT+01:00 ADEWALE ADISA <solixzsys...@gmail.com>:
> > Hello,
> > Please I need an advice on the best approach to take on the following
> > issues.
> > I have a database table consist of about 1000 record. I need to be
> > displaying like 20 records at a time on a page such that when the user
> > scroll the browser another batches will be append to the browser.
> > Below are the 3 ways am aiming to achieve this:
> >
> > 1. Using django pagination feature.
> >
> > 2. Everytime records need to be appended to the browser , an ajax call is
> > made to the view, then the queryset is slice using appropriate lower and
> > upper band. Then the returned record is appended to the browser.
> >
> > 3. Fetch the whole records from the database and transfer everything to
> the
> > browser, then JavaScript is now use to slice and be appending as needed.
> >
> > NOTE: The webpage would work like yahoo.com mobile site.
> > Please with approach is the best in term of performance and speed.
> >
> > 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/CAMGzuy8cK7ueHGPwuCjbrV-
> SdfZwkYYhg7_t7-Dmmt%3D6g787YA%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Cordialement, Coues Ludovic
> +336 148 743 42
>
> --
> 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/CAEuG%2BTaPWphYQAwa9-rPW5VZ93yyA3kL%
> 3Dz8JAecdLRMiKdjihA%40mail.gmail.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/CAMGzuy_Tu7mdL4RTvNGWY%3Dm5PL0ttT4wv9QKeMfiLqd43MiaVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Using django pagination or slicing

2016-10-30 Thread ADEWALE ADISA
Hello,
Please I need an advice on the best approach to take on the following
issues.
I have a database table consist of about 1000 record. I need to be
displaying like 20 records at a time on a page such that when the user
scroll the browser another batches will be append to the browser.
Below are the 3 ways am aiming to achieve this:

1. Using django pagination feature.

2. Everytime records need to be appended to the browser , an ajax call is
made to the view, then the queryset is slice using appropriate lower and
upper band. Then the returned record is appended to the browser.

3. Fetch the whole records from the database and transfer everything to the
browser, then JavaScript is now use to slice and be appending as needed.

NOTE: The webpage would work like yahoo.com mobile site.
Please with approach is the best in term of performance and speed.

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/CAMGzuy8cK7ueHGPwuCjbrV-SdfZwkYYhg7_t7-Dmmt%3D6g787YA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to create 2 different kind of user profiles using django python

2016-10-30 Thread ADEWALE ADISA
You can start by designing your warden and student models in which each of
them inherit the django inbuilt user model class.
Each model would then have attribute that is peculiar to it alone.
On Oct 30, 2016 2:53 PM, "YOGITHA A N"  wrote:

> Hey,
>
> I am new to django . Please let me know how to create 2 various kind of
> user profiles in django. I am doing a hostel management system using django
> where in I have 2 kinds of users one is a student and the other is the
> warden.
>
> --
> 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/22ce8644-2a9d-430c-a565-39ab94664d88%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/CAMGzuy8%2BEMTJBo76UZjQwNdbDJ%3DN4aA07SBCUEcRva9L66L3Cg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to design URL pattern to get the field value using request.query_params.get in the view

2016-09-04 Thread ADEWALE ADISA
show your url configuration
On Sep 4, 2016 3:59 PM, "Afiz S"  wrote:

> Hi All,
>
> I have very new to Django. Can anyone tell me how to the data from URL to
> view.
>
> in this below example I am trying to get year param from the URL.
>
> def get_queryset(self):
> queryset = Battles.objects.all()
> year = self.request.query_params.get('year',None)
> if year is not None:
> queryset = queryset.filter(year__exact=year)
> return queryset
>
> --
> 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/693bbae5-0ffc-4737-86be-a9cee202e68e%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/CAMGzuy846bY8QiT9-WEBhmzx%3DL%2Bx_OPJOpVKPFvCLuoFHpJ-ig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Serving very large pdf files with django

2016-09-03 Thread ADEWALE ADISA
hi,
My view is that instead of combining all the images in one pdf, its better
to leave it as image and serve them individually by publishing link to each
image with text describing each page. Then the user can view any page they
are interested in. 'cause that single file is too large.
On Sep 3, 2016 6:12 PM, "Gary Roach"  wrote:

> Hi all,
>
> I am working on a project where I need to serve up large (100 -150 MB)
> static pdf files for viewing. The pdf files are jpg photos of pages from
> old log books. Downloading into the user's system is out of the question
> for obvious reasons. In addition the user may only need to see one or two
> pages out of a document. I plan on putting the static files in their own
> directory outside of the django programming and the postgresql database. I
> have looked at several addons to django but can't seem to get a "feel" for
> the whole problem. Has anyone had a similar problem and do they have a good
> solution .
>
> All help will be sincerely appreciated.
>
> OS Debian Linux
> Desktop KDE4
> Python 3.5
> Django 1.9.x
>
> Gary R.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-users/b5e154b5-3c01-6f39-f4a1-6e285093aa45%40verizon.net.
> 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/CAMGzuy8XNUWXugEL0z3nOr_G2MYGz8x59NsUGM%2BZaHfW0AbYHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django as Server

2016-01-10 Thread ADEWALE ADISA
Yes, django can interract with your mongodb and also serve  client request.
On Jan 8, 2016 11:24 AM, "Gaurav Jindal"  wrote:

> This line was written in the 1st tutorial :
> "We’re in the business of making Web frameworks, not Web servers."
>
> Does that mean that Django can be used only for making Web Frameworks?
>
> If not then is there any good tutorial to get started with that, because
> my aim is to use python at my server which will interact with MongoDB(using
> pymongo), and satisfy the request from client.
> I might be wrong in quoting my need as I am from PHP background, where my
> PHP script run on apache & also interacts with MySQL. I want this kind of
> setup only, but this time using Python and MongoDB.
>
> Thanks for help in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/abef6e1d-10fd-4d6d-889a-6e083fb1d9f7%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/CAMGzuy98-VMFUfMTh9-DWnO%3DRG8nmRAv4mAVH%2Be%3DvZc9W1agTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Standalone Project using django ORM

2015-10-27 Thread ADEWALE ADISA
The screen shot is attached. There is no error message but the trace. But
the program seem stop at django.setup(). Though it ran smoothly in django
1.50
On Oct 28, 2015 12:27 AM, "Dheerendra Rathor" <dheeru.ratho...@gmail.com>
wrote:

> Is this the full stacktrace? Looks like error message is missing in
> stacktrace.
>
> On Wed, 28 Oct 2015 at 04:05 ADEWALE ADISA <solixzsys...@gmail.com> wrote:
>
>> Hello;
>> I have being having issues trying to use django orm in my application.
>> This issues occur when using django 1.85. The application run perfectly
>> well on django 1.50. Bellow are the snippet :
>>
>> Model.py:
>> from django.db import models
>>
>> class Person(models.Model):
>> name = models.CharField(max_length=100)
>> email = models.CharField(max_length=100)
>> birthdate = models.DateField()
>> class Meta:
>> app_label = 'runnable'
>>
>> def __unicode__(self):
>> return u'%d: %s' % (self.id, self.name)
>>
>> app.py:
>>
>> import sys
>> from os import path
>> import collections
>> import datetime
>> sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
>>
>> from django.core.management import call_command
>> from django.conf import settings
>>
>> #print(sys.path)
>> if not settings.configured:
>> settings.configure(
>>DEBUG=True,
>> DATABASES={
>> 'default': {
>> # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or
>> 'oracle'.
>> 'ENGINE': 'django.db.backends.sqlite3',
>> # Or path to database file if using sqlite3.
>> 'NAME': ':memory:',
>> }
>> },
>> INSTALLED_APPS=("runnable", )
>>
>> )
>>
>> import django
>> django.setup()
>> #call_command('syncdb')
>> call_command('makemigrations')
>> call_command('migrate')
>> call_command('inspectdb')
>> from models import Person
>> print("PERSON: "+ Person)
>>
>> Console msg:
>> p.py", line 28, in 
>> django.setup()
>>   File
>> "/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/__init__.py",
>> line 18, in setup
>> apps.populate(settings.INSTALLED_APPS)
>>   File
>> "/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/apps/registry.py",
>> line 108, in populate
>> app_config.import_models(all_models)
>>   File
>> "/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/apps/config.py",
>> line 198, in import_models
>> self.models_module = import_module(models_module_name)
>>   File
>> "/data/data/com.hipipal.qpy3/files/lib/python3.2/python32.zip/importlib/__init__.py",
>> line 124, in import_module
>>
>> Note:
>> The application run successfully with django 1.50  by uncomment syncdb
>> and comment out migration, make migrations.
>>
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMGzuy9BSMrgqw8uMgp3kd9eBu5fTdF4DCB9%3Di-8r6EmZmN-WA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMGzuy9BSMrgqw8uMgp3kd9eBu5fTdF4DCB9%3Di-8r6EmZmN-WA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAByqUgjWYn%3DtfSeA-EBrzeur2_jodiPysZUS%3Dor%2BFeCFpKhbwg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAByqUgjWYn%3DtfSeA-EBrzeur2_jodiPysZUS%3Dor%2BFeCFpKhbwg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Standalone Project using django ORM

2015-10-27 Thread ADEWALE ADISA
Hello;
I have being having issues trying to use django orm in my application. This
issues occur when using django 1.85. The application run perfectly well on
django 1.50. Bellow are the snippet :

Model.py:
from django.db import models

class Person(models.Model):
name = models.CharField(max_length=100)
email = models.CharField(max_length=100)
birthdate = models.DateField()
class Meta:
app_label = 'runnable'

def __unicode__(self):
return u'%d: %s' % (self.id, self.name)

app.py:

import sys
from os import path
import collections
import datetime
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))

from django.core.management import call_command
from django.conf import settings

#print(sys.path)
if not settings.configured:
settings.configure(
   DEBUG=True,
DATABASES={
'default': {
# Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3',
# Or path to database file if using sqlite3.
'NAME': ':memory:',
}
},
INSTALLED_APPS=("runnable", )

)

import django
django.setup()
#call_command('syncdb')
call_command('makemigrations')
call_command('migrate')
call_command('inspectdb')
from models import Person
print("PERSON: "+ Person)

Console msg:
p.py", line 28, in 
django.setup()
  File
"/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/__init__.py",
line 18, in setup
apps.populate(settings.INSTALLED_APPS)
  File
"/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/apps/registry.py",
line 108, in populate
app_config.import_models(all_models)
  File
"/data/data/com.hipipal.qpy3/files/lib/python3.2/site-packages/django/apps/config.py",
line 198, in import_models
self.models_module = import_module(models_module_name)
  File
"/data/data/com.hipipal.qpy3/files/lib/python3.2/python32.zip/importlib/__init__.py",
line 124, in import_module

Note:
The application run successfully with django 1.50  by uncomment syncdb and
comment out migration, make migrations.

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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy9BSMrgqw8uMgp3kd9eBu5fTdF4DCB9%3Di-8r6EmZmN-WA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: About the auto-increase PK

2015-08-08 Thread ADEWALE ADISA
Am not 100% sure about this, but what about creating a normal Integer
field, then override the save method of the model to auto-increment the
value starting from 1000 ? So that any new record added, its value will be
1000+ total record +1
On Aug 8, 2015 11:11 AM, "Holland_zwz"  wrote:

> Hi all,
>  I want to add one auto-increase PK which start from one given value(such
> as start from 1000).
>
> I try to write the model as following:
>
> class MyModel(models.Model):
> mid = models.AutoField(verbose_name='My
> ID',primary_key=True,default='1000')
>
>
> But only one record can be add when i add records in admin web site.
>
> Any ways to support this? thanks
>
> Regards,
> Hollandz
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a66c5ec3-d0e8-41c8-98df-ef2c6f6c7126%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy8-XVWS%2BiR%3DDidHC_PO8_HS_w1P%3Dpnff5Pgt-y4RVHVcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Grids - Display grids/tables

2015-08-05 Thread ADEWALE ADISA
With div element and CSS, you can create awesome grid. Better still use
bootstrap.
Just return your data from django, then iterate over them and display them.
You can use django template or if u are not comfortable with template,
return your data as json, collect with ajax, use js to iterate and wrapped
with HTML/css
On Aug 5, 2015 2:22 PM, "Sayth Renshaw"  wrote:

> Hi
>
> Wanting some advice on which packages  you use with django to display your
> data to your users in grids, so think sports data 17 rows 10 columns x2 for
> both teams. Looking in the packages here
> https://www.djangopackages.com/grids/ .
>
> What advice can you give me if you have done something similar? I am going
> to be using mongo as the data store if this would influence your advice as
> well.
>
> thanks
>
> Sayth
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/12632d80-1123-4b5c-8c2e-46011f0e91fd%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy9AdbjK-iqWc4FWONsPs_A7t20hNSkPm5Q8%3DQee7eYEoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Interfacing Django Project with Python Script

2015-07-16 Thread ADEWALE ADISA
U can just import the modules in the script file the way you import django
modules.
On Jul 17, 2015 12:55 AM, "Jake Rudolph"  wrote:

> If I have a separate Python script that I want to interact with my Django
> project, how do I set them up to communicate?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c15b50ce-7083-453f-b087-e09c3c8a808f%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy8jjXTm%2BEeebkNYAmHKK5Y1Kf%2BRrKZRmYshMTWpNaBJ%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Thanks a lot, the link solve my issue and add to my knowledge
On Jul 6, 2015 10:29 AM, "Cal Leeming" <c...@iops.io> wrote:

> Also, you need to try and use Google more to answer your own questions :)
>
> I googled for "django your object is not serializable" and that page I
> linked was the first result.
>
> Cal
>
> On Mon, Jul 6, 2015 at 10:28 AM, Cal Leeming <c...@iops.io> wrote:
> > You need this;
> > https://docs.djangoproject.com/en/1.8/topics/serialization/
> >
> > Cal
> >
> > On Mon, Jul 6, 2015 at 10:25 AM, ADEWALE ADISA <solixzsys...@gmail.com>
> wrote:
> >> Hi guys,
> >> I have a model called Page:
> >>
> >> class Page(models.Model):
> >> category = models.ForeignKey(Category)
> >> title = models.CharField(max_length=128)
> >> url = models.URLField()
> >> views = models.IntegerField(default=0)
> >>
> >> I want to return all the Page record in my database at once to ajax
> request.
> >> This record is up to 1000 rows. In my view, I try to convert this to
> Json:
> >> page = Page.objects.all()
> >> data=json.dumps(page)
> >> But I got error: your object is not serializable
> >>
> >> So pls, my question is how can I return multiple records of database
> rows to
> >> ajax request at once so that at JavaScript side, I should be able to
> access
> >> each field of my record. ?
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Django users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to django-users+unsubscr...@googlegroups.com.
> >> To post to this group, send email to django-users@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/django-users.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/django-users/CAMGzuy8WLxD1MJ2ERWBn4Uc4anX0US_X%2BzHveXMqb2g2Dy3fmw%40mail.gmail.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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHKQagGWJKEd8PiGjiNjyLHgQFaNTbh-mVCEUx8L6y%3D3G%2BpdSg%40mail.gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy_9Fu7DGErNyastinxXpeAL2iCLc8Rx%2BDmwq8ij5nxmog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Thanks for urgent feedback, I will check the link out now.
On Jul 6, 2015 10:28 AM, "Cal Leeming" <c...@iops.io> wrote:

> You need this;
> https://docs.djangoproject.com/en/1.8/topics/serialization/
>
> Cal
>
> On Mon, Jul 6, 2015 at 10:25 AM, ADEWALE ADISA <solixzsys...@gmail.com>
> wrote:
> > Hi guys,
> > I have a model called Page:
> >
> > class Page(models.Model):
> > category = models.ForeignKey(Category)
> > title = models.CharField(max_length=128)
> > url = models.URLField()
> > views = models.IntegerField(default=0)
> >
> > I want to return all the Page record in my database at once to ajax
> request.
> > This record is up to 1000 rows. In my view, I try to convert this to
> Json:
> > page = Page.objects.all()
> > data=json.dumps(page)
> > But I got error: your object is not serializable
> >
> > So pls, my question is how can I return multiple records of database
> rows to
> > ajax request at once so that at JavaScript side, I should be able to
> access
> > each field of my record. ?
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/CAMGzuy8WLxD1MJ2ERWBn4Uc4anX0US_X%2BzHveXMqb2g2Dy3fmw%40mail.gmail.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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHKQagHx8WpH8hZ7ONDk29FdNvpXZRBeBFKt-CGnBJEoNVHYbg%40mail.gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy8-x-Pk5bObvicMwpECiYO79r-5b%2B0JG%2B9Vu37PRk0eHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Hi guys,
I have a model called Page:

class Page(models.Model):
category = models.ForeignKey(Category)
title = models.CharField(max_length=128)
url = models.URLField()
views = models.IntegerField(default=0)

I want to return all the Page record in my database at once to ajax
request. This record is up to 1000 rows. In my view, I try to convert this
to Json:
page = Page.objects.all()
data=json.dumps(page)
But I got error: your object is not serializable

So pls, my question is how can I return multiple records of database rows
to ajax request at once so that at JavaScript side, I should be able to
access each field of my record. ?

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


Re: Template syntax issues w dict

2015-05-01 Thread ADEWALE ADISA
If I can understand your code, of seems you want a table of : Institution |
Number of attendees
So if am right u can achive it this way :

{% for org, num in attendees_per_org.items() %}

{{ org }}
{{ num }}

  {% endfor %}

Since your dataset is a dictionary, u need to use key,value to get elements
in both side. Also items() is also required.
On May 1, 2015 8:22 AM, "Lachlan Musicman"  wrote:

> Hola,
>
> Django shell gives right results, template doesn't: code here
>
> http://dpaste.com/1NJEKD8
>
> What am I doing wrong?
>
> L.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGBeqiN78i37JA9UJov7%2BAVbJzRt4c5YCX3em2XvN-QmefxSvg%40mail.gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy_WwAKnYddxrYBL5P5O75--EP7Aqrn8a7Fg-5rUgQq02w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: setting up python 3.4.3 on window 7.

2015-04-03 Thread ADEWALE ADISA
Hi guy,
It will be cumbersome for you to have bothe versions on your systems
without using virtualenv.
But as you said you are just stating, my advice for you is to uninstall the
old version completely and then install the 3.4.3 fresh.
If u don't unstall the old version, as u are typing "python" on your cmd
prompt its the old version that would be coming up since it is the one
registered into your path.
So below are your options:
1. Unstall 2.7 and install 3.4.3
2. Install 3.4.3, rename the python executable from "python" to "python3".
THEN add python3 to your path.
3. Use virtualenv and virtualwrapper

Hope it help.
 On Apr 3, 2015 11:26 AM, "Pythondjango"  wrote:

> Greetings to you all.
> It is my pleasure to meet you all.
> Please i have a problem in installing a new python 3.4.3 version,even
> though i had installed the python 2.7.6 version on my window 7 pc through
> the help of a distant friend who is a python programmer and it running
> good.And now,i am also trying to become a python programmer, so please can
> any distinguished gentlemen or ladies give me a realistic details of how i
> will install this python 3.4.3 version so that i can start writing and
> learning by practice with its idle. 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a24a82f3-b71d-450b-a1d5-c69c42b33bd6%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy-J9TToO6QPZDK-KBwmTJ_RewmjkZ66jU0sSPk4wEaxbQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Different between Object-save and form-save

2015-03-01 Thread ADEWALE ADISA
OK, thanks for the response. So the essence of the form_save() is to get
the user object in which the password property can be set properly.
Thanks alot
On Mar 1, 2015 6:38 PM, "Vijay Khemlani" <vkhem...@gmail.com> wrote:

> Both save the user to the database, but "user_form.save()" leaves the user
> password in plain text (which won't work when the user tries to login
> later) so the password must be set correctly
> (user.set_password(user.password)) and then the user has to be saved again
> for the correct (hashed) password to be stored.
>
> On Sun, Mar 1, 2015 at 12:57 PM, ADEWALE ADISA <solixzsys...@gmail.com>
> wrote:
>
>> Hi guys, pls help with little explanation on the extract below from tango
>> tutorial. In the code, they call user_form().save() to save into database.
>> Then latter call user.save(). Pls what's the different between the two ?
>> Where did user.save() save to ?
>>
>> from rango.forms import UserForm, UserProfileForm
>>
>> def register(request):
>>
>> # A boolean value for telling the template whether the registration
>> was successful.
>> # Set to False initially. Code changes value to True when
>> registration succeeds.
>> registered = False
>>
>> # If it's a HTTP POST, we're interested in processing form data.
>> if request.method == 'POST':
>> # Attempt to grab information from the raw form information.
>> # Note that we make use of both UserForm and UserProfileForm.
>> user_form = UserForm(data=request.POST)
>> profile_form = UserProfileForm(data=request.POST)
>>
>> # If the two forms are valid...
>> if user_form.is_valid() and profile_form.is_valid():
>> # Save the user's form data to the database.
>> user = user_form.save()
>>
>> # Now we hash the password with the set_password method.
>> # Once hashed, we can update the user object.
>> user.set_password(user.password)
>> user.save()
>>
>> # Now sort out the UserProfile instance.
>> # Since we need to set the user attribute ourselves, we set
>> commit=False.
>> # This delays saving the model until we're ready to avoid
>> integrity problems.
>> profile = profile_form.save(commit=False)
>> profile.user = user
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMGzuy_saD%3DscV_CJtKzcss2siPktvFxi1oCUD-BvCEURtA5jg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMGzuy_saD%3DscV_CJtKzcss2siPktvFxi1oCUD-BvCEURtA5jg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALn3ei34SRTYAxP4oaSExM2Nt-tjym4PXP2q2xuSgkkH8TV_UA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALn3ei34SRTYAxP4oaSExM2Nt-tjym4PXP2q2xuSgkkH8TV_UA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Different between Object-save and form-save

2015-03-01 Thread ADEWALE ADISA
Hi guys, pls help with little explanation on the extract below from tango
tutorial. In the code, they call user_form().save() to save into database.
Then latter call user.save(). Pls what's the different between the two ?
Where did user.save() save to ?

from rango.forms import UserForm, UserProfileForm

def register(request):

# A boolean value for telling the template whether the registration was
successful.
# Set to False initially. Code changes value to True when registration
succeeds.
registered = False

# If it's a HTTP POST, we're interested in processing form data.
if request.method == 'POST':
# Attempt to grab information from the raw form information.
# Note that we make use of both UserForm and UserProfileForm.
user_form = UserForm(data=request.POST)
profile_form = UserProfileForm(data=request.POST)

# If the two forms are valid...
if user_form.is_valid() and profile_form.is_valid():
# Save the user's form data to the database.
user = user_form.save()

# Now we hash the password with the set_password method.
# Once hashed, we can update the user object.
user.set_password(user.password)
user.save()

# Now sort out the UserProfile instance.
# Since we need to set the user attribute ourselves, we set
commit=False.
# This delays saving the model until we're ready to avoid
integrity problems.
profile = profile_form.save(commit=False)
profile.user = user

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


Re: passing a list of list to a template

2015-02-12 Thread ADEWALE ADISA
What of:

  
{% for i in lista %}

   {% for j in i %}
   {{ j }}
   {% endfor %}


{% endfor %}

On Feb 12, 2015 6:55 PM, "dk"  wrote:

> i do have a list  of list like this
> [  [apple, banana, red] ,  [orange, grape, blue] ,  [watermelon,
> tangerine, purple]   ]
>
>
> then i am passing it to the template like
> return render(request, "show_table.html", {"lista": lista})
> inside my template html i have
>
>
> 
> {% for i in lista %}
> 
> {{ i }}
> {# > Temp  #}
> {# {{ i }}#}
> 
>
> {% endfor %}
> 
>
>
>
> but how can i select i[0]   or i[2] to put then into a diferent column?
> might be a better trick on how to send 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ec4f230b-73f0-495c-ad2d-db921ed227cc%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy9gsXhiN%3D59xVu%2BSHpS0O92EGpWNcyM%2B0PXAKo59UjD-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Pillow on QPython3

2015-02-03 Thread ADEWALE ADISA
Hi guys, am try to setup django tutorial with QPython3 on android device.
But the problem is am unable to install Pillow on the Qpython3. Its just
giving me various error. I try Qpython forum but with no avail.

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