Re: Make mobile app from webapp

2019-01-07 Thread Brad Pitcher
The basic formula we've used in the past:
1. Decouple back- and front-end using API
2. Use django-bakery (https://django-bakery.readthedocs.io/en/latest/) to
export the needed pages to HTML (requires the use of class-based views,
which are actually really awesome)
3. Use Phonegap to wrap these HTML pages into an app

Steps 2 and 3 are build steps, the HTML should not be edited or checked in
to source control.

On Mon, Jan 7, 2019 at 11:15 AM maunish dave 
wrote:

> Ya i have little experience of creating API using django rest framework
>
> On Mon 7 Jan, 2019, 11:42 PM Nebojsa Hajdukovic, <
> nebojsa.zero...@gmail.com> wrote:
>
>> You need to create rest api from that app, and then to use in ionic,
>> flutter etc.
>>
>> Do you have experience with django rest framework?
>>
>> pon, 07. jan 2019. 19:10 maunish dave  je
>> napisao/la:
>>
>>> Hi i have a website built with django and now i want to make a mobile
>>> app for it how to do it any suggestions?
>>>
>>> --
>>> 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/CALpJ3uLaDOHgjeuM8dez0hKxZ2M%2BwJn7DhzkbX8hf0GV1mqKOw%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/CAJ60hW3UtZbzNuXpgP38%3D2aF6gC4qUHHdV-rPU2YhheKL0RLVw%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/CALpJ3u%2B8dOiOXHeyfLxWRwXOtUbWJGTiLV7fnB-VDhcut7H8bw%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/CAMFpZrgsZxrHopZf0_cWHaTmmHhYHGFWbF_9p-_4DuaF9mojpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: issue in hosting https://www.pythonanywhere.com

2018-12-25 Thread Brad Pitcher
Atul,
Have you looked over the troubleshooting in
https://help.pythonanywhere.com/pages/DebuggingImportError ? It looks like
your web app is using a separate django installed to the system python
based on the paths in the error log. You should be able to fix that in the
*_wsgi.py file.

On Tue, Dec 25, 2018 at 7:58 AM Brad Pitcher  wrote:

> Can you share your wsgi file created on pythonanywhere?
>
> On Tue, Dec 25, 2018, 1:01 AM Atul Anand 
>> Hi
>> I have activated the venv by below cmd:
>> 07:57 ~/simplesocial (master)$ workon djangoVenv
>> Please let me know do I need to do something else ? Note: I have tried
>> doing the same with cmd:  07:57 ~/simplesocial (master)$ activate. But
>> it throwing error " bash:
>> /home/crackjeeonline/.virtualenvs/djangoVenv/bin/activate: Permission
>> denied"
>>
>>
>> Regard,
>> Atul
>>
>> On Tue, Dec 25, 2018 at 1:08 PM Joel Mathew  wrote:
>>
>>> Did you activate it?
>>> Sincerely yours,
>>>
>>>  Joel G Mathew
>>>
>>>
>>>
>>> On Tue, 25 Dec 2018 at 12:27, Atul Anand 
>>> wrote:
>>>
>>>> Hi Brad,
>>>>
>>>> Thanks for helping, but I am using a venv.
>>>> please find the below snapshot of the venv detail.
>>>>
>>>> Please guide me if I am doing something wrong.
>>>>
>>>> Virtualenv:
>>>>
>>>> Use a virtualenv to get different versions of flask, django etc from
>>>> our default system ones. More info here
>>>> <https://help.pythonanywhere.com/pages/Virtualenvs>. You need to *Reload
>>>> your web app* to activate it; NB - will do nothing if the virtualenv
>>>> does not exist.
>>>>
>>>> /home/crackjeeonline/.virtualenvs/djangoVenv
>>>> <https://www.pythonanywhere.com/user/crackjeeonline/webapps/#>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 25, 2018 at 11:05 AM Brad Pitcher 
>>>> wrote:
>>>>
>>>>> The paths in your logs indicate you aren't using a virtualenv. Find
>>>>> the virtualenv section in the web tab and make sure you specify the path 
>>>>> to
>>>>> your virtualenv there. Should be something like
>>>>> /home/[username]/.virtualenvs/djangoVenv
>>>>>
>>>>> On Mon, Dec 24, 2018 at 8:09 AM Atul Anand 
>>>>> wrote:
>>>>>
>>>>>> I am using virtual env: * djangoVenv*
>>>>>>
>>>>>>
>>>>>> On Mon, Dec 24, 2018 at 7:45 PM Joel Mathew  wrote:
>>>>>>
>>>>>>> Use virtualenv
>>>>>>> Sincerely yours,
>>>>>>>
>>>>>>>  Joel G Mathew
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, 24 Dec 2018 at 19:34, Atul Anand 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> y code is working in local. But the same code when I am uploading
>>>>>>>> into https://www.pythonanywhere.com. Its throwing error.
>>>>>>>>
>>>>>>>> Note: I have updated few things to make it compatible for
>>>>>>>> django2,which is working for me in my local windows box.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> https://www.pythonanywhere.com/user/crackjeeonline/webapps/#tab_id_crackjeeonline_pythonanywhere_com
>>>>>>>>
>>>>>>>> https://github.com/atulanandnitt/simplesocial
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> result of pip freeze
>>>>>>>>
>>>>>>>>
>>>>>>>>1. (djangoVenv) 07:50 ~/simplesocial (master)$ pip freeze
>>>>>>>>2. -f /usr/share/pip-wheels
>>>>>>>>3. argon2-cffi==18.3.0
>>>>>>>>4. bcrypt==3.1.5
>>>>>>>>5. certifi==2018.10.15
>>>>>>>>6. cffi==1.11.5
>>>>>>>>7. chardet==3.0.4
>>>>>>>>8. coreapi==2.3.3
>>>>>>>>9. coreschema==0.0.4
>>>>>>>>10. Django==2.0.9
>>>>>&

Re: issue in hosting https://www.pythonanywhere.com

2018-12-25 Thread Brad Pitcher
Can you share your wsgi file created on pythonanywhere?

On Tue, Dec 25, 2018, 1:01 AM Atul Anand  Hi
> I have activated the venv by below cmd:
> 07:57 ~/simplesocial (master)$ workon djangoVenv
> Please let me know do I need to do something else ? Note: I have tried
> doing the same with cmd:  07:57 ~/simplesocial (master)$ activate. But it
> throwing error " bash:
> /home/crackjeeonline/.virtualenvs/djangoVenv/bin/activate: Permission
> denied"
>
>
> Regard,
> Atul
>
> On Tue, Dec 25, 2018 at 1:08 PM Joel Mathew  wrote:
>
>> Did you activate it?
>> Sincerely yours,
>>
>>  Joel G Mathew
>>
>>
>>
>> On Tue, 25 Dec 2018 at 12:27, Atul Anand 
>> wrote:
>>
>>> Hi Brad,
>>>
>>> Thanks for helping, but I am using a venv.
>>> please find the below snapshot of the venv detail.
>>>
>>> Please guide me if I am doing something wrong.
>>>
>>> Virtualenv:
>>>
>>> Use a virtualenv to get different versions of flask, django etc from our
>>> default system ones. More info here
>>> <https://help.pythonanywhere.com/pages/Virtualenvs>. You need to *Reload
>>> your web app* to activate it; NB - will do nothing if the virtualenv
>>> does not exist.
>>>
>>> /home/crackjeeonline/.virtualenvs/djangoVenv
>>> <https://www.pythonanywhere.com/user/crackjeeonline/webapps/#>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 25, 2018 at 11:05 AM Brad Pitcher 
>>> wrote:
>>>
>>>> The paths in your logs indicate you aren't using a virtualenv. Find the
>>>> virtualenv section in the web tab and make sure you specify the path to
>>>> your virtualenv there. Should be something like
>>>> /home/[username]/.virtualenvs/djangoVenv
>>>>
>>>> On Mon, Dec 24, 2018 at 8:09 AM Atul Anand 
>>>> wrote:
>>>>
>>>>> I am using virtual env: * djangoVenv*
>>>>>
>>>>>
>>>>> On Mon, Dec 24, 2018 at 7:45 PM Joel Mathew  wrote:
>>>>>
>>>>>> Use virtualenv
>>>>>> Sincerely yours,
>>>>>>
>>>>>>  Joel G Mathew
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, 24 Dec 2018 at 19:34, Atul Anand 
>>>>>> wrote:
>>>>>>
>>>>>>> y code is working in local. But the same code when I am uploading
>>>>>>> into https://www.pythonanywhere.com. Its throwing error.
>>>>>>>
>>>>>>> Note: I have updated few things to make it compatible for
>>>>>>> django2,which is working for me in my local windows box.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://www.pythonanywhere.com/user/crackjeeonline/webapps/#tab_id_crackjeeonline_pythonanywhere_com
>>>>>>>
>>>>>>> https://github.com/atulanandnitt/simplesocial
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> result of pip freeze
>>>>>>>
>>>>>>>
>>>>>>>1. (djangoVenv) 07:50 ~/simplesocial (master)$ pip freeze
>>>>>>>2. -f /usr/share/pip-wheels
>>>>>>>3. argon2-cffi==18.3.0
>>>>>>>4. bcrypt==3.1.5
>>>>>>>5. certifi==2018.10.15
>>>>>>>6. cffi==1.11.5
>>>>>>>7. chardet==3.0.4
>>>>>>>8. coreapi==2.3.3
>>>>>>>9. coreschema==0.0.4
>>>>>>>10. Django==2.0.9
>>>>>>>11. django-bootstrap3==11.0.0
>>>>>>>12. django-braces==1.13.0
>>>>>>>13. django-cors-headers==2.4.0
>>>>>>>14. django-debug-toolbar==1.10.1
>>>>>>>15. django-filter==2.0.0
>>>>>>>16. django-tables2==2.0.3
>>>>>>>17. djangorestframework==3.9.0
>>>>>>>18. Faker==1.0.1
>>>>>>>19. idna==2.7
>>>>>>>20. itypes==1.1.0
>>>>>>>21. Jinja2==2.10
>>>>>>>22. Markdown==3.0.1
>>>>>>>23. MarkupSafe==1.1.0
>>>>>>>24. misaka==2.1.1
>>>>>>>25

Re: issue in hosting https://www.pythonanywhere.com

2018-12-24 Thread Brad Pitcher
The paths in your logs indicate you aren't using a virtualenv. Find the
virtualenv section in the web tab and make sure you specify the path to
your virtualenv there. Should be something like
/home/[username]/.virtualenvs/djangoVenv

On Mon, Dec 24, 2018 at 8:09 AM Atul Anand 
wrote:

> I am using virtual env: * djangoVenv*
>
>
> On Mon, Dec 24, 2018 at 7:45 PM Joel Mathew  wrote:
>
>> Use virtualenv
>> Sincerely yours,
>>
>>  Joel G Mathew
>>
>>
>>
>> On Mon, 24 Dec 2018 at 19:34, Atul Anand 
>> wrote:
>>
>>> y code is working in local. But the same code when I am uploading into
>>> https://www.pythonanywhere.com. Its throwing error.
>>>
>>> Note: I have updated few things to make it compatible for django2,which
>>> is working for me in my local windows box.
>>>
>>>
>>>
>>>
>>>
>>> https://www.pythonanywhere.com/user/crackjeeonline/webapps/#tab_id_crackjeeonline_pythonanywhere_com
>>>
>>> https://github.com/atulanandnitt/simplesocial
>>>
>>>
>>>
>>> result of pip freeze
>>>
>>>
>>>1. (djangoVenv) 07:50 ~/simplesocial (master)$ pip freeze
>>>2. -f /usr/share/pip-wheels
>>>3. argon2-cffi==18.3.0
>>>4. bcrypt==3.1.5
>>>5. certifi==2018.10.15
>>>6. cffi==1.11.5
>>>7. chardet==3.0.4
>>>8. coreapi==2.3.3
>>>9. coreschema==0.0.4
>>>10. Django==2.0.9
>>>11. django-bootstrap3==11.0.0
>>>12. django-braces==1.13.0
>>>13. django-cors-headers==2.4.0
>>>14. django-debug-toolbar==1.10.1
>>>15. django-filter==2.0.0
>>>16. django-tables2==2.0.3
>>>17. djangorestframework==3.9.0
>>>18. Faker==1.0.1
>>>19. idna==2.7
>>>20. itypes==1.1.0
>>>21. Jinja2==2.10
>>>22. Markdown==3.0.1
>>>23. MarkupSafe==1.1.0
>>>24. misaka==2.1.1
>>>25. Pillow==5.3.0
>>>26. pycparser==2.19
>>>27. python-dateutil==2.7.5
>>>28. pytz==2018.7
>>>29. requests==2.20.1
>>>30. six==1.12.0
>>>31. sqlparse==0.2.4
>>>32. text-unidecode==1.2
>>>33. uritemplate==3.0.0
>>>
>>>
>>>
>>> Snippet from
>>> https://www.pythonanywhere.com/user/crackjeeonline/files/var/log/crackjeeonline.pythonanywhere.com.error.log
>>>
>>>
>>>1. 2018-12-23 06:53:44,347: Error running WSGI application
>>>2. 2018-12-23 06:53:44,355: ModuleNotFoundError: No module named 
>>> 'debug_toolbar'
>>>3. 2018-12-23 06:53:44,356:   File 
>>> "/var/www/crackjeeonline_pythonanywhere_com_wsgi.py", line 54, in 
>>>4. 2018-12-23 06:53:44,356: django.setup()
>>>5. 2018-12-23 06:53:44,356:
>>>6. 2018-12-23 06:53:44,356:   File 
>>> "/usr/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
>>>7. 2018-12-23 06:53:44,357: apps.populate(settings.INSTALLED_APPS)
>>>8. 2018-12-23 06:53:44,357:
>>>9. 2018-12-23 06:53:44,357:   File 
>>> "/usr/lib/python3.6/site-packages/django/apps/registry.py", line 89, in 
>>> populate
>>>10. 2018-12-23 06:53:44,357: app_config = AppConfig.create(entry)
>>>11. 2018-12-23 06:53:44,358:
>>>12. 2018-12-23 06:53:44,358:   File 
>>> "/usr/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
>>>13. 2018-12-23 06:53:44,358: module = import_module(entry)
>>>14. 2018-12-23 06:53:44,358: 
>>> ***
>>>15. 2018-12-23 06:53:44,359: If you're seeing an import error and don't 
>>> know why,
>>>16. 2018-12-23 06:53:44,359: we have a dedicated help page to help you 
>>> debug:
>>>17. 2018-12-23 06:53:44,359: 
>>> https://help.pythonanywhere.com/pages/DebuggingImportError/
>>>
>>>
>>> Regards,
>>> Atul
>>>
>>> --
>>> 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/CAKHpVdTdwqMXje4KzTOSX1QF9FNR89oOQAB%2BkDncKQ7ZP93pyg%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/CAA%3Diw_8KJ0rwiy1CF8MQGBBCxufQHBcjFRxvrpctJsi9TJeUOQ%40mail.gmail.com
>> 

Re: Alternative to fabric

2014-11-17 Thread Brad Pitcher
I agree Ansible is a good fit for your situation. Since Ansible works from
yaml files, you don't have to write any Python 2.x compatible code as you
would with Fabric.

On Mon Nov 17 2014 at 8:24:24 AM Brian Schott  wrote:

> Ansible is a good choice.
>
> Sent from my iPhone
>
> On Nov 17, 2014, at 11:07 AM, Cal Leeming [iops.io]  wrote:
>
> There isn't really such a thing as a "deployment plugin", there are many
> aspects to deployment workflow that should be considered.
>
> It really depends on how you are intending on deploying your application,
> if you are dockerizing it then your CI system should be building the images
> and pushing to a repository of your choice (docker hub, S3 etc). If you are
> snapshotting on the hosting provider, then you can use packer.io and a
> bunch of shell scripts. Pushing code to a single server via SSH isn't
> really a scalable way to do deployment, and if this is what you are doing
> then you might as well run a tmux/screen session on the server instead.
>
> Sadly other than Amazon Beanstalk and Heroku, both of which are
> horrifically expensive, there isn't much in the way of choices. You can
> look at dokku and deis, both of which are not considered stable for
> production but use the same build pack idea as Heroku.
>
> If you want to go super ghetto, you should use a shell script which SSHs
> into your "single use" box, issue a "docker pull" then restart the running
> container. All of these things require a lot of plumbing work.
>
> Another approach would be to install python 2.6 in a venv (assuming you
> have the relevant system libs) and run Fabric with that instead... In fact
> putting fabric in its own venv is probably better because having fabric
> inside your application space anyway would be considered cross
> contamination (e.g. deployment tooling mixed in with application code).
> This may feel weird at first, but once you get into the concept of
> separating plumbing from application code, it feels more normal. If you do
> this, use virtualenvwrapper to save headaches.
>
> If you're a JS guy, there's also a bunch of SSH tooling for node too, but
> I can't give any personal recommendation on those.
>
> Cal
>
>
>
> On Mon, Nov 17, 2014 at 11:28 AM, Andreas Kuhne <
> andreas.ku...@suitopia.com> wrote:
>
>> Hi all,
>>
>> We are just about ready to release our newly rewritten website. It is
>> based on Django 1.6 and Python 3.
>>
>> We have worked through all of the problems with using python 3 (migrated
>> some plugins ourselves, other plugins were updated during the course of the
>> project). The only problem we have left is a good deployment plugin, so
>> that we easily can deploy new versions of our site.
>>
>> We previously used fabric, but that doesn't work with python 3. So I was
>> wondering if anyone has any python 3 compatible fabric alternative that
>> they are using?
>>
>> Regards,
>>
>> Andréas
>>
>> --
>> 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/CALXYUb%3DTpr7RfejfXs2H5vryg6vGp45_bbE%2Bp8tm%3D8CgQN2hzw%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/CAHKQagGz1tNLfdF09%3DcFBJaAWfBWFNbWCP%3DTANonGVkZSbvGfg%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/4679766C-BFEC-4A96-A1D2-BDBD316053EE%40gmail.com
> 

Re: Please help: urgent deployment problem with django post office

2014-10-03 Thread Brad Pitcher
If you want to simply disable logging, you could try setting the LOG_LEVEL
to 0:

POST_OFFICE = {
'LOG_LEVEL': 0  # Don't log anything
}


On Fri, Oct 3, 2014 at 4:55 AM, Sabine Maennel 
wrote:

> Hello Collins, I need post office for other purposes not for error
> logging.
>
> I worte an issue in their issue queue, this is what they wrote back:
> >>As explained by @RafRaf  , the emails are
> sent by BrokenLinkEmailsMiddleware, you can disable it insettings.py if
> you need to.
>
> *But my settings.py has this middleware only:*
> MIDDLEWARE_CLASSES = (
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> So should I remove Common Middleware for deployment. Could it be coming
> from that one? Can you please give me some advice,
>
> Thanks so much in advance!
>
> Am Donnerstag, 2. Oktober 2014 20:42:19 UTC+2 schrieb Collin Anderson:
>>
>> It seems like django-post_office recommends using sentry for the errors.
>> Getting a better feel for your situation: Why django-post_office at all?
>> What's wrong with the error emails getting logged?
>>
>  --
> 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/7f3d7edc-cbfe-411a-9f16-7acc2044540c%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/CAMFpZrg2xopvfmY76_dJKDTgCNajk%2BQ-12b8OOwrk6c_NwC_ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 1.6.5 as a zip for download?

2014-05-28 Thread Brad Pitcher
Is this what you're looking for?

https://github.com/django/django/archive/1.6.5.zip


On Wed, May 28, 2014 at 9:51 AM, Neil Walker wrote:

> Hello,
> I wish to download 1.6.5 stable zip without using pip and not as a tar/gz
> (limitations on software I can use at work), but when I visit the download
> site and follow the links for manually installing all I get is the latest
> development build as a zip or 1.6.5 as as tar/z file.
>
> Is there a stable release version as a zip available?
>
> 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/fa1080dd-ad78-41fa-b00f-6fac7bc431ea%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/CAMFpZri3Jcd19b27ucR9CstV0_vQzyfWkHQdTkWtHs6iu94O-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-05 Thread Brad Pitcher
It's just something that was passed down to me from a senior programmer :-)

-
Brad Pitcher


On Mon, May 5, 2014 at 2:45 PM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

> Hello Brad,
>
> Thanks for the suggestion, I was suspecting something like that. I will
> let you know how it goes.
>
> Where do you find this? I Could not find anything like that in the wsgi
> documentation.
>
> Thank you,
>
> Guillem
>
>
> On Friday, 2 May 2014 16:37:35 UTC+2, Brad Pitcher wrote:
>
>> What does your Apache vhost config look like? You will need to add a
>> WSGIDaemonProcess directive where you can specify the python path for the
>> virtual environment, like so:
>>
>> WSGIDaemonProcess processname user=wsgi group=apache processes=1
>> threads=10 umask=0022 display-name=displayname
>> python-path=/data/app/guillem-py3-dj17-test/lib64/python3.3/
>> site-packages/
>>
>> -
>> Brad Pitcher
>>
>>
>> On Fri, May 2, 2014 at 4:11 AM, Guillem Liarte > > wrote:
>>
>>>  Hello,
>>>
>>> I have looked through the web in several different especialised forums
>>> but I cannot find the way to do this properly.
>>>
>>> My aim is to have an environment to host Django applications running
>>> Centos 6. So far I have managed to:
>>>
>>> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a
>>> test application using python's webserver. Time to move into Apache.
>>> - I manage to get it working from Apache but instead of Python 3.3.2, it
>>> uses the Python 2.6 installed in the system. No matter if I launch apache
>>> from the virtual environment, even once I have enabled python3.
>>>
>>> I know Djanog 1.6 can use python 2.6. But that is not what i want to
>>> achieve, as 1.7 will not.
>>>
>>> Just to give some idea of what I have installed:
>>>
>>>
>>>
>>> In the system:
>>> python --version
>>> Python 2.6.6
>>>
>>> From RedHat SCL:
>>>
>>> source /opt/rh/python33/enable
>>>
>>> python --version
>>> Python 3.3.2
>>>
>>> Inside the virtual environment I have:
>>>
>>> Django (1.6.3)
>>> pip (1.4.1)
>>> setuptools (0.9.8)
>>>
>>> That starts successfully:
>>>
>>> python manage.py runserver 192.168.0.16:8000
>>>
>>>
>>>
>>> Starting development server at http://192.168.0.16:8000/
>>>
>>>
>>>
>>> Quit the server with CONTROL-C.
>>>
>>> When getting to admin or any error page:
>>>
>>> Django Version:
>>>   1.6.3
>>> Python Version:
>>>   3.3.2
>>>
>>> Python Path:
>>>
>>>
>>> ['/data/app/guillem-py3-dj17-test/guillem_test',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>>>  '/opt/rh/python33/root/usr/lib64/python3.3',
>>>  '/opt/rh/python33/root/usr/lib/python3.3',
>>>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
>>> ___
>>>
>>>
>>> When starting this from Apache 2.2 instead of the python embedded server:
>>>
>>>
>>> httpd -k restart -e debug
>>>
>>>
>>>
>>> ...
>>> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
>>> ...
>>>
>>> The Apache service starts in my port of choice:
>>>
>>> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
>>> LISTEN  1676/httpdWhat I get now is:
>>>
>>>
>>>
>>>
>>> So now I get:
>>>
>>> Django Version: 1.6
>>> Python Executable:  /data/app/guillem-py3-dj17-test/bin/python
>>> Python Version: 2.6.6
>>> Python Path:
>>>
>>> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>>>
>>>
>>>
>>>
>>>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>>>  '/usr/lib64/python26.zip',
>>>  '/usr/lib64/python2.6',
>>>  '

Re: django 1.6.4 - markup / markdown (for django blog tutorial)

2014-05-05 Thread Brad Pitcher
django.contrib.markup has been deprecated. You could try using the
standalone project that is a copy of the same code from django:

pip install django_markup_deprecated

Then add "markup_deprecated" to your INSTALLED_APPS instead of
django.contrib.markup.

-
Brad Pitcher


On Mon, May 5, 2014 at 1:07 PM, Alex Leonhardt  wrote:

> fwiw - this is the tutorial I was trying :
> http://www.creativebloq.com/netmag/get-started-django-7132932 it mentions
> django.contrib.markup ... but that doesnt seem to work :\
>
>
> On Monday, 5 May 2014 16:44:47 UTC+1, Alex Leonhardt wrote:
>>
>> Hi all,
>>
>> am new to django and followed a tiny tutorial to start off - I wanted to
>> add the ability to use Markdown syntax in the blog posts. It was suggested
>> to use django.contrib.markup, but that wont work anymore ( i guess it's
>> been removed ) - what do I need to use Markdown in my posts ?
>>
>> Thanks all!
>> Alex
>>
>>  --
> 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/56aaacc5-48e1-47f8-a1bc-ac027246964a%40googlegroups.com<https://groups.google.com/d/msgid/django-users/56aaacc5-48e1-47f8-a1bc-ac027246964a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-02 Thread Brad Pitcher
What does your Apache vhost config look like? You will need to add a
WSGIDaemonProcess directive where you can specify the python path for the
virtual environment, like so:

WSGIDaemonProcess processname user=wsgi group=apache processes=1 threads=10
umask=0022 display-name=displayname
python-path=/data/app/guillem-py3-dj17-test/lib64/python3.3/site-packages/

-
Brad Pitcher


On Fri, May 2, 2014 at 4:11 AM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

> Hello,
>
> I have looked through the web in several different especialised forums but
> I cannot find the way to do this properly.
>
> My aim is to have an environment to host Django applications running
> Centos 6. So far I have managed to:
>
> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a
> test application using python's webserver. Time to move into Apache.
> - I manage to get it working from Apache but instead of Python 3.3.2, it
> uses the Python 2.6 installed in the system. No matter if I launch apache
> from the virtual environment, even once I have enabled python3.
>
> I know Djanog 1.6 can use python 2.6. But that is not what i want to
> achieve, as 1.7 will not.
>
> Just to give some idea of what I have installed:
>
>
>
> In the system:
> python --version
> Python 2.6.6
>
> From RedHat SCL:
>
> source /opt/rh/python33/enable
>
> python --version
> Python 3.3.2
>
> Inside the virtual environment I have:
>
> Django (1.6.3)
> pip (1.4.1)
> setuptools (0.9.8)
>
> That starts successfully:
>
> python manage.py runserver 192.168.0.16:8000
>
>
>
> Starting development server at http://192.168.0.16:8000/
>
> Quit the server with CONTROL-C.
>
> When getting to admin or any error page:
>
> Django Version:
>   1.6.3
> Python Version:
>   3.3.2
>
> Python Path:
>
>
> ['/data/app/guillem-py3-dj17-test/guillem_test',
>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>  '/opt/rh/python33/root/usr/lib64/python3.3',
>  '/opt/rh/python33/root/usr/lib/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
> ___
>
>
> When starting this from Apache 2.2 instead of the python embedded server:
>
>
> httpd -k restart -e debug
>
>
> ...
> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
> ...
>
> The Apache service starts in my port of choice:
>
> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
> LISTEN  1676/httpdWhat I get now is:
>
>
> So now I get:
>
> Django Version:   1.6
> Python Executable:/data/app/guillem-py3-dj17-test/bin/python
> Python Version:   2.6.6
> Python Path:  
>
> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>
>
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>  '/usr/lib64/python26.zip',
>  '/usr/lib64/python2.6',
>  '/usr/lib64/python2.6/plat-linux2',
>  '/usr/lib64/python2.6/lib-tk',
>
>
>  '/usr/lib64/python2.6/lib-old',
>  '/usr/lib64/python2.6/lib-dynload',
>  '/usr/lib64/python2.6/site-packages',
>  '/usr/lib64/python2.6/site-packages/gst-0.10',
>  '/usr/lib64/python2.6/site-packages/gtk-2.0',
>
>
>  '/usr/lib/python2.6/site-packages',
>  '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
>  '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/']
>
>
>
> Just to make it clear, that python inside the virtual env is python 3.3.2:
>
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
> /data/app/guillem-py3-dj17-test/bin
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# which 
> python
>
>
> /data/app/guillem-py3-dj17-test/bin/python
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
> ./python --version
> Python 3.3.2
>
>
>
> 
>
>
> So, for some reason which most possibly lies with a misconfiguration from my 
> part, Apache ignores the fact that theer is another python installed in the 
> system.
>
>
> I believe this happens because the installed mod_wsgi is not compatible:
>
>
> mod_wsgi-3.2-3.el6.x86_64
>
> Is this the case?

Re: Printing things to the server console in Django?

2014-02-21 Thread Brad Pitcher
print("information")

-
Brad Pitcher


On Fri, Feb 21, 2014 at 1:00 PM, wasingej wrote:

> Hi guys.  I'm pretty new to Django and I'm trying to figure out how I can
> print out information to my console that I started my web application on
> using "python manage.py runserver".
>
> Thanks,
> Jared
>
> --
> 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/bb6c3e9d-c0b3-4acc-9481-612c29ae41a1%40googlegroups.com
> .
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMFpZriode-qcfQ0CFso1TVm2x575-Tzp%2BD%3Dwq1cFRFpyhck_A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I create a standalone python application that uses the django environment (e.g. the ORM etc...)?

2013-09-17 Thread Brad Pitcher
To make my code work, you could set DJANGO_SETTINGS_MODULE to
'my_project.settings', and just put formdesigner.py directly under
my_project.

If you wanted to keep formdesigner.py where it is, you would want to change
the sys.path.append line to this:

sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),
'..'))


