Re: Asynchoronous programming and websockets support

2018-01-11 Thread Andrew Godwin
Channels is not (at least in the short term) planned to be merged into the
Django core, but it is an official Django project. Whether it gets merged
in or not in the long term is a much bigger question and one I don't think
it's quite mature enough for yet (though Channels 2 may go a long way
towards making it so)

Andrew

On Fri, Jan 12, 2018 at 3:55 AM, Mike Dewhirst 
wrote:

> On 12/01/2018 11:05 AM, muratsert1...@gmail.com wrote:
>
>> Hello Django community,
>>
>> This is my first post so forgive me if this is out of context or have
>> been discussed already.
>>
>> I've been working with Django for many years and although have the
>> neccesary experience with Javascript I don't want to use NodeJS (Express)
>> as a backend framework because I simply really enjoy development with
>> Django.
>>
>> I believe that there is a growing demand within the community for
>> Asynchronous programming ability and Websocket support within Django
>> without using a mixture of Tornado, Twisted or Channels.
>>
>
> I believe Channels is becoming part of Django so it has been anointed. If
> you haven't already seen this it might answer some of you questions ...
>
> https://channels.readthedocs.io/en/latest/faqs.html
>
> Pretty much all other frameworks are offering Asynchronous support so do
>> we have a plan in place for this as Django Community?
>>
>> Regards
>>
>> Murat
>> --
>> You received this message because you are 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 > django-users+unsubscr...@googlegroups.com>.
>> To post to this group, send email to django-users@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/b4b641d6-1b74-4fd3-8533-8b1a7629b33d%40googlegroups.com
>> > 4-4fd3-8533-8b1a7629b33d%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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-users/ff1fd1d3-b46c-b42d-964b-f78f353815bd%40dewhirst.com.au.
>
> 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/CAFwN1up9gubTUCy4Pam%3DbhycC%3Dn27MMuM-cpzGeoEqGvTpNefQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Form help_text and error list styling

2018-01-11 Thread SHAILESH NEGI
Try django message framework

On Jan 12, 2018 10:38, "Ruchit Bhatt"  wrote:

> Hi
> I have made form for signup using Django 2.0 as below
>
>  {% csrf_token %}
> {% for non_field_error in form.non_field.errors %}
>  {{ non_field_error }} 
> {% endfor %}
> {% for field in form %}
> {{ field }}
> {% if field.help_text %}
> {% autoescape off %}
>  {{ field.help_text }} 
> {% endautoescape %}
> {% endif %}
> {% for error in field.errors %}
> {% autoescape off %}
>  {{ error }} 
> {% endautoescape %}
> {% endfor %}
> {% endfor %}
> 
>
> Now i want to know how can i style error list and help text using css
> (which can work in all device) ?
> And is it good practice to render each and every input field, errors &
> help separately (one by one using for loop) ?
>
>
>
> --
> You received this message because you are 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/93706232-0298-4b16-98b7-723986f0c777%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Form help_text and error list styling

2018-01-11 Thread Ruchit Bhatt
Hi
I have made form for signup using Django 2.0 as below

 {% csrf_token %}
{% for non_field_error in form.non_field.errors %}
 {{ non_field_error }} 
{% endfor %}
{% for field in form %}
{{ field }}
{% if field.help_text %}
{% autoescape off %}
 {{ field.help_text }} 
{% endautoescape %}
{% endif %}
{% for error in field.errors %}
{% autoescape off %}
 {{ error }} 
{% endautoescape %}
{% endfor %}
{% endfor %}


Now i want to know how can i style error list and help text using css 
(which can work in all device) ?
And is it good practice to render each and every input field, errors & help 
separately (one by one using for loop) ?

 

-- 
You received this message because you are 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/93706232-0298-4b16-98b7-723986f0c777%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Asynchoronous programming and websockets support

2018-01-11 Thread Mike Dewhirst

On 12/01/2018 11:05 AM, muratsert1...@gmail.com wrote:

Hello Django community,

This is my first post so forgive me if this is out of context or have 
been discussed already.


I've been working with Django for many years and although have the 
neccesary experience with Javascript I don't want to use NodeJS 
(Express) as a backend framework because I simply really enjoy 
development with Django.


