Thursday, June 30, 2016

initial costom field in modelform

hi everyone:

i defined tbls  customer and salesorder in my db, 
i want to show the customer name in my form but want not to save it in salesorder tbl,
how can i initial it for gui?
my code is :
#model
class Customer(models.Model):
name=models.CharField(max_length=40)
abbreviation=models.CharField(max_length=20)

class SalesOrder(models.Model):
customer=models.ForeignKey(Customer,related_name='by_customer',on_delete=models.CASCADE)

#form
class SalesOrderForm(forms.ModelForm):
customer_name=forms.CharField(required=False,widget=forms.TextInput(attrs={'readonly':''}))
class Meta:
model=SalesOrder
fields = ['customer','customer_name',]

thanks


1351552638@qq.com
 

Re: "canonical" views.py in Django Unleashed book, Chapter 22

p.s. -

I did have a couple of other questions, if you don't mind:

1. You end 22.6 by saying

In an actual website, you likely won't interact with the auth in the way we have. You'll rely on third-party apps to provide object-level permissions or else on authentication with other services such as Twitter and Facebook.

I found that surprising, but then I'm somewhat isolated so don't claim to know what other folks are doing. Why is this the common practice? Just to save time because the tools are available?

2. In 22.5, you recommended a static url for profile pages.  Quite apart from how often people may update their pages, I didn't understand why you suggest that for an otherwise dynamic website. I guess I just assumed static urls and static (or 'flat'. as Django likes to call them) pages go together, like About Us, and that such pages would be the exception. Was this just to make the profiles easy to find and/or bookmark for end users?

Thanks again.




On Wednesday, June 29, 2016 at 5:13:42 PM UTC-7, Malik Rumi wrote:
Although I love the book (so far) for its level of detail and addressing a LOT of issues I am currently dealing with, I have run across a problem. Specifically, the views.py and urls.py in the github repo are NOT the same as the snippets of views.py and urls.py in the book. Now, since I started in Chapter 20, because that's where my issues are, it is possible that all of this is explained and cleared up elsewhere, but a quick search in the online version of the book did not reveal same to me, so,as the author himself asks, I am posting here.

Github views.py

starting at line 128:
@class_login_required
class ProfileDetail(
ProfileGetObjectMixin, DetailView):
model = Profile


views.py book example 22.13
 26   from core.utils import UpdateView
...
134   @class_login_required
135   class ProfileUpdate(
136           ProfileGetObjectMixin, UpdateView)
:137       fields = ('about',)
138       model = Profile

There is no core.utils or UpdateView in the github version


views.py in book example 22.19
134   class PublicProfileDetail(DetailView):
135       model = Profile

There is no PublicProfileDetail in the github version


urls.py in book example 22.20
 10   from .views import (
11       ActivateAccount, CreateAccount,
12       DisableAccount, ProfileDetail, ProfileUpdate,
13       PublicProfileDetail, ResendActivationEmail)  .      
...
67   urlpatterns = [  .     
 ...
114       url(r'^(?P<slug>[\w\-]+)/$',
115           PublicProfileDetail.as_view(),
116           name='public_profile'),
117   ]

Again, there is no PublicProfileDetail in the github version, which stops at line 111

There may be more, but that's what I have right now. It does not make sense to me that the author would go to all this trouble to talk about Public Profiles and then omit them, especially since allowing users to both have them and edit them themselves makes so much sense. Now, I do have the code from the book, which is why I framed my question as the "canonical" version of these codes. 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+unsubscribe@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/b9f5f11e-c6b5-4c2d-b0fe-097005294486%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: "canonical" views.py in Django Unleashed book, Chapter 22

1. I don't know if it makes any difference, but I don't have the physical book. I am reading it online thru my safarionline subscription.
2. Once I got to your repo, I just clicked around to go to views or urls or whatever. I didn't think of looking for different commits, because I assumed, wrongly, that there would only be one, final, 'canonical' version of the code.
3. Looking specifically at urls.py on githhub, I can now see that the link you pointed me to is at a different url and has a different commit than the one I had looked at. Compare

https://github.com/jambonrose/DjangoUnleashed-1.8/blob/a1d420b17a/user/urls.py
https://github.com/jambonrose/DjangoUnleashed-1.8/blob/83167965e86b82a86a25504c82285dccd79b9e32/user/urls.py

So that must be the issue. Not sure what you can do about that except put a lot of notes in the repo. Cloning the whole thing is probably a good idea.

For your marketing fyi, I found out about you and the book after looking at your DjangoCon talk about the request response cycle. It so happens I have an immediate need to swap out the default user, so those chapters were right on time for me.