-----
Brad Pitcher


On Tue, Sep 17, 2013 at 12:25 AM, DJ-Tom  wrote:

>
> Hi,
>
> I'm also not sure if the python file is at the correct location.
>
> This is how the directory structure looks:
>
> my_project
> \my_project\
>  settings.py
> \my_app\ # this is where my models are defined
>  models.py
>  formdesigner.py
>
>
> Where should my formdesigner.py be located?
>
> my_project ?
> my_project\my_project ?
> my_project\my_app ?
>
> What do I put into DJANGO_SETTINGS_MODULE?
>
> 'my_project.settings'?
>
>
> Am Montag, 16. September 2013 18:17:21 UTC+2 schrieb Brad Pitcher:
>
>> You need to do something like this before import django stuff:
>>
>> import os
>> import sys
>>
>> sys.path.append(os.path.**abspath(os.path.dirname(__**file__)))
>> os.environ['DJANGO_SETTINGS_**MODULE'] = 'web.settings'
>>
>>
>> -
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: How do I create a standalone python application that uses the django environment (e.g. the ORM etc...)?

2013-09-16 Thread Brad Pitcher
You need to do something like this before import django stuff:

import os
import sys

sys.path.append(os.path.abspath(os.path.dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'web.settings'


-----
Brad Pitcher


On Mon, Sep 16, 2013 at 8:19 AM, Nigel Legg  wrote:

> Shouldn't it be
>
>from django.db import models
>
> ??
>
> Cheers, Nigel
> 07914 740972
>
>
>
> On 16 September 2013 15:25, DJ-Tom  wrote:
>
>> For reporting purposes I want to use List & Label from Combit. The
>> web/online part is no big deal since the reporting module can be run
>> without user interface (creating Excel or PDF files)
>>
>> But the actual form designer part that is used to define the report
>> layout is a windows GUI application, so I would like to have a python file
>> inside my Django app that I can call to start the designer part on my local
>> machine.
>>
>> I have now read a bunch of descriptions on how to use Django in a
>> standalone application but did not succeed so far in actually running my
>> form designer.
>>
>> This is what I currently have, i tried to start this via "python
>> formdesigner.py", after activating the correct virtualenv:
>>
>> from Tkinter import *
>> from ctypes import *
>> import django
>> from models import *
>>
>> LL = windll.cmll18
>>
>> ### Declaration of application class omitted, this is plain python  
>>
>> app = Application()
>> app.master.title("List & Label sample application")
>> app.mainloop()
>>
>>
>> Regardless what I try, I can't get the model class import to work.
>>
>> I also tried SET DJANGO_SETTINGS_MODULE=settings and project.settings and
>> project.app.settings... nothing worked.
>>
>> thomas
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: SQLite3 database error!!!

2013-04-21 Thread Brad Pitcher
Can you post the rest of the traceback?
On Apr 21, 2013 7:06 AM, "Kakar"  wrote:

> I am in settings.py and using SQLite3. But when i execute manage.py
> syncdb, it gives me error: "Value error: Empty module name" I didn't
> understood this part. Plz help me guyz.
>
> --
> 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.




Re: Possible Basic kwargs question.

2013-04-16 Thread Brad Pitcher
I see what you're saying. Maybe you're looking for something more like this?

def method1(self, param1=sensible_default, param2=sensible_default,
param3=sensible_default):
print param1, param2, param3

The variable names must be specified in the method arguments like above if
you wish to reference them by name inside the method itself. With this
method, you will also need to call it with: model.method1(**params)

On Tue, Apr 16, 2013 at 9:59 PM, jayhalleaux  wrote:

> but if I did that then i would have a variable named kwargs.
>
> and it would be print kwargs['param1'], etc
>
> Why even unpack the dictionary?  I could just pass the dictionary instead.
>
>
> On Tuesday, April 16, 2013 11:08:42 PM UTC-4, Brad Pitcher wrote:
>
>> It should be:
>> model.method1(**params)
>> On Apr 16, 2013 7:49 PM, "jayhalleaux"  wrote:
>>
>>>  Not really a Django question but I'm trying to create a model method
>>> that does not have a fixed set of parameters.
>>>
>>> models.py
>>> Class Model_A(model.Model):
>>> ...
>>>
>>> def method1(self, **kwargs):
>>>
>>> print param1, param2, param3
>>>
>>>
>>>
>>> views.py
>>> params = dict(
>>>
>>> param1=something1,
>>> param2=something2,
>>>  param3=something3,
>>> ...
>>>
>>> )
>>>
>>> model.method1(params)
>>>
>>> In this example when I try to do something like this it states that I
>>> should have passed only 1 parameter instead of 2.
>>>
>>> I thought the whole point of using '**' to unpack dictionaries is so you
>>> don't have to have a fixed number of parameters.
>>>
>>> Is there something I am missing or am I doing this incorrect? First time
>>> I'm trying to create a method like this.  Normally I explicitly state all
>>> parameters.
>>>
>>> Any help is 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 post to this group, send email to django...@googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<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.




Re: Possible Basic kwargs question.

2013-04-16 Thread Brad Pitcher
It should be:
model.method1(**params)
On Apr 16, 2013 7:49 PM, "jayhalleaux"  wrote:

> Not really a Django question but I'm trying to create a model method that
> does not have a fixed set of parameters.
>
> models.py
> Class Model_A(model.Model):
> ...
>
> def method1(self, **kwargs):
>
> print param1, param2, param3
>
>
>
> views.py
> params = dict(
>
> param1=something1,
> param2=something2,
> param3=something3,
> ...
>
> )
>
> model.method1(params)
>
> In this example when I try to do something like this it states that I
> should have passed only 1 parameter instead of 2.
>
> I thought the whole point of using '**' to unpack dictionaries is so you
> don't have to have a fixed number of parameters.
>
> Is there something I am missing or am I doing this incorrect? First time
> I'm trying to create a method like this.  Normally I explicitly state all
> parameters.
>
> Any help is 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 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.




Re: django-social-auth problem with facebook

2013-04-15 Thread Brad Pitcher
In my experience, that particular error always means that the database
doesn't match what you have in your models. Try a syncdb and/or check your
south migrations to make sure your database is up to date.

-
Brad Pitcher
Software Developer
(702)723-8255


On Sun, Apr 14, 2013 at 11:01 PM, Jeff Hsu  wrote:

> Hi, I just pip installed django-social-auth from omab today on
> github(beginner here).  I think I can almost get it to work with facebook
> login, but I always have this "InternalError: Exception Value: current
> transaction is aborted, commands ignored until end of transaction block",
> after I log in with my facebook account and before I redirect to the
> profile page.  The request url shows
>
> http://127.0.0.1:8000/complete/facebook/?redirect_state=xxx&code=xxx&state=xxx.
>  I'm using Django 1.5.  Can anybody give me some directions to debug this?
>
> Thank you tons,
> Jeff
>
>
>  --
> 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.




Re: Suggestion for using distinct on django 1.4+ in your unit tests?

2013-03-06 Thread Brad Pitcher
I believe sqlite supports "distinct" just not "distinct on". I have always
managed to find workarounds using "distinct" anywhere I formerly used
"distinct on".
On Mar 6, 2013 7:01 AM, "Toran Billups"  wrote:

> I recently upgraded to django 1.4 and found that my "distinct" queries
> don't work anymore in my test code because sqlite doesn't support it -how
> is everyone using this for integration testing?
>
> Thank you in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?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.




Re: Upgrade to django 1.5

2013-03-04 Thread Brad Pitcher
It should be safe, just test things out. Also, if you have DEBUG=False you
must also include an ALLOWED_HOSTS array, which became required in Django
1.4.4:
https://www.djangoproject.com/weblog/2013/feb/19/security/#s-issue-host-header-poisoning

It should contain a list of domains used to access the site.

On Sun, Mar 3, 2013 at 6:29 PM, Randa Hisham  wrote:

> Iam now working in aproject using django 1.4.2 could I upgrade to django
> 1.5?
>
> --
> 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.




Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-02-09 Thread Brad Pitcher
Have you tried adding a:
import pdb; pdb.set_trace()
in the view to debug that way?
On Jan 30, 2013 12:31 AM, "Alessandro Pelliciari" 
wrote:

> Thanks for the answer!
>
> Because i'm developing and integrating some flow (social registration etc)
> through tests.
>
> So, instead of creating every time a new user, creating a new social
> association, and then after every try delete them from the database, the
> test does it from me.
>
> So, its like a kind of dirty TDD with functional (selenium because i have
> facebook login for example) testing.
>
>
> Anyway i think i can resolve with the 500 response logging the error to
> the console, but it's my first project in Django (and python) so i can't
> understand completely the way to logging at this moment.
>
>
> Alessandro
>
>
> Il giorno mercoledì 30 gennaio 2013 03:18:46 UTC+1, Ramiro Morales ha
> scritto:
>>
>> Ramiro Morales
>> On Jan 29, 2013 12:33 PM, "Alessandro Pelliciari" 
>> wrote:
>> >
>> > thanks for the link!
>> >
>> > So Isn't there a way to set DEBUG=True in tests?
>>
>> No. There isn't (at least with the built-in testing toolbox).
>>
>> Now, I'm trying to understand why do you rely in the debugging 500
>> response contents on your tests. Do you screen scrap it to extract
>> information about the origin of the failure?
>>
>  --
> 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.




Re: Help - No module named models

2013-02-04 Thread Brad Pitcher
On Sun, 2013-02-03 at 10:04 -0800, frocco wrote:
> from catalog.models import Category

It is probably this line. Maybe there is no __init__.py file in the
catalog directory?

-- 
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: newbie needs to copy a record in admin to a new record

2013-01-11 Thread Brad Pitcher
I think what should work well for your use case is an admin action:

https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/

You can write code for a copy action in admin.py. This will add a "copy"
item to the dropdown in the list view, so you can select any number of list
items and copy them.

-
Brad Pitcher
Software Developer
(702)723-8255


On Fri, Jan 11, 2013 at 7:06 AM, frocco  wrote:

> Hello,
>
> I am just learning django and want to allow a user in admin to copy a
> record from the list to create a new record and make changes.
> This will prevent having to type similar data.
>
> How do I add a link to the admin list?
> where do I put code to dup the record?
>
> Thank you
>
> --
> 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/-/odBD_lyCqmsJ.
> 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: Email notifications app

2012-11-23 Thread Brad Pitcher
Checkout django drip:
https://github.com/zapier/django-drip
On Nov 23, 2012 7:22 AM, "Arnaud BRETON"  wrote:

> Hi everybody,
>
> I'm looking for a powerful third-app for Django to manage time-driven
> email notifications.
>
> I found django-notifications (
> https://github.com/jtauber/django-notification) but it seems not
> maintained anymore..
>
> Thanks !
>
> --
> 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/-/UeHxWh5cp4kJ.
> 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: selenium test for fallback page loaded from app cache when server is unavailable

2012-11-03 Thread Brad Pitcher
Are you having the selenium test go to online.html first like in your
manual test?
Maybe you need to have selenium hit offline.html first and cache that page?
On Nov 3, 2012 6:14 AM, "Joao Coelho"  wrote:

> Hi. I haven't been able to figure this one out. Trying to write an
> automated test that uses selenium.webdriver.firefox.webdriver
>
> The manifest file has
> FALLBACK:
> /online.html /offline.html
>
> So that at /online.html the browser displays the cached copy of
> /offline.html when the server is offline
>
> Also, to simulate server unavailable for testing
> /online.html returns a 200 response
> /online.html?offline=1 returns 503
>
> This all works fine when I browse manually
> /online.html displays "I am online"
> /online.html?offline=1 displays "I am a cached page"
>
> I want the selenium test to get /online.html?offline=1 and see "I am a
> cached page" /offline.html
> But it's only showing a blank page
> I think it's stopping at the 503 and not loading from the app cache
>
> def test_offline(self):
> """Simulate site being offline"""
> self.selenium.get('%s%s' % (self.live_server_url,
> '/online.html?offline=1'))
> self.assertIn('cached page', self.selenium.page_source)
>
> How can I make it test this? Thanks.
>
> --
> 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/-/YrAnOOsSaKAJ.
> 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: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
Use setattr's counterpart, getattr :-)

getattr(inst, k).add(relatedObject)

On Fri, Oct 26, 2012 at 5:16 PM, Chris Pagnutti wrote:

> Awesome.  Thanks Brad.  Now the question is, what if the attribute is a
> ManyToManyField.
>
> e.g.
> inst.k.add(relatedObject)
>
> How to reference k properly if k is a string containing the name of a
> ManyToManyField of inst?
>
>
> On Friday, October 26, 2012 11:37:36 AM UTC-4, Chris Pagnutti wrote:
>>
>> Say I have a model like
>> class MyModel(models.Model)
>>name = models.CharField(max_length=**100)
>>number = models.IntegerField()
>>
>> In a script, I want to have something like
>> fields = {"name":"Joe", "number":5}
>>
>> And I want to update a MyModel instance using the fields dictionary,
>> something like this
>> inst = MyModel.objects.get(pk=2)
>> for k,v in fields.iteritems():
>>inst.k = v   # I tried with inst.F(k) = v and inst.eval(k) = v but
>> python doesn't like that either
>>
>> I hope I'm being clear in what I'm trying to do.  The reason I have to do
>> it this way is that I don't know which model, and therefore fields, I'm
>> dealing with until run-time.
>> Please ask questions if this isn't clear.
>>
>  --
> 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/-/Rvpb5l-sbaQJ.
>
> 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: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
You can use python's setattr function to do this:

for k,v in fields.iteritems():
setattr(inst, k, v)

On Fri, Oct 26, 2012 at 8:37 AM, Chris Pagnutti wrote:

> Say I have a model like
> class MyModel(models.Model)
>name = models.CharField(max_length=100)
>number = models.IntegerField()
>
> In a script, I want to have something like
> fields = {"name":"Joe", "number":5}
>
> And I want to update a MyModel instance using the fields dictionary,
> something like this
> inst = MyModel.objects.get(pk=2)
> for k,v in fields.iteritems():
>inst.k = v   # I tried with inst.F(k) = v and inst.eval(k) = v but
> python doesn't like that either
>
> I hope I'm being clear in what I'm trying to do.  The reason I have to do
> it this way is that I don't know which model, and therefore fields, I'm
> dealing with until run-time.
> Please ask questions if this isn't clear.
>
> --
> 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/-/4ZtEPAjlksQJ.
> 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: Best way to detect if a user has changed password

2012-10-24 Thread Brad Pitcher
You could use a "pre_save" signal. kwargs['instance'] will contain the
updated record and you can get the old record with "User.objects.get(id=
user.id) if user.pk else None". I've done this in the past to check for a
changed email address.

On Wed, Oct 24, 2012 at 2:23 PM, Roarster  wrote:

> I'm running a Django 1.4 site and I have some operations I want to perform
> if a user changes their password.  I'm using the standard contrib.auth user
> accounts with the normal password_change view and I'm not sure if I should
> somehow hook into this view or if I should use a signal on post_save for
> the user.  If I do use the signal, is it possible to tell when the password
> has been changed?  I do feel that if I can use a signal this might be the
> best approach since it would handle any other password change mechanisms
> that I might add later without any extra work.
>
> Does anyone have any ideas on the best way to do this?
>
> --
> 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/-/yrhcGbYf0f4J.
> 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: static files

2012-10-11 Thread Brad Pitcher
I believe the best way of doing this is to have your image(s) in
static/images and your css in static/css.  Then you can use a relative URL
to set the background image like so:

background-image : url("../images/PAE.jpg")

It's better not to have any CSS mixed in with your HTML anyway.
On Oct 11, 2012 7:49 AM, "luca72"  wrote:

> hello my project is lacated here:
>
> /home/
>   /luca72
> /Scrivania
>   /Quintas_Disegno_definitivo
> /quintas/ here i have the file manage.py ,
>
> than i have the file settings,py here:
> /home
>/luca72
>   /Scrivania
>  /Quintas_Disegno_definitivo
> /quintas
>/quintas, here i have add a folder "static" with and image
> called PAE.jpg.
>
> How i have to configure the file setting.py in a way that in my template
> when i write via CSS background-image : url("PAE.jpg") the image is load
>
> I have try a lot of thing but i get that the image is not found.
>
> I use apache in localhost.
>
> Thaks
>
> Luca
>
> --
> 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/-/VXS19g9Ie7MJ.
> 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: Possible spam from mailing list? ("China Mobile")

2012-09-10 Thread Brad Pitcher
Yes, I received a similar email about the post "Re: I can't install django
on my mac. I'm not sure wh..." which I recently responded to. Not sure what
to make of it.

On Mon, Sep 10, 2012 at 12:27 PM, Kurtis  wrote:

> I just received a very unusual e-mail that included a recent post's
> subject. The post in question was: "Re: form doesn't validate when trying
> to upload file". It was sent directly to my email address; by-passing the
> User Group.
>
> Google roughly translated this email as coming from "China Mobile" and
> included the domain "139.com". Has anyone else seen this sort of thing?
> Unfortunately, I am unable to read the language and the Google Translation
> isn't very clear; but it's definitely displayed using a very clean and
> fancy template. I'm not sure if it's spam or something else.
>
> Just figured I'd see if anyone else has gotten an email similar to this.
> Thanks.
>
> --
> 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/-/cs6UrXOcBOkJ.
> 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: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
Glad to here you got it working, and please let us know if you have any
other questions.


On Sun, Sep 9, 2012 at 5:52 PM, Shayan Afridi wrote:

> It works! Thank you all so much. It feels great to know that there is a
> very responsive and helpful support system for django users. Thanks again!
>
> --
> 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: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
I can't speak authoritatively on this, since that's not how it installs in
Linux, but in my understanding the contents of the django.pth file should
be the directory django has been installed to. Check the contents of that
file to see if everything is in order.
An alternative to this is to update PYTHONPATH to point to the folder
django is installed to. A quick test on Mac OSX would look like:
PYTHONPATH=/location/of/django python -c "import django;
print(django.get_version())"
and you could make it more permanent by adding
PYTHONPATH=/location/of/django to your ~/.profile
In windows, you may need to look at your environment variable settings.

On Sun, Sep 9, 2012 at 3:53 PM, Shayan Afridi wrote:

> There is a django.pth there and a README
>
> --
> 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: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
The question is, is django inside one of those directories? It should
probably be installed to C:\Python27\lib\site-packages so there would be a
C:\Python27\lib\site-packages\django directory. Is it there?

On Sun, Sep 9, 2012 at 3:41 PM, Shayan Afridi wrote:

> Interesting. I'm doing it on my PC now, and still getting the same problem.
>
> Then I saw your email:
>
> Here's what I get when I print sys.path. (django's not there)
>
> >>> print sys.path
> ['', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C
> :\\Python27\\lib\\lib-tk', 'C:\\Python27',
> 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages']
>
> the ln line doesn't work for me
>
> --
> 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: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Some versions of flash have a bug that causes the entire browser to
freeze while uploading.  I am afflicted by the bug, running Flash 10.0
r45 on Ubuntu 10.04.  It seems that there is no good solution at the
moment.  My host is Webfaction and I just discovered that they have a
non-configurable nginx server in front of everything that caches
uploads before sending them on to apache/django making it impossible
to do upload progress bars at the moment.  They are aware of the
problem, but who knows when it will be fixed.

On Jun 3, 8:31 am, Venkatraman S  wrote:
> Oh yes! I was referring to a stand alone app. I heard someone complain
> #django that filebrowser aint working right after uploadify was introduced.
> Is that True?
>
> On Thu, Jun 3, 2010 at 8:11 PM, patrickk  wrote:
> >http://code.google.com/p/django-filebrowser/
>
> > cheers,
> > patrick
>
> > On 3 Jun., 16:10, Venkatraman S  wrote:
> > > Hi Patrick,
>
> > > Can you share a simple django app which uses Uploadify?  Did you use
> > vanilla
> > > Uploadify or 
> > > django-uploadify(github.com/tstone/django-uploadify*)*<http://github.com/tstone/django-uploadify*%29*>
> > ?
> > > I have been simply unable to make it run.  I also tried a
> > django-uploadify,
> > > but no results! Frustrating it is.
>
> > > If you can share the code, i would rather use it along with some other
> > > experiments that I have been doing and publish it in the public domain.
>
> > > Regards.
>
> > > On Thu, Jun 3, 2010 at 5:39 PM, patrickk  wrote:
> > > > you could use uploadify, seehttp://www.uploadify.com/.
>
> > > > of course, it´s not an ideal solution since its flash-based.
> > > > we´ve been using uploadify with django and the filebrowser for about a
> > > > year now and it works quite well.
>
> > > > regards,
> > > > patrick
>
> > > > On 3 Jun., 06:32, Venkatraman S  wrote:
> > > > > Tell me about it! Its quite insane that there is no single-standard
> > > > solution
> > > > > for this.
> > > > > I have been hanging around in #django for sometime and there is still
> > > > > opposition to flash based solution. Also, i have not been to get it
> > > > working
> > > > > inspite of it being not an ideal solution.
> > > > > I hear that there are some issues with filebrowser since it uses
> > > > Uploadify.
> > > > > Also, i dont see any solution which works in both dev server and also
> > in
> > > > the
> > > > > production using httpd/apache.
>
> > > > > Going insane! Let me know if you get anything working.
>
> > > > > PS: As i said, html5 is cool and works, but the client does not want
> > to
> > > > use
> > > > > it!
>
> > > > > -V-http://twitter.com/venkasub
>
> > > > > On Thu, Jun 3, 2010 at 9:54 AM, Brad Pitcher 
> > > > wrote:
> > > > > > Sort of, that's what the default is in the demo, but now I've
> > noticed I
> > > > > > have the same problem with apache progress reporting as I did using
> > > > django
> > > > > > progress reporting.  It's behaving like it's not multi-threaded or
> > > > > > something.  It seems like I don't get any progress reports until
> > the
> > > > file
> > > > > > has finished uploading.  It's actually driving me a bit crazy so
> > I'm
> > > > going
> > > > > > to have to move on to something else for a while.
>
> > > > > > On Wed, Jun 2, 2010 at 9:16 PM, Venkatraman S 
> > > > wrote:
>
> > > > > >> Does this work with the Django development server?
>
> > > > > >> On Thu, Jun 3, 2010 at 8:13 AM, Brad Pitcher <
> > bradpitc...@gmail.com
> > > > >wrote:
>
> > > > > >>> Since I just spent much longer than it should have taken figuring
> > > > this
> > > > > >>> out, I will try and help you out.  I followed the instructions at
> > the
> > > > > >>> provided link and it sort of worked.  Not quite as well as I
> > liked.
> > > >  I
> > > > > >>> used Apache for the progress reporting, which the author doesn't
> > > > > >>> mention in the article but it is discussed here:
>
> > > >http://piotrsarnacki.com/2008/06/18/upload-

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Whoops!  Just read that the django dev server is not multithreaded so
it will not work.  But you should be able to use any web server along
with an upload_progress view as long as your web server streams the
upload in progress to django.  I think my troubles may be because the
web server isn't streaming the file upload to django, I'm currently
investigating that.

On Jun 2, 9:24 pm, Brad Pitcher  wrote:
> Sort of, that's what the default is in the demo, but now I've noticed I have
> the same problem with apache progress reporting as I did using django
> progress reporting.  It's behaving like it's not multi-threaded or
> something.  It seems like I don't get any progress reports until the file
> has finished uploading.  It's actually driving me a bit crazy so I'm going
> to have to move on to something else for a while.
>
> On Wed, Jun 2, 2010 at 9:16 PM, Venkatraman S  wrote:
> > Does this work with the Django development server?
>
> > On Thu, Jun 3, 2010 at 8:13 AM, Brad Pitcher wrote:
>
> >> Since I just spent much longer than it should have taken figuring this
> >> out, I will try and help you out.  I followed the instructions at the
> >> provided link and it sort of worked.  Not quite as well as I liked.  I
> >> used Apache for the progress reporting, which the author doesn't
> >> mention in the article but it is discussed here:
>
> >>http://piotrsarnacki.com/2008/06/18/upload-progress-bar-with-mod_pass...
> >> (it involves compiling and installing an apache module).
> >> The author also doesn't mention changes needed in settings.py:
> >> from django.conf import global_settings
>
> >> FILE_UPLOAD_HANDLERS = ('path.to.UploadProgressCachedHandler', ) +
> >> \    <-- change path here
> >>    global_settings.FILE_UPLOAD_HANDLERS
>
> >> If you are using nginx or apache for the server side instead of
> >> django, you will need to modify progressUrl to point to whatever url
> >> you set up for accessing progress reports.
>
> >> If you are looking for a demo, there is one linked in the article
> >> creecode posted.
> >> -Brad
>
> >> On May 30, 12:23 pm, Venkatraman S  wrote:
> >> > HI creecode,
>
> >> > Can you share the project please? I can probably work on it and see what
> >> is
> >> > happening.
> >> > Till now, i havent even been able to get this working.
>
> >> > -V
>
> >> > On Sun, May 30, 2010 at 10:45 PM, creecode  wrote:
> >> > > Hello V,
>
> >> > > On May 29, 11:00 pm, Venkatraman S  wrote:
>
> >> > > > I have been trying to build a simple file upload with progress bar.
>
> >> > > AFAIK there isn't a simple solution.  Perhaps this info <
>
> >> > >http://www.fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress.
> >> ..
> >> > > > will point you in the right direction.
>
> >> > > I've experimented with a solution based tthe above but I wasn't
> >> > > entirely satisfied with my implementation.  I'm having a problem with
> >> > > the progress bar not reaching 100% many times and some problems with
> >> > > the percentage complete number.
>
> >> > > I've put my project on the back burner for now but if anyone has any
> >> > > examples they'd like to share I'd be interested in seeing them.
>
> >> > > Toodle-looo...
> >> > > creecode
>
> >> > > --
> >> > > 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.
>
> >  --
> > 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: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Sort of, that's what the default is in the demo, but now I've noticed I have
the same problem with apache progress reporting as I did using django
progress reporting.  It's behaving like it's not multi-threaded or
something.  It seems like I don't get any progress reports until the file
has finished uploading.  It's actually driving me a bit crazy so I'm going
to have to move on to something else for a while.

On Wed, Jun 2, 2010 at 9:16 PM, Venkatraman S  wrote:

> Does this work with the Django development server?
>
>
> On Thu, Jun 3, 2010 at 8:13 AM, Brad Pitcher wrote:
>
>> Since I just spent much longer than it should have taken figuring this
>> out, I will try and help you out.  I followed the instructions at the
>> provided link and it sort of worked.  Not quite as well as I liked.  I
>> used Apache for the progress reporting, which the author doesn't
>> mention in the article but it is discussed here:
>>
>> http://piotrsarnacki.com/2008/06/18/upload-progress-bar-with-mod_passenger-and-apache/
>> (it involves compiling and installing an apache module).
>> The author also doesn't mention changes needed in settings.py:
>> from django.conf import global_settings
>>
>> FILE_UPLOAD_HANDLERS = ('path.to.UploadProgressCachedHandler', ) +
>> \<-- change path here
>>global_settings.FILE_UPLOAD_HANDLERS
>>
>> If you are using nginx or apache for the server side instead of
>> django, you will need to modify progressUrl to point to whatever url
>> you set up for accessing progress reports.
>>
>> If you are looking for a demo, there is one linked in the article
>> creecode posted.
>> -Brad
>>
>> On May 30, 12:23 pm, Venkatraman S  wrote:
>> > HI creecode,
>> >
>> > Can you share the project please? I can probably work on it and see what
>> is
>> > happening.
>> > Till now, i havent even been able to get this working.
>> >
>> > -V
>> >
>> > On Sun, May 30, 2010 at 10:45 PM, creecode  wrote:
>> > > Hello V,
>> >
>> > > On May 29, 11:00 pm, Venkatraman S  wrote:
>> >
>> > > > I have been trying to build a simple file upload with progress bar.
>> >
>> > > AFAIK there isn't a simple solution.  Perhaps this info <
>> >
>> > >http://www.fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress.
>> ..
>> > > > will point you in the right direction.
>> >
>> > > I've experimented with a solution based tthe above but I wasn't
>> > > entirely satisfied with my implementation.  I'm having a problem with
>> > > the progress bar not reaching 100% many times and some problems with
>> > > the percentage complete number.
>> >
>> > > I've put my project on the back burner for now but if anyone has any
>> > > examples they'd like to share I'd be interested in seeing them.
>> >
>> > > Toodle-looo...
>> > > creecode
>> >
>> > > --
>> > > 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.
>>
>>
>  --
> 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: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Since I just spent much longer than it should have taken figuring this
out, I will try and help you out.  I followed the instructions at the
provided link and it sort of worked.  Not quite as well as I liked.  I
used Apache for the progress reporting, which the author doesn't
mention in the article but it is discussed here:
http://piotrsarnacki.com/2008/06/18/upload-progress-bar-with-mod_passenger-and-apache/
(it involves compiling and installing an apache module).
The author also doesn't mention changes needed in settings.py:
from django.conf import global_settings

FILE_UPLOAD_HANDLERS = ('path.to.UploadProgressCachedHandler', ) +
\<-- change path here
global_settings.FILE_UPLOAD_HANDLERS

If you are using nginx or apache for the server side instead of
django, you will need to modify progressUrl to point to whatever url
you set up for accessing progress reports.

If you are looking for a demo, there is one linked in the article
creecode posted.
-Brad

On May 30, 12:23 pm, Venkatraman S  wrote:
> HI creecode,
>
> Can you share the project please? I can probably work on it and see what is
> happening.
> Till now, i havent even been able to get this working.
>
> -V
>
> On Sun, May 30, 2010 at 10:45 PM, creecode  wrote:
> > Hello V,
>
> > On May 29, 11:00 pm, Venkatraman S  wrote:
>
> > > I have been trying to build a simple file upload with progress bar.
>
> > AFAIK there isn't a simple solution.  Perhaps this info <
>
> >http://www.fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress...
> > > will point you in the right direction.
>
> > I've experimented with a solution based tthe above but I wasn't
> > entirely satisfied with my implementation.  I'm having a problem with
> > the progress bar not reaching 100% many times and some problems with
> > the percentage complete number.
>
> > I've put my project on the back burner for now but if anyone has any
> > examples they'd like to share I'd be interested in seeing them.
>
> > Toodle-looo...
> > creecode
>
> > --
> > 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: Setting list_display for InlineModelAdmin

2010-04-21 Thread Brad Pitcher
Thank you for setting me straight.  What a dumb mistake.  :)

On Apr 21, 11:03 am, Daniel Roseman  wrote:
> On Apr 21, 3:20 pm, Brad  Pitcher  wrote:
>
> > Hi guys,
> > This is driving me a little crazy, so I hope someone can offer good
> > advice.  I've specified an inline class in my admin.py file, and in it
> > I have specified a subset of the classes attributes with
> > list_display.  However, what I set in list_display has no effect on
> > what is rendered for the inline.  I don't understand, the
> > documentation says that TabularInline and StackInline both inherit
> > from ModelAdmin, so they should also use list_display.
> > What am I missing?
>
> > I'm using Django-1.1.1
> > Thanks,
> > Brad
>
> What makes you think that? 'list_display' controls the elements that
> are displayed on the changelist page for a model, not in the edit
> form. As with the main admin class, if you want to determine what
> fields are available on the form, use 'fields' or 'exclude'.
> --
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

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



Setting list_display for InlineModelAdmin

2010-04-21 Thread Brad Pitcher
Hi guys,
This is driving me a little crazy, so I hope someone can offer good
advice.  I've specified an inline class in my admin.py file, and in it
I have specified a subset of the classes attributes with
list_display.  However, what I set in list_display has no effect on
what is rendered for the inline.  I don't understand, the
documentation says that TabularInline and StackInline both inherit
from ModelAdmin, so they should also use list_display.
What am I missing?

I'm using Django-1.1.1
Thanks,
Brad

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