I believe that there is a growing demand within the community for 
Asynchronous programming ability and Websocket support within Django 
without using a mixture of Tornado, Twisted or Channels.


I believe Channels is becoming part of Django so it has been anointed. 
If you haven't already seen this it might answer some of you questions ...


https://channels.readthedocs.io/en/latest/faqs.html

Pretty much all other frameworks are offering Asynchronous support so 
do we have a plan in place for this as Django Community?


Regards

Murat
--
You received this message because you are 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/b4b641d6-1b74-4fd3-8533-8b1a7629b33d%40googlegroups.com 
.

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


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


want to join IRC

2018-01-11 Thread pandyamarut
Hello Everyone, 
I want to join #django IRC channel please if someone can help me over.





Regards,
Thank you!

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


Asynchoronous programming and websockets support

2018-01-11 Thread muratsert1453
Hello Django community,

This is my first post so forgive me if this is out of context or have been 
discussed already.

I've been working with Django for many years and although have the 
neccesary experience with Javascript I don't want to use NodeJS (Express) 
as a backend framework because I simply really enjoy development with 
Django.

I believe that there is a growing demand within the community for 
Asynchronous programming ability and Websocket support within Django 
without using a mixture of Tornado, Twisted or Channels. Pretty much all 
other frameworks are offering Asynchronous support so do we have a plan in 
place for this as Django Community?

Regards

Murat

-- 
You received this message because you are 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/b4b641d6-1b74-4fd3-8533-8b1a7629b33d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I make a Django model from a tab-delimited data file?

2018-01-11 Thread Scot Hacker
Another approach is to use postgres' COPY command:

https://www.postgresql.org/docs/9.6/static/sql-copy.html

which knows how to parse and import tab-delimited files (and is crazy 
fast). Then, once the table exists, use Django's `inspectdb` management 
command to generate a Model corresponding to the table. It may need a 
little manual massaging afterwards, but I've done this on several projects 
and it works very well for most purposes.

./s


On Monday, January 8, 2018 at 6:38:44 PM UTC-8, Tom Tanner wrote:
>
> I have a tab-delimited data file that looks something like this:
>
>
> NAME S1903_C02_001E state county tract State-County-Tract-ID
> Census Tract 201, Autauga County, Alabama 66000 01 001 020100 01001020100
> Census Tract 202, Autauga County, Alabama 41107 01 001 020200 01001020200
> Census Tract 203, Autauga County, Alabama 51250 01 001 020300 01001020300
>
> I want to make a Django model named `MyModel` with three columns: "name", 
> "data", and "geoid", which correspond to the file's columns "NAME", 
> "S1903_C02_001E", and "State-County-Tract-ID." Can I do this via command 
> line, or with a custom Python script? I'm running my Django project locally 
> on a computer running Debian 9.3. 
>

-- 
You received this message because you are 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/708e0f1d-1cac-4321-a68e-697a4a8cd3da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Junk code to your django project

2018-01-11 Thread Scot Hacker
It is possible (though not common) to distribute the compiled *.pyc files 
rather than the source *.py files. See the bottom 
of https://www.smallsurething.com/how-to-obfuscate-python-source-code/ . 
Back in early days of Django there was a (very expensive) commercially sold 
content management system that was distributed this way.

./s

On Thursday, January 11, 2018 at 4:10:44 AM UTC-8, 
ashish...@exponentiadata.com wrote:
>
> Hello,
> I have a requirement which says that the user should not be able to 
> read/modify my code.I thought to add some junk code to the project
> is it possible??
>

-- 
You received this message because you are 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/277486b7-efda-4bd9-a2a8-0d6cdb20467d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Junk code to your django project

2018-01-11 Thread Kasper Laudrup

Hi there,

On 2018-01-11 07:58, ashish.bha...@exponentiadata.com wrote:

Hello,
I have a requirement which says that the user should not be able to 
read/modify my code.I thought to add some junk code to the project

is it possible??



Assuming by "user" you mean someone who has a copy of your code, the 
word you are looking for is probably "obfuscation".


This projects seems to be able to help you do that:

https://liftoff.github.io/pyminifier/