Thanks.

On Wednesday, June 29, 2016 at 5:13:42 PM UTC-7, Malik Rumi wrote:
Although I love the book (so far) for its level of detail and addressing a LOT of issues I am currently dealing with, I have run across a problem. Specifically, the views.py and urls.py in the github repo are NOT the same as the snippets of views.py and urls.py in the book. Now, since I started in Chapter 20, because that's where my issues are, it is possible that all of this is explained and cleared up elsewhere, but a quick search in the online version of the book did not reveal same to me, so,as the author himself asks, I am posting here.

Github views.py

starting at line 128:
@class_login_required
class ProfileDetail(
ProfileGetObjectMixin, DetailView):
model = Profile


views.py book example 22.13
 26   from core.utils import UpdateView
...
134   @class_login_required
135   class ProfileUpdate(
136           ProfileGetObjectMixin, UpdateView)
:137       fields = ('about',)
138       model = Profile

There is no core.utils or UpdateView in the github version


views.py in book example 22.19
134   class PublicProfileDetail(DetailView):
135       model = Profile

There is no PublicProfileDetail in the github version


urls.py in book example 22.20
 10   from .views import (
11       ActivateAccount, CreateAccount,
12       DisableAccount, ProfileDetail, ProfileUpdate,
13       PublicProfileDetail, ResendActivationEmail)  .      
...
67   urlpatterns = [  .     
 ...
114       url(r'^(?P<slug>[\w\-]+)/$',
115           PublicProfileDetail.as_view(),
116           name='public_profile'),
117   ]

Again, there is no PublicProfileDetail in the github version, which stops at line 111

There may be more, but that's what I have right now. It does not make sense to me that the author would go to all this trouble to talk about Public Profiles and then omit them, especially since allowing users to both have them and edit them themselves makes so much sense. Now, I do have the code from the book, which is why I framed my question as the "canonical" version of these codes. 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+unsubscribe@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/5c7186c9-6caf-42c4-a062-f9d58798a3e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: "canonical" views.py in Django Unleashed book, Chapter 22

Hi Malik!
Thanks for buying my book! I'm glad to hear you like Django Unleashed, but I'm sorry you're frustrated with the github repo at https://github.com/jambonrose/DjangoUnleashed-1.8 .

Page xiv provides a quick explanation of git commits' relationship to the examples in the book. In short: each example in the book has a corresponding commit in the github repo (1+ examples per commit). This is why each example lists 'filename in hash' at the top of the example. If you suffix http://dju.link/ with a commit, it will take you to the diff on github.

For instance, in example 22.13 (which you referenced), the example is listed as being 'user/views.py in 83167965e8'. You can browse to http://dju.link/83167965e8 to be redirected to the diff of that commit on github, or else to http://dju.link/83167965e8/user/views.py to see the state of the file at that commit.

NB: if you browse the code on github without adjusting the commit, you're seeing the code as it is in Chapter 29 (Chapter 30 has no code in the repo).

If you don't want to browse github, you can also clone the repo, checkout commit 83167965e8, and then have the project to run directly on your computer!

Note that each commit message is prefixed with the Chapter that references it (such as 'Ch22: Create Profile Update web page.'). What's more, the sample gitconfig file in the repo comes with a few neat commands to make moving around the repo easier. See https://github.com/jambonrose/DjangoUnleashed-1.8#walking-the-repository for more info.

Now, to address some of your points directly:

> There is no core.utils or UpdateView in the github version

https://github.com/jambonrose/DjangoUnleashed-1.8/blob/master/core/utils.py#L5

> There is no PublicProfileDetail in the github version

http://dju.link/a1d420b17a
->
https://github.com/jambonrose/DjangoUnleashed-1.8/commit/a1d420b17a/

You can then browse to:
https://github.com/jambonrose/DjangoUnleashed-1.8/blob/a1d420b17a/user/views.py#L134

> Again, there is no PublicProfileDetail in the github version, which stops at line 111

http://dju.link/a1d420b17a/user/urls.py
->
https://github.com/jambonrose/DjangoUnleashed-1.8/blob/a1d420b17a/user/urls.py

Relevant line is 114:
https://github.com/jambonrose/DjangoUnleashed-1.8/blob/a1d420b17a/user/urls.py#L114

I'm not super sure what you were looking at, or where the confusion occurred, but I would be open to your feedback about what you were seeing and how you got there, so that I may help others better get the code examples (as I spent *a lot* of time making the repo as cleans as possible given my deadlines).

Hope that's helpful,
Andrew

--
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+unsubscribe@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/86CD3FC7-D9F3-4705-9410-6275E6C93907%40andrewsforge.com.
For more options, visit https://groups.google.com/d/optout.

Re: Help me!!! django

There's a nice LDAP app for Django at https://pypi.python.org/pypi/django-auth-ldap/1.2.8 but I'm not sure if it's suitable for what you need to do. I think you need a Python LDAP module to create a connection, bind, perform a simple search and then parse the results to get those email addresses.


Cheers,

M

On Fri, 1 Jul 2016 at 07:53 Цибарт Сергей <tsibart.s@gmail.com> wrote:
urgently need to fasten on the portal, which is on Django, a form https://postimg.org/image/8myn5jqnb/, but I'm new to this. Help, who than can please

--
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+unsubscribe@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/b858661e-30a9-433a-9d05-b7b199247cab%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+unsubscribe@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/CAHqTbjnT2V2PVAa%3D9UgGmbMa8q5DTEp1an9OM6B_g2LZ57gCsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: parallel test running throwing pickleError

Any progress made on this front? I'm seeing this too in a Django 1.9 app using python 2.7

On Monday, February 29, 2016 at 3:24:13 PM UTC-5, girish ramnani wrote:
Sorry i forgot to mention that, i have installed the tblib. this is my pip list output

Django (1.10.dev20160216200705, /home/girish/Documents/Github/django)
fancycompleter (0.4)
ordereddict (1.1)
pdbpp (0.8.3)
pip (8.0.3)
py (1.4.31)
Pygments (2.1.2)
pytest (2.8.7)
setuptools (18.2)
tblib (1.2.0)
wheel (0.24.0)
wmctrl (0.3)


On Monday, February 29, 2016 at 11:07:37 PM UTC+5:30, Simon Charette wrote:
Hi Girish,

I think you didn't to install the `tblib` package[1].

Cheers,
Simon

[1] https://docs.djangoproject.com/en/1.9/ref/django-admin/#cmdoption-test--parallel

Le lundi 29 février 2016 12:13:08 UTC-5, girish ramnani a écrit :
when running the django test in parallel using the runner.py .
_pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleImportFailure'>: attribute lookup ModuleImportFailure on unittest.loader failed

error is thrown, and when the runner is run using a single process. the test suite executes.

I am using a new virtualenv with django installed in editable mode.

--
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+unsubscribe@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/8eec5343-d145-439d-b210-b317552e9733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Help me!!! django

urgently need to fasten on the portal, which is on Django, a form https://postimg.org/image/8myn5jqnb/, but I'm new to this. Help, who than can please

--
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+unsubscribe@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/b858661e-30a9-433a-9d05-b7b199247cab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Contribute to Django - Python 3 or Python 2


2016-06-28 22:13 GMT-03:00 Tim Graham <timograham@gmail.com>:
You can use either, but use Python 3. You can rely on the continuous integration server to test your pull request on Python 2 and debug any issues

Can you given an example of "most places python2 is used"? In fact, the tutorial says, "This tutorial assumes you are using Python 3."

On Tuesday, June 28, 2016 at 7:45:02 PM UTC-4, premdjango wrote:
Hello,
Im trying to contribute to Django project and started with this document.


Here in couple of places I see Python3 is being used but in most places python2 is used.

Should I use Python 3 or Python 2?


--
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+unsubscribe@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/a0539448-0019-40a2-b732-e2c44799877b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ricardo Daniel Quiroga

--
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+unsubscribe@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/CAO2-wHa0Onh2Ng03sHUDOJAcz3BkLGASkWAkDcJkkF7U884GoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: Real time change color website

:) then this is not the proper place to look for answers.. the soul purpose of this group is to help people in django related issues.


On Thu, Jun 30, 2016, 5:57 PM Ricardo Daniel Quiroga <l2radamanthys@gmail.com> wrote:
Hi
this site use many overlaping layers in a canvas to generate the image. This is a Javascript cambas problem not django.


2016-06-30 5:59 GMT-03:00 Akhil Lawrence <akhilputhiry@gmail.com>:
Hi,

Your requirement has nothing to do with django. The images should be combined using JS/CSS. Its a pure front end tweak. 

If your question is regarding the backend. Definitely django can do the job. What I mean is, you can build API's using django which will server layers of images requested and using JS/CSS you have to combine all those layers to get the actual picture.




On Thursday, 30 June 2016 12:30:51 UTC+5:30, Arshpreet Singh wrote:
Hey guys, Anyone  aware of example/project developed in Django that can make functionality of website like this:https://www.msistone.com/kitchen-visualizer.aspx#?id=main_image5
Where I can change object colors in real time, as I see from this image https://www.msistone.com/VisualizerResponsive/images/kitchen51/VS0029FL.png multiple images being loaded.