I have no experience with that project or code obfuscation in general 
(and hope I'll never have to), but I hope you can find this helpful.


Kind regards,

Kasper Laudrup

--
You received this message because you are 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/0908a099-f197-810c-d01a-b2dca70434e4%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: I plan to have lots of data tables with similar structure. How do you recommend I model them?

2018-01-11 Thread Thomas G Lockhart
You may want to have several tables linked by foreign keys. A Census Tract 
table, a County table, a State table, etc.

That reduces the amount of duplicate data and the chances for inconsistent 
entries. The downside is a bit more work on the part of the computer to do 
lookups, but particularly if your typical use case accesses one or a few at a 
time (say 1% of a big table) then the performance hit for joins etc is minimal.

Design your normalized schema, then write a standalone Python program to stuff 
the initial data into the tables.

Good luck!

- Tom

> On Jan 10, 2018, at 5:20 PM, Tom Tanner  wrote:
> 
> Hey everyone,
> 
> I have a bunch of text files that each have a bunch of columns in common. I 
> plan to import these files into PostgreSQL tables. The website user will be 
> able to send a GET request to query a table and get back data from it. Since 
> most of the tables will have a bunch of columns in common, how should I 
> structure them in my `models.py`?
> 
> Here's a couple examples of tab-delimited text files I'll import.
> 
> NAME S1903_C02_001E state county tract State-County-Tract-ID
> Census Tract 201, Autauga County, Alabama 66000 01 001 020100 01001020100
> Census Tract 202, Autauga County, Alabama 41107 01 001 020200 01001020200
> Census Tract 203, Autauga County, Alabama 51250 01 001 020300 01001020300
> 
> 
> 
> and 
> 
> NAME S1903_C02_001F S1903_C02_001G state county tract 
> State-County-Tract-ID
> Census Tract 201, Autauga County, Alabama 66000 4040 01 001 020100 
> 01001020100
> Census Tract 202, Autauga County, Alabama 41107 192837 01 001 020200 
> 01001020200
> Census Tract 203, Autauga County, Alabama 51250 39482 01 001 020300 
> 01001020300
> 
> 
> As you can see, they have several columns in common. I wouldn't want to 
> repeat myself in `models.py` by listing the same columns over and over.
> 
> -- 
> You received this message because you are 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/e5fc9dab-c0aa-4fb8-a66c-5f507a18f4b6%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

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


RE: HTTP Error 403: Forbidden

2018-01-11 Thread Matthew Pava
Typically, that indicates a permissions problem.  Are you signed in to your 
app?  Does the account you are signed into have permissions to access that URL? 
 Check your decorators.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of mohammad
Sent: Thursday, January 11, 2018 8:11 AM
To: Django users
Subject: HTTP Error 403: Forbidden

hi,  i try to submit a form but it gives me this err
if any one can help me

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/images/create/

Django Version: 1.8.6
Python Version: 3.6.1
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'account',
 'django.contrib.admin',
 'social.apps.django_app.default',
 'images',
 'medic',
 'sorl.thumbnail')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\core\handlers\base.py"
 in get_response
  132. response = wrapped_callback(request, *callback_args, 
**callback_kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\contrib\auth\decorators.py"
 in _wrapped_view
  22. return view_func(request, *args, **kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\views.py"
 in image_create
  47. new_item = form.save(commit=False)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\forms.py"
 in save
  28. response = request.urlopen(image_url)
File "c:\python\Lib\urllib\request.py" in urlopen
  223. return opener.open(url, data, timeout)
File "c:\python\Lib\urllib\request.py" in open
  532. response = meth(req, response)
File "c:\python\Lib\urllib\request.py" in http_response
  642. 'http', request, response, code, msg, hdrs)
File "c:\python\Lib\urllib\request.py" in error
  570. return self._call_chain(*args)
File "c:\python\Lib\urllib\request.py" in _call_chain
  504. result = func(*args)
File "c:\python\Lib\urllib\request.py" in http_error_default
  650. raise HTTPError(req.full_url, code, msg, hdrs, fp)

Exception Type: HTTPError at /images/create/
Exception Value: HTTP Error 403: Forbidden
--
You received this message because you are 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/4a1387e6-5a74-47cf-9134-149fbbd14ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


HTTP Error 403: Forbidden

2018-01-11 Thread mohammad
hi,  i try to submit a form but it gives me this err 
if any one can help me 

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/images/create/

Django Version: 1.8.6
Python Version: 3.6.1
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'account',
 'django.contrib.admin',
 'social.apps.django_app.default',
 'images',
 'medic',
 'sorl.thumbnail')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\core\handlers\base.py"
 