Is such technique possible using Django?

--
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+unsubscribe@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.



--

Ricardo Daniel Quiroga

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/qPNy5KXv6fs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@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/CAO2-wHZoa4O-Yo_S1i2P4sJ%2Bkb%2B44dVPDVrbXY59DZ69xwhVMQ%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+unsubscribe@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/CAJLQkkaD4WFE2g_32cPR4CqroJFYihHsMc7unYjmddTZww2J8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

data processing services

DataAngle Technologies is an ITES and Project Consulting firm providing expertise services in Business Process Outsourcing (BPO), Market Research, B2B Lead Generation, Recruitment and Digital Marketing. We specialize in providing innovative, reliable and cost-effective Business Process Outsourcing (BPO) Services to customers across the globe for key business processes for both voice and non-voice

Contact:   http://www.datangle.net/

# 310, Aditya Trade Center
Ameerpet
Hyderabad – 500 038

--
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+unsubscribe@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/6f9398a0-0049-47d6-b641-81eb8d8bcf0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Real time change color website

Hi
this site use many overlaping layers in a canvas to generate the image. This is a Javascript cambas problem not django.


2016-06-30 5:59 GMT-03:00 Akhil Lawrence <akhilputhiry@gmail.com>:
Hi,

Your requirement has nothing to do with django. The images should be combined using JS/CSS. Its a pure front end tweak. 

If your question is regarding the backend. Definitely django can do the job. What I mean is, you can build API's using django which will server layers of images requested and using JS/CSS you have to combine all those layers to get the actual picture.




On Thursday, 30 June 2016 12:30:51 UTC+5:30, Arshpreet Singh wrote:
Hey guys, Anyone  aware of example/project developed in Django that can make functionality of website like this:https://www.msistone.com/kitchen-visualizer.aspx#?id=main_image5
Where I can change object colors in real time, as I see from this image https://www.msistone.com/VisualizerResponsive/images/kitchen51/VS0029FL.png multiple images being loaded.

Is such technique possible using Django?

--
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+unsubscribe@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/59825349-ba60-4274-8a58-22e3c883e1f3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ricardo Daniel Quiroga

--
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+unsubscribe@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/CAO2-wHZoa4O-Yo_S1i2P4sJ%2Bkb%2B44dVPDVrbXY59DZ69xwhVMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: error logging in after updating to 1.9

It seems like in 1.6 template code like this:

{% if error %}
...
{% endif %}

Was OK. But in 1.9 if error is not defined it throws an exception. So
in 1.9 what is the proper way to check to see if a variable is defined
or not?

On Tue, Jun 28, 2016 at 4:03 PM, Larry Martell <larry.martell@gmail.com> wrote:
> I had a 1.6 app and I updated to 1.9. Now when I try to login it fails
> and I see this in the logs. This works in 1.6. Any ideas what the
> issue is?
>
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'STATIC_URL' in template 'registration/login.html'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [STATIC_URL] in
> u"[{'False': False, 'None': None, 'True': True}, {u'csrf_token':
> <SimpleLazyObject: <function _get_val at 0x7f0e9b8886e0>>,
> 'PYTHON_VERSION': '2.7.9 (default, Mar 1 2015, 13:01:26) ', 'perms':
> <django.contrib.auth.context_processors.PermWrapper object at
> 0x7f0e9ae23290>, u'request': <WSGIRequest: GET '/'>, 'ELUCID_VERSION':
> 'unknown', 'messages':
> <django.contrib.messages.storage.fallback.FallbackStorage object at
> 0x7f0e9ae23310>, 'is_elucid': True, 'my_reports': {},
> 'ELUCID_HOSTNAME': '0d226ac61524', 'user': <SimpleLazyObject: <User:
> admin>>, 'ELUCID_SERVER_NAME': 'localhost', 'NAVSTRUCT': [],
> 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'WARNING': 30,
> 'SUCCESS': 25, 'ERROR': 40}, 'base_template': 'base_elucid.html',
> 'DJANGO_VERSION': '1.9'}, {}, {'site_name': 'bekku.bbmsc.com:8004',
> 'site': <django.contrib.sites.requests.RequestSite object at
> 0x7f0e9ae23750>, 'form': <AuthenticationForm bound=False,
> valid=Unknown, fields=(username;password)>, 'next': ''}]"
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'msie6_user_agent' in template
> 'registration/login.html'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [msie6_user_agent] in
> u"[{'False': False, 'None': None, 'True': True}, {u'csrf_token':
> <SimpleLazyObject: <function _get_val at 0x7f0e9b8886e0>>,
> 'PYTHON_VERSION': '2.7.9 (default, Mar 1 2015, 13:01:26) ', 'perms':
> <django.contrib.auth.context_processors.PermWrapper object at
> 0x7f0e9ae23290>, u'request': <WSGIRequest: GET '/'>, 'ELUCID_VERSION':
> 'unknown', 'messages':
> <django.contrib.messages.storage.fallback.FallbackStorage object at
> 0x7f0e9ae23310>, 'is_elucid': True, 'my_reports': {},
> 'ELUCID_HOSTNAME': '0d226ac61524', 'user': <SimpleLazyObject: <User:
> admin>>, 'ELUCID_SERVER_NAME': 'localhost', 'NAVSTRUCT': [],
> 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'WARNING': 30,
> 'SUCCESS': 25, 'ERROR': 40}, 'base_template': 'base_elucid.html',
> 'DJANGO_VERSION': '1.9'}, {}, {'site_name': 'bekku.bbmsc.com:8004',
> 'site': <django.contrib.sites.requests.RequestSite object at
> 0x7f0e9ae23750>, 'form': <AuthenticationForm bound=False,
> valid=Unknown, fields=(username;password)>, 'next': ''}]"
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'STATIC_URL' in template 'registration/login.html'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [STATIC_URL] in
> u"[{'False': False, 'None': None, 'True': True}, {u'csrf_token':
> <SimpleLazyObject: <function _get_val at 0x7f0e9b8886e0>>,
> 'PYTHON_VERSION': '2.7.9 (default, Mar 1 2015, 13:01:26) ', 'perms':
> <django.contrib.auth.context_processors.PermWrapper object at
> 0x7f0e9ae23290>, u'request': <WSGIRequest: GET '/'>, 'ELUCID_VERSION':
> 'unknown', 'messages':
> <django.contrib.messages.storage.fallback.FallbackStorage object at
> 0x7f0e9ae23310>, 'is_elucid': True, 'my_reports': {},
> 'ELUCID_HOSTNAME': '0d226ac61524', 'user': <SimpleLazyObject: <User:
> admin>>, 'ELUCID_SERVER_NAME': 'localhost', 'NAVSTRUCT': [],
> 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'WARNING': 30,
> 'SUCCESS': 25, 'ERROR': 40}, 'base_template': 'base_elucid.html',
> 'DJANGO_VERSION': '1.9'}, {}, {'site_name': 'bekku.bbmsc.com:8004',
> 'site': <django.contrib.sites.requests.RequestSite object at
> 0x7f0e9ae23750>, 'form': <AuthenticationForm bound=False,
> valid=Unknown, fields=(username;password)>, 'next': ''}]"
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'User' in template 'registration/login.html'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [User] in u"<WSGIRequest: GET '/'>"
> [28/Jun/2016 17:43:51] WARNING [django.request:182] Not Found:
> /scripts/chosen/chosen.css
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'name' in template 'unknown'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [name] in
> u'<RegexURLResolver <RegexURLPattern list> (admin:admin) ^admin/>'
> [28/Jun/2016 17:43:51] WARNING [django.request:182] Not Found:
> /scripts/chosen/chosen.jquery.min.js
> [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while
> resolving variable 'name' in template 'unknown'.
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py",
> line 901, in _resolve_lookup
> (bit, current)) # missing attribute
> VariableDoesNotExist: Failed lookup for key [name] in
> u'<RegexURLResolver <RegexURLPattern list> (admin:admin) ^admin/>'

--
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+unsubscribe@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/CACwCsY4toCoB6NDETS-Y0p3AOAvWL%2BkYsVTyMV-gH-PWjL7wNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

To answer  how do I change from function based views to class based views,

The simplest way to do that is, 


create a view file as below:

from django.views.generic import View


class ViewName(View):

    def get(self, request, *args, **kwargs):
        <copy everything you doing inside your view for GET method>

    def post(self, request, *args, **kwargs):
        <copy everything you doing inside your view for POST method>

    <similarly do for other methods (PUT, DELETE, OPTIONS etc) if needed>


update urls.py with this view :)



On Wednesday, 29 June 2016 10:51:18 UTC+5:30, Mike Dewhirst wrote:
Sorry for hijacking a thread from Mezzanine ...

On 29/06/2016 11:22 AM, Sam Kingston wrote:
> I'm not sure if this will help you or not, but I developed a replacement
> library for xhtml2pdf (though not a drop-in):
>
> https://github.com/sjkingo/pywkhtmltopdf

Thank you Sam :)

Do you have a separate users list for questions?