in get_response
  132. response = wrapped_callback(request, 
*callback_args, **callback_kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\contrib\auth\decorators.py"
 
in _wrapped_view
  22. return view_func(request, *args, **kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\views.py"
 
in image_create
  47. new_item = form.save(commit=False)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\forms.py"
 
in save
  28. response = request.urlopen(image_url)
File "c:\python\Lib\urllib\request.py" in urlopen
  223. return opener.open(url, data, timeout)
File "c:\python\Lib\urllib\request.py" in open
  532. response = meth(req, response)
File "c:\python\Lib\urllib\request.py" in http_response
  642. 'http', request, response, code, msg, hdrs)
File "c:\python\Lib\urllib\request.py" in error
  570. return self._call_chain(*args)
File "c:\python\Lib\urllib\request.py" in _call_chain
  504. result = func(*args)
File "c:\python\Lib\urllib\request.py" in http_error_default
  650. raise HTTPError(req.full_url, code, msg, hdrs, fp)

Exception Type: HTTPError at /images/create/
Exception Value: HTTP Error 403: Forbidden

-- 
You received this message because you are 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/4a1387e6-5a74-47cf-9134-149fbbd14ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Jason
An alternative is to use the django extensions runserverplus 
 which 
uses the Werkzeug debugger.  As you can see in this post on 
django-developers 
,
 
this is used as an alternative.

Regardless, I think the primary issue is you're serving the content in an 
inappropriate manner.  Django should be used for dynamic requests, and 
static files should be handled by an Apache or Nginx webserver that serves 
up the static files and passes the dynamic requests to Django via mod_wsgi 
or Gunicorn.

-- 
You received this message because you are 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/49d91b5d-0ce2-4b01-aa2a-230969372641%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: encrypt my django code and still be able to run it

2018-01-11 Thread Jason
No.  And if you think about it, I think you'll come up with a number of 
reasons why.

If you really want to keep people from reading your code, learn how to 
secure your server from unauthorized outside access and follow best 
practices to keep your SSH keys safe.

-- 
You received this message because you are 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/c66d11bd-7dc5-42e7-85d3-26d74adc0742%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Junk code to your django project

2018-01-11 Thread Antonis Christofides
Hello,

Instagram is written in Django; however when you use Instagram you can't see or
modify the code, can you? Same thing in every web application, whether written
in RoR, PHP, Java, whatever.

So what exactly do you mean? What is the "user" of your code? Why would the user
be able to read/modify your code in the first place?

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2018-01-11 07:58, ashish.bha...@exponentiadata.com wrote:
> Hello,
> I have a requirement which says that the user should not be able to
> read/modify my code.I thought to add some junk code to the project
> is it possible??
> -- 
> You received this message because you are 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/b0ca1234-ec4e-41e2-8e20-de87651d1b36%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

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


Adding Junk code to your django project

2018-01-11 Thread ashish . bhatia
Hello,
I have a requirement which says that the user should not be able to 
read/modify my code.I thought to add some junk code to the project
is it possible??

-- 
You received this message because you are 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/b0ca1234-ec4e-41e2-8e20-de87651d1b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


encrypt my django code and still be able to run it

2018-01-11 Thread ashish . bhatia
Hi,
Is it possible to encrypt my complete Django project and still be able to 
run it.

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


Re: HTML video seek problem in django

2018-01-11 Thread Manjunatha
Hi Kasper Laudrup,

Thank you very much for your advice.

Regards,
Manjunatha


On Thursday, 11 January 2018 16:19:19 UTC+5:30, Kasper Laudrup wrote:
>
> Hi Manjunatha, 
>
> On 2018-01-11 12:33, Manjunatha wrote: 
> > I am using *django python* framework. Currently I am working on 
> > localhost 127.0.0.1:8000. There is no forum for django. Is there any 
> > suggestion from your side to solve this problem. 
> > 
>
> So the problem is only showing up during development? 
>
> I would personally think it's a minor issue then, as long as it works on 
> Chrome in production you can just use other browsers during development 
> (or simply ignore the issue). 
>
> Could very well be that the simple web server Django uses doesn't 
> support all the features of HTTP. I would suggest writing a very simple 
> test case showing the problem and then open an issue with the Django 
> maintainers to see if they want to do something about it or, even 
> better, write a patch to fix it yourself and see if it gets accepted. 
>
> I'm not a Django maintainer and don't know much about the internals of 
> Django so I'm afraid I cannot help you any further. 
>
> Kind regards, 
>
> Kasper Laudrup 
>

-- 
You received this message because you are 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/6d6564f2-9743-47c9-b573-85191ecf5569%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Kasper Laudrup

Hi Manjunatha,

On 2018-01-11 12:33, Manjunatha wrote:
I am using *django python* framework. Currently I am working on 
localhost 127.0.0.1:8000. There is no forum for django. Is there any 
suggestion from your side to solve this problem.




So the problem is only showing up during development?

I would personally think it's a minor issue then, as long as it works on 
Chrome in production you can just use other browsers during development 
(or simply ignore the issue).


Could very well be that the simple web server Django uses doesn't 
support all the features of HTTP. I would suggest writing a very simple 
test case showing the problem and then open an issue with the Django 
maintainers to see if they want to do something about it or, even 
better, write a patch to fix it yourself and see if it gets accepted.


I'm not a Django maintainer and don't know much about the internals of 
Django so I'm afraid I cannot help you any further.


Kind regards,

Kasper Laudrup

--
You received this message because you are 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/ac994be1-b53e-694c-e3f3-e1573f512280%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Manjunatha
Hi Kasper,

I am using *django python* framework. Currently I am working on localhost 
127.0.0.1:8000. There is no forum for django. Is there any suggestion from 
your side to solve this problem.

Thanks,
Manjunatha

On Thursday, 11 January 2018 15:52:15 UTC+5:30, Kasper Laudrup wrote:
>
> Hi Manjunatha, 
>
> On 2018-01-11 11:47, Manjunatha wrote: 
> > Hi Kasper, 
> > 
> > No. The server gives *200 OK *status code. But I can't see partial 
> > content server. Please help me to change status code 200 to 206. 
> > 
>
> You should look into the documentation for the web server you are using. 
>
> If the web server gives the wrong status code (200 instead of 206) you 
> should probably open an issue with the maintainers of the web server. 
>
> Kind regards, 
>
> Kasper Laudrup 
>

-- 
You received this message because you are 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/6dedd8a1-1fd7-4498-9c3c-6ebbd5e48adb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Kasper Laudrup

Hi Manjunatha,

On 2018-01-11 11:47, Manjunatha wrote:

Hi Kasper,

No. The server gives *200 OK *status code. But I can't see partial 
content server. Please help me to change status code 200 to 206.




You should look into the documentation for the web server you are using.

If the web server gives the wrong status code (200 instead of 206) you 
should probably open an issue with the maintainers of the web server.


Kind regards,

Kasper Laudrup

--
You received this message because you are 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/46451226-bf6e-7a28-0fc0-6280fb82bf76%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Manjunatha
Hi Kasper,

No. The server gives *200 OK *status code. But I can't see partial content 
server. Please help me to change status code 200 to 206.

Thanks, 
Manjunatha 

On Thursday, 11 January 2018 15:02:16 UTC+5:30, Kasper Laudrup wrote:
>
> Hi Manjunatha, 
>
> On 2018-01-11 05:34, Manjunatha wrote: 
> > I have attached one image please go through that, actually in my case 
> > status code returns 200. Please help me out. 
> > 
>
> Does your server understand "partial content requests" as descriped in 
> the Stackoverflow post you posted a screenshot of? 
>
> Kind regards, 
>
> Kasper Laudrup 
>

-- 
You received this message because you are 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/405918d3-32de-4173-bc03-82f3db8e16b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML video seek problem in django

2018-01-11 Thread Kasper Laudrup

Hi Manjunatha,

On 2018-01-11 05:34, Manjunatha wrote:
I have attached one image please go through that, actually in my case 
status code returns 200. Please help me out.




Does your server understand "partial content requests" as descriped in 
the Stackoverflow post you posted a screenshot of?


Kind regards,

Kasper Laudrup

--
You received this message because you are 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/fc40091f-0f91-0f39-91af-02f4ba1119bb%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.