In case not, I'm trying to display a page produced with function-based
views. Is there a hint you can offer?

I want the "View on site" button to produce pdf.

Maybe the real question is how do I change from function based views to
class based views - which BTW I don't want to do.

Thanks

Mike


>
> On Friday, 24 June 2016 20:13:05 UTC+10, Joseph Mohan wrote:
>
>     Any other things i'm missing with regards to getting an image into
>     the .pdf invoices?
>
>     Set the url to a full path
>
>     Tried .png/.jpgÂ
>
>     Nothing...
>
>     Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mezzanine-use...@googlegroups.com
> <mailto:mezzanine-users+unsubscribe@googlegroups.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+unsubscribe@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/482367e1-4ebc-469c-b318-2dcabfcbc12b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Real time change color website

Hi,

Your requirement has nothing to do with django. The images should be combined using JS/CSS. Its a pure front end tweak. 

If your question is regarding the backend. Definitely django can do the job. What I mean is, you can build API's using django which will server layers of images requested and using JS/CSS you have to combine all those layers to get the actual picture.

http://stackoverflow.com/questions/18235709/css-placing-one-image-on-top-of-another may help you to arrange the images.. 



On Thursday, 30 June 2016 12:30:51 UTC+5:30, Arshpreet Singh wrote:
Hey guys, Anyone  aware of example/project developed in Django that can make functionality of website like this:https://www.msistone.com/kitchen-visualizer.aspx#?id=main_image5
Where I can change object colors in real time, as I see from this image https://www.msistone.com/VisualizerResponsive/images/kitchen51/VS0029FL.png multiple images being loaded.

Is such technique possible using Django?

--
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+unsubscribe@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/59825349-ba60-4274-8a58-22e3c883e1f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: What is the full testing toolkit any Python/Djang/JS developer?

nose, pytest and unittests
really?

On Thu, Jun 30, 2016 at 9:33 AM, Seti Volkylany <setivolkylany@gmail.com> wrote:
Now, I am using: factory-boy, selenium, nose, pytest and unittests.
I have a plan use in future QUnit and Continuous Integration. May be it is enough?
Who using yet tools?

--
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+unsubscribe@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/2132b242-43ca-4c19-b9b7-f3a11e3d553a%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+unsubscribe@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/CAFWa6tJvK-KchtMPDM7h28NXFstKVVZA6vvS5ARqFH7Cgbk8UA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Real time change color website

Hey guys, Anyone  aware of example/project developed in Django that can make functionality of website like this:https://www.msistone.com/kitchen-visualizer.aspx#?id=main_image5
Where I can change object colors in real time, as I see from this image https://www.msistone.com/VisualizerResponsive/images/kitchen51/VS0029FL.png multiple images being loaded.

Is such technique possible using Django?

--
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+unsubscribe@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/23d7ab32-975b-4b1e-810c-b021bbdc0117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, June 29, 2016

What is the full testing toolkit any Python/Djang/JS developer?

Now, I am using: factory-boy, selenium, nose, pytest and unittests.
I have a plan use in future QUnit and Continuous Integration. May be it is enough?
Who using yet tools?

--
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+unsubscribe@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/2132b242-43ca-4c19-b9b7-f3a11e3d553a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

"canonical" views.py in Django Unleashed book, Chapter 22

Although I love the book (so far) for its level of detail and addressing a LOT of issues I am currently dealing with, I have run across a problem. Specifically, the views.py and urls.py in the github repo are NOT the same as the snippets of views.py and urls.py in the book. Now, since I started in Chapter 20, because that's where my issues are, it is possible that all of this is explained and cleared up elsewhere, but a quick search in the online version of the book did not reveal same to me, so,as the author himself asks, I am posting here.

Github views.py

starting at line 128:
@class_login_required
class ProfileDetail(
ProfileGetObjectMixin, DetailView):
model = Profile


views.py book example 22.13
 26   from core.utils import UpdateView
...
134   @class_login_required
135   class ProfileUpdate(
136           ProfileGetObjectMixin, UpdateView)
:137       fields = ('about',)
138       model = Profile

There is no core.utils or UpdateView in the github version


views.py in book example 22.19
134   class PublicProfileDetail(DetailView):
135       model = Profile

There is no PublicProfileDetail in the github version


urls.py in book example 22.20
 10   from .views import (
11       ActivateAccount, CreateAccount,
12       DisableAccount, ProfileDetail, ProfileUpdate,
13       PublicProfileDetail, ResendActivationEmail)  .      
...
67   urlpatterns = [  .     
 ...
114       url(r'^(?P<slug>[\w\-]+)/$',
115           PublicProfileDetail.as_view(),
116           name='public_profile'),
117   ]

Again, there is no PublicProfileDetail in the github version, which stops at line 111

There may be more, but that's what I have right now. It does not make sense to me that the author would go to all this trouble to talk about Public Profiles and then omit them, especially since allowing users to both have them and edit them themselves makes so much sense. Now, I do have the code from the book, which is why I framed my question as the "canonical" version of these codes. 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+unsubscribe@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/cf3568a8-5190-4c92-8e9b-9c88b612e14a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Is this behavior with Meta Ordering and Group By expected?

Thanks!  I don't see how the link you provided justifies your point.  I don't see anything in there saying that specifying an ordering will subsume group by statements.  How did you know this was expected?

But..in any case I'm happy to take your word for it.  And thanks a bunch for the workaround!

-Eric

On Wednesday, June 29, 2016 at 3:12:08 PM UTC-7, Fabio Caritas Barrionuevo da Luz wrote:
Hi Eric. 


If ordering is defined on model Meta, the ORDER BY SQL is included by default in all query.

to avoid this behavior, you can use order_by() without parameters: 

eg: 

A.objects.order_by().values('b').annotate(most_recent=Max('created_at'))



On Wed, Jun 29, 2016 at 5:39 PM, eric conner <ericw...@gmail.com> wrote:
Hello!

I'm using Django 1.9.7, MySQL innodb 5.7.11, and python 2.7.10.

I noticed some strange behavior when running this query:
q = A.objects.values('b').annotate(most_recent=Max('created_at'))

Produces this SQL:
SELECT `core_a`.`b_id`, MAX(`core_a`.`created_at`) AS `most_recent` FROM `core_a` GROUP BY `core_a`.`id` ORDER BY `core_a`.`id` ASC

which groups by an unexpected field.  I was expecting it to group by `core_a`.`b_id` rather than `core_a`.`id`.

Here are my models:
from __future__ import unicode_literals

from django.db import models
from django.utils import timezone


class B(models.Model):
    created_at = models.DateTimeField(default=timezone.now)


class A(models.Model):
    created_at = models.DateTimeField(default=timezone.now)
    b = models.ForeignKey(B)

    class Meta:
        ordering = ["id"]


If I remove from model A these lines 
    class Meta:
        ordering = ["id"]
then the query produces SQL which groups by the b_id column as expected.

Is this known behavior?  Would this be considered a bug?

Thanks,
-Eric

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



--
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul


Blog colaborativo sobre Python e tecnologias Relacionadas, mantido totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e mandar o pull-request. Leia mais sobre como publicar em README.md e contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python ou é útil para quem usa Python? Está esperando o que? Publica logo, que estou louco para ler...

--
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+unsubscribe@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/c2c8ea58-a55a-47bc-97a3-1ea19602a988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Is this behavior with Meta Ordering and Group By expected?

Hi Eric. 


If ordering is defined on model Meta, the ORDER BY SQL is included by default in all query.

to avoid this behavior, you can use order_by() without parameters: 

eg: 

A.objects.order_by().values('b').annotate(most_recent=Max('created_at'))



On Wed, Jun 29, 2016 at 5:39 PM, eric conner <ericwconner@gmail.com> wrote:
Hello!

I'm using Django 1.9.7, MySQL innodb 5.7.11, and python 2.7.10.

I noticed some strange behavior when running this query:
q = A.objects.values('b').annotate(most_recent=Max('created_at'))

Produces this SQL:
SELECT `core_a`.`b_id`, MAX(`core_a`.`created_at`) AS `most_recent` FROM `core_a` GROUP BY `core_a`.`id` ORDER BY `core_a`.`id` ASC

which groups by an unexpected field.  I was expecting it to group by `core_a`.`b_id` rather than `core_a`.`id`.

Here are my models:
from __future__ import unicode_literals

from django.db import models
from django.utils import timezone


class B(models.Model):
    created_at = models.DateTimeField(default=timezone.now)


class A(models.Model):
    created_at = models.DateTimeField(default=timezone.now)
    b = models.ForeignKey(B)

    class Meta:
        ordering = ["id"]


If I remove from model A these lines 
    class Meta:
        ordering = ["id"]
then the query produces SQL which groups by the b_id column as expected.

Is this known behavior?  Would this be considered a bug?

Thanks,
-Eric

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@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/d06683cc-ea7b-43db-a23b-0ebbd19bd424%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul


Blog colaborativo sobre Python e tecnologias Relacionadas, mantido totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e mandar o pull-request. Leia mais sobre como publicar em README.md e contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python ou é útil para quem usa Python? Está esperando o que? Publica logo, que estou louco para ler...

--
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+unsubscribe@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/CAPVjvMaSmDmiJHmj%2B5B8-tVLsF0jpS0JCVDe62BLr3pqTfDW5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Is this behavior with Meta Ordering and Group By expected?

Hello!

I'm using Django 1.9.7, MySQL innodb 5.7.11, and python 2.7.10.

I noticed some strange behavior when running this query:
q = A.objects.values('b').annotate(most_recent=Max('created_at'))

Produces this SQL:
SELECT `core_a`.`b_id`, MAX(`core_a`.`created_at`) AS `most_recent` FROM `core_a` GROUP BY `core_a`.`id` ORDER BY `core_a`.`id` ASC

which groups by an unexpected field.  I was expecting it to group by `core_a`.`b_id` rather than `core_a`.`id`.

Here are my models:
from __future__ import unicode_literals

from django.db import models
from django.utils import timezone


class B(models.Model):
    created_at = models.DateTimeField(default=timezone.now)


class A(models.Model):
    created_at = models.DateTimeField(default=timezone.now)
    b = models.ForeignKey(B)

    class Meta:
        ordering = ["id"]


If I remove from model A these lines 
    class Meta:
        ordering = ["id"]
then the query produces SQL which groups by the b_id column as expected.

Is this known behavior?  Would this be considered a bug?

Thanks,
-Eric

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@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/d06683cc-ea7b-43db-a23b-0ebbd19bd424%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, June 28, 2016

pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

Sorry for hijacking a thread from Mezzanine ...

On 29/06/2016 11:22 AM, Sam Kingston wrote:
> I'm not sure if this will help you or not, but I developed a replacement
> library for xhtml2pdf (though not a drop-in):
>
> https://github.com/sjkingo/pywkhtmltopdf

Thank you Sam :)

Do you have a separate users list for questions?

In case not, I'm trying to display a page produced with function-based
views. Is there a hint you can offer?

I want the "View on site" button to produce pdf.

Maybe the real question is how do I change from function based views to
class based views - which BTW I don't want to do.

Thanks

Mike


>
> On Friday, 24 June 2016 20:13:05 UTC+10, Joseph Mohan wrote:
>
> Any other things i'm missing with regards to getting an image into
> the .pdf invoices?
>
> Set the url to a full path
>
> Tried .png/.jpgÂ
>
> Nothing...
>
> Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mezzanine-users+unsubscribe@googlegroups.com
> <mailto:mezzanine-users+unsubscribe@googlegroups.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+unsubscribe@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/c7d2fe2c-86b2-0162-10f9-8993d25b9beb%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Re: Serving static files

Hmmm. One argument I read supporting separate servers is that it would save the main server a few socket connections. But this appears to be too little of a gain. The approach of using a CDN, I think, is much more sensible. 

Thanks once again, Tim!


Regards,
Ankush Thakur

On Wed, Jun 29, 2016 at 7:33 AM, Tim Graham <timograham@gmail.com> wrote:
The concerns about needing a separate server are likely overblown. In particular, Whitenoise is a popular solution for static file serving using Python. See its FAQ: http://whitenoise.evans.io/en/stable/#isn-t-serving-static-files-from-python-horribly-inefficient

On Tuesday, June 28, 2016 at 9:59:26 PM UTC-4, Ankush Thakur wrote:
Thanks but I'm afraid I wasn't able to grasp the point of that article. Could you break it down for me, please? 

~~Ankush

On Monday, June 27, 2016 at 10:07:43 PM UTC+5:30, ludovic coues wrote:
It's not that the framework will come to an halt. It's that a server
serving static file directly would be an order of magnitude faster.

https://unix4lyfe.org/time/hn.html is a nice article on how server
react to heavy load when serving static file.

2016-06-27 18:26 GMT+02:00 Ankush Thakur <ankush....@gmail.com>:
> I keep hearing in the docs and in tutorials that frameworks are horrible
> when it comes to service static files. In production, also, one needs to set
> up another dedicated server to serve static files.
>
> I'm wondering why. What is so special about serving static files that a
> framework comes to a halt, even though the same framework can happily serve
> thousands of requests per hour?
>
> Regards,
> Ankush Thakur
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALX%3DrKLw_nMxZz7xeC0N%3D5Zwn0Q0eZnV_GFGkdwmP-%3DabtPMUQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/U1Y52ad4lDM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@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/c2f1699e-9bfc-43f4-a858-a54a256cec1d%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+unsubscribe@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/CALX%3DrKKR-40%2B%3DjssfSk6HEaTk3ibkKQqENDA6gQ2Acjzm2q3bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.