Re: How I can access to the jQuery, it is build-in Django-Admin, in my custom views?

2016-07-04 Thread Luis Zárate
Are you using django admin template?
Where are your Jquery call? in the header ?

A template example could be useful.

2016-07-03 12:20 GMT-06:00 Seti Volkylany :

> It is not worked even the main admin page
>
> django.jQuery('body')
> Uncaught ReferenceError: django is not defined(…)(anonymous function) @
> VM9451:1
> $()
> null
> $django.jQuery('body')
> Uncaught ReferenceError: $django is not defined(…)
>
> On Sun, Jul 3, 2016 at 9:08 PM, Luis Zárate  wrote:
>
>> Replace $ by django.jQuery
>>
>> For example django.jQuery('body')
>>
>>
>>
>> El domingo, 3 de julio de 2016, Seti Volkylany 
>> escribió:
>> >
>> > The Django`s docs tell next:
>> > To avoid conflicts with user-supplied scripts or libraries, Django’s
>> jQuery (version 2.1.4) is namespaced as django.jQuery. If you want to use
>> jQuery in your own admin JavaScript without including a second copy, you
>> can use the django.jQuery object on changelist and add/edit views.
>> > (see https://docs.djangoproject.com/es/1.9/ref/contrib/admin/…)
>> >
>> > But, how using this build-in jQuery. When I am tring to use $ in my
>> custom view I had:
>> >
>> > $('body')
>> > Uncaught TypeError: $ is not a function(…)
>> >
>> > But it is successfully worked in main page of the Django-Admin
>> >
>> > $('body')
>> > …
>> >
>> > --
>> > 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/3c5ab528-05fa-4446-88c3-c2a2419d24fe%40googlegroups.com
>> .
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> "La utopía sirve para caminar" Fernando Birri
>>
>>
>>
>> --
>> 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/h4QKC2xHY60/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAG%2B5VyNqyiFpL87i2rHiui4ahQqMes2_pvR1QbSbqTXUHS2k6Q%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGWd_9%2BsrUg805xAFvu90PGNrYPzm92W6Lax3Rz8Upafwie_pw%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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/CAG%2B5VyOgDnq%2BEwKYgoZ-tAuoeO_aRdJ3aXtqfJhR6mfzhybVKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing Django Problem.

2016-07-04 Thread Steve R Burrus
Wel;l everyone I guess that I have met with success as far as connecting to  
the Django server a nd configuring the admin BUT there remains A LOT of things 
about Django I don't know yet.    

On Monday, July 4, 2016 2:31 PM, ludovic coues  wrote:
 

 I could ask you what error you get when running syncdb. I could tell
you to use manage.py createsuperuser.
But the best advice anyone can give you is to do a tutorial about
django. The django girls one is really great. The one from the
official documentation is shorter. Either one will give you a solid
base for starting to use django.

2016-07-04 16:19 GMT+02:00 Steve Burrus :
> Well I successfully set up the Django server an d then connected to oit BUT
> I couldn't use that "syncdb" command to then set the pw and username in the
> admin.
>
> On Sun, Jul 3, 2016 at 11:15 PM, Mike Dewhirst 
> wrote:
>>
>> On 4/07/2016 1:06 PM, Steve Burrus wrote:
>>>
>>> Well I did tjhis okay "(stevesenv)
>>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install django" but
>>> still the question persists where I go from here? I remember using
>>> "django-admin" before. How do I use that?
>>
>>
>> Here is a good place to start ...
>>
>> https://docs.djangoproject.com/en/1.9/
>>
>> That page covers how the documentation is organised. You need to work your
>> way through all the installation steps including database etc.
>>
>> Then the most important next step is to wrk through the tutorial. Once you
>> get that done there are quite a few third party tutorials on the web.
>>
>> Good luck
>>
>>
>> Mike
>>
>>
>>
>>
>>>
>>> On Sun, Jul 3, 2016 at 9:32 PM, Mike Dewhirst >> > wrote:
>>>
>>>    On 4/07/2016 12:01 PM, Steve Burrus wrote:
>>>
>>>        well I uyet again am encountering problems with installing the
>>>        Django
>>>        server. I managed to get to this point "(stevesenv)
>>>        C:\Users\sbur87\Desktop\steves_dir\stevesenv>"
>>>
>>>
>>>    It looks as though you have successfully got virtualenv working.
>>>
>>>    Therefore the short answer to your question is ...
>>>
>>>    (stevesenv) C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install
>>>    django
>>>
>>>    Cheers
>>>
>>>    Mike
>>>
>>>
>>>    but where exactly do I go
>>>
>>>        from here in installing django? Man y thanx to anyone who can
>>>        help me
>>>        with this "trying" problem of mine.Â
>>>
>>>        --
>>>        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/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com
>>>
>>> .
>>>        For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>    --
>>>    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/9wVk4lDZcMY/unsubscribe.
>>>    To unsubscribe from this group and all its topics, 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/58cd5e27-6d4d-6929-aa44-b59c526a8c55%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 

Re: Friends i can not run python manage.py migrate on Django 1.6.1. Can you give me advice plz?

2016-07-04 Thread Крутые видео-советы по Гугл Хром , Вконтакте , Ютуб
Thank you a lot friend! I installed Python 3 and installed Django 1.9 so 
everything works now...

понедельник, 4 июля 2016 г., 20:26:45 UTC+3 пользователь Juan Escamilla 
написал:
>
> As   Dvschramm said the migrate command was iimplemented until 1.7 .
> You can try to pip upgrade django to a suitable version: 
>
>
> pip install 'django>1.6 ,<1.7'
>
> more on:
> http://stackoverflow.com/questions/5226311/installing-specific-package-versions-with-pip
>
>
> El lunes, 4 de julio de 2016, 18:04:28 (UTC+1), Крутые видео-советы по 
> Гугл Хром, Вконтакте, Ютуб escribió:
>>
>> Friends i can not run python manage.py migrate on Django 1.6.1. 
>>
>> I read that i need to install South first. I installed it but "python 
>> manage.py migrate" has the same problem
>>
>> Please see screenshot_43 friends
>>
>> So i read another google topic 
>>  where 
>> i saw that maybe command "migrate" not supported by Django 1.6.1
>>
>> I am new to Django. Please can you give me your advices friends?
>>
>> How can i run the comman  "python manage.py migrate"??
>>
>>

-- 
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/19caba34-bafc-44f6-a954-03b3c8bf5e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Friends i can not run python manage.py migrate on Django 1.6.1. Can you give me advice plz?

2016-07-04 Thread Крутые видео-советы по Гугл Хром , Вконтакте , Ютуб
Thank you a lot friend! I installed Python 3 and installed Django 1.9 so 
everything works now...

понедельник, 4 июля 2016 г., 20:19:20 UTC+3 пользователь Dvschramm написал:
>
> Look into South. Django migrations wasn’t included until 1.7 if I remember 
> correctly.  
>
>
> On July 4, 2016 at 10:04:27 AM, Крутые видео-советы по Гугл Хром, 
> Вконтакте, Ютуб (yan.had...@gmail.com ) wrote: 
> > Friends i can not run python manage.py migrate on Django 1.6.1. 
> >   
> > I read that i need to install South first. I installed it but "python 
> > manage.py migrate" has the same problem 
> >   
> > Please see screenshot_43 friends 
> >   
> > So i read another google topic 
> > where   
> > i 
> > saw that maybe command "migrate" not supported by Django 1.6.1 
> >   
> > I am new to Django. Please can you give me your advices friends? 
> >   
> > How can i run the comman "python manage.py migrate"?? 
> >   
> > -- 
> > 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/4e037197-346c-4827-bd0d-1130fc633944%40googlegroups.com.
>  
>   
> > For more options, visit https://groups.google.com/d/optout. 
> >   
>
> --   
> Darian Schramm 
>
>
>

-- 
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/4aeba70a-b7b5-459d-a9af-3a5d968660c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


opentok tokbox

2016-07-04 Thread Adam



Has anyone integrated these into a django project?  Are there any good 
alternatives?

Our use case is as a virtual classroom / webinar. 

It seems odd that with all there documentation, nothing mentions django. 
Likewise furious googling fails to turn up anything beyond one GitHub 
example (which I do appreciate).

Thanks

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


Re: Slow Django dev server reload

2016-07-04 Thread Vijay Khemlani
Why... are you answering questions directed to Krishna? You are not the one
with the slow loading server.

On Mon, Jul 4, 2016 at 4:19 PM, Fred Stluka  wrote:

> Krishna,
>
> I'm using:
> - Mac OSX 10.11.5 (El Capitan)
> - 2.3GHz Intel Core i7
> - 16 GB 1333 MHz DDR3
> - 512GB SSD
> - Python 2.7.3
> - Django 1.4.2
> - MySQL 5.1.33
>
> And it takes less than a second from when I type:
> % python manage.py runserver
> until I see:
>
> Validating models...
>
> 0 errors found
> Django version 1.4.2, using settings 'hhl.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
>
>
> I have about 40 models.py files, of which 25 are empty and
> exist only to prevent warnings when run automated tests.
> The other 15 contain about 100 Django models with a total
> of about 27,000 lines of code.
>
> The 100 models all get validated against a locally running
> MySQL server.
>
> So, it should NOT be that slow on your Mac.
>
> To narrow down the problem, I suggest you use the -v option:
> % python -v manage.py runserver
> and watch to see what seems to be taking so long.
>
> Any other suggestions, anyone?
>
> --Fred
> --
> Fred Stluka -- mailto:f...@bristle.com  --
> http://bristle.com/~fred/
> Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
> Open Source: Without walls and fences, we need no Windows or Gates.
> --
>
> On 7/4/16 2:20 AM, Krishna Bharadwaj wrote:
>
> Hi Fred,
>
> It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6 GHz Intel Core
> i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious to know if I was doing
> something wrong. Any pointers regarding this will be very helpful.
>
> On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:
>>
>> Krishna,
>>
>> How long is "a long time"?  I have a project of ~200K lines of
>> python/django code.  The dev server reloads in a second or so.
>>
>> --Fred
>> --
>> Fred Stluka -- mailt...@bristle.com -- http://bristle.com/~fred/
>> Bristle Software, Inc -- http://bristle.com
>> 
>> -- Glad to be of service!
>> Open Source: Without walls and fences, we need no Windows or Gates.
>> --
>>
>> On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:
>>
>> Hi everyone,
>>
>> I am working on a project which is substantially big (~40k lines of
>> python/django code including management commands). Dev server seems to be
>> taking a lot of time to reload after making changes. I was wondering if
>> this is due to any bad programming practice at my end? Or is this expected
>> once the project grows big? I wanted to know if anyone in the group is
>> dealing with it in a better way?
>>
>> - Regards
>> Krishna Bharadwaj
>> --
>> 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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%
>> 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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%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/ddd3443d-aefd-7f9a-2596-e4fac711d1f3%40bristle.com
> 
> .
>
> For more 

Re: Slow Django dev server reload

2016-07-04 Thread Fred Stluka

  
  
Krishna,

I'm using:
- Mac OSX 10.11.5 (El Capitan)
- 2.3GHz Intel Core i7
- 16 GB 1333 MHz DDR3
- 512GB SSD
- Python 2.7.3
- Django 1.4.2
- MySQL 5.1.33

And it takes less than a second from when I type:
    % python manage.py runserver
until I see:

Validating models...
  
  0 errors found
  Django version 1.4.2, using settings 'hhl.settings'
  Development server is running at http://127.0.0.1:8000/
  Quit the server with CONTROL-C.


I have about 40 models.py files, of which 25 are empty and 
exist only to prevent warnings when run automated tests.
The other 15 contain about 100 Django models with a total
of about 27,000 lines of code.

The 100 models all get validated against a locally running
MySQL server.

So, it should NOT be that slow on your Mac.

To narrow down the problem, I suggest you use the -v option:
    % python -v manage.py runserver
and watch to see what seems to be taking so long.

Any other suggestions, anyone?

--Fred
  
  
  Fred Stluka -- mailto:f...@bristle.com --
  http://bristle.com/~fred/
  
  Bristle Software, Inc -- http://bristle.com -- Glad to be of
  service!
  
  Open Source: Without walls and fences, we need no Windows or
  Gates.
  
  

On 7/4/16 2:20 AM, Krishna Bharadwaj
  wrote:


  Hi Fred,


It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6
  GHz Intel Core i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious
  to know if I was doing something wrong. Any pointers regarding
  this will be very helpful.
  
  On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:
  
 Krishna,
  
  How long is "a long time"?  I have a project of ~200K
  lines of
  python/django code.  The dev server reloads in a second or
  so.
  
  --Fred 
 Fred Stluka -- mailt...@bristle.com
-- http://bristle.com/~fred/ 
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service! 
Open Source: Without walls and fences, we need no
Windows or Gates.
 
  
  On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:
  
  
Hi everyone,
  
  
  I am working on a project which is substantially
big (~40k lines of python/django code including
management commands). Dev server seems to be taking
a lot of time to reload after making changes. I was
wondering if this is due to any bad programming
practice at my end? Or is this expected once the
project grows big? I wanted to know if anyone in the
group is dealing with it in a better way? 
  
  
  - Regards
  Krishna Bharadwaj

-- 
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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%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 

Re: When need return the HttpResponseBadRequest and why?

2016-07-04 Thread Gergely Polonkai
400 Bad Request is responded if the client sends a… um… Bad Request?

Jokes aside, it may represent many things. Web servers may send 400 if the
HTTP request is malformed. Applications, such as a Django app, may send 400
if the request cannot be processed, e.g. when a required header is missing
or (with REST APIs) if a JSON field is not present or contains an invalid
value.

Best,
Gergely
On Jul 4, 2016 19:44, "Seti Volkylany"  wrote:

.

-- 
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/7f2bfae4-66d1-44c6-9255-4f862d42d43b%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/CACczBULSY21SaY-4ZO2SqKPqzGMq4gPzizW4BsqB_i1hMHKQug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Slow Django dev server reload

2016-07-04 Thread Fred Stluka

  
  
Hildeberto,

No, the number of migrations does affect how long it takes to
run automated tests, but should not affect how long it takes 
the dev server to start.

--Fred
  
  
  Fred Stluka -- mailto:f...@bristle.com --
  http://bristle.com/~fred/
  
  Bristle Software, Inc -- http://bristle.com -- Glad to be of
  service!
  
  Open Source: Without walls and fences, we need no Windows or
  Gates.
  
  

On 7/4/16 3:46 AM, Hildeberto Mendonça
  wrote:


  Isn't it related to the amount of migration files
in your project?
  
On Mon, Jul 4, 2016 at 9:13 AM,
  Babatunde Akinyanmi  wrote:
  
This is a punch in the dark. It takes about 3
  -  5 seconds on my my windows machine when I run the dev
  server using pycharm's inbuilt terminal and my code is way
  below 5k lines

  
On Jul 4, 2016 7:20 AM,
  "Krishna Bharadwaj" 
  wrote:
  
Hi Fred,
  
  
  It takes about 3.5 - 5 seconds on my machine
(Mac OSX - 2.6 GHz Intel Core i5, 8 GB 1600 MHz
DDR3 and SSDs). I was curious to know if I was
doing something wrong. Any pointers regarding
this will be very helpful.

On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred
Stluka wrote:

  
Krishna,

How long is "a long time"?  I have a project
of ~200K lines of
python/django code.  The dev server reloads
in a second or so.

--Fred 
   Fred Stluka -- mailt...@bristle.com
  -- http://bristle.com/~fred/
  
  Bristle Software, Inc -- http://bristle.com
  -- Glad to be of service! 
  Open Source: Without walls and fences, we
  need no Windows or Gates.
   

On 7/3/16 8:42 AM, Krishna Bharadwaj
  wrote:


  Hi everyone,


I am working on a project which is
  substantially big (~40k lines of
  python/django code including
  management commands). Dev server seems
  to be taking a lot of time to reload
  after making changes. I was wondering
  if this is due to any bad programming
  practice at my end? Or is this
  expected once the project grows big? I
  wanted to know if anyone in the group
  is dealing with it in a better way? 


- Regards
Krishna Bharadwaj
  
  -- 
  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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%40googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.


  

  

-- 
You received this message because you are subscribed
to the Google 

Re: Installing Django Problem.

2016-07-04 Thread ludovic coues
I could ask you what error you get when running syncdb. I could tell
you to use manage.py createsuperuser.
But the best advice anyone can give you is to do a tutorial about
django. The django girls one is really great. The one from the
official documentation is shorter. Either one will give you a solid
base for starting to use django.

2016-07-04 16:19 GMT+02:00 Steve Burrus :
> Well I successfully set up the Django server an d then connected to oit BUT
> I couldn't use that "syncdb" command to then set the pw and username in the
> admin.
>
> On Sun, Jul 3, 2016 at 11:15 PM, Mike Dewhirst 
> wrote:
>>
>> On 4/07/2016 1:06 PM, Steve Burrus wrote:
>>>
>>> Well I did tjhis okay "(stevesenv)
>>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install django" but
>>> still the question persists where I go from here? I remember using
>>> "django-admin" before. How do I use that?
>>
>>
>> Here is a good place to start ...
>>
>> https://docs.djangoproject.com/en/1.9/
>>
>> That page covers how the documentation is organised. You need to work your
>> way through all the installation steps including database etc.
>>
>> Then the most important next step is to wrk through the tutorial. Once you
>> get that done there are quite a few third party tutorials on the web.
>>
>> Good luck
>>
>>
>> Mike
>>
>>
>>
>>
>>>
>>> On Sun, Jul 3, 2016 at 9:32 PM, Mike Dewhirst >> > wrote:
>>>
>>> On 4/07/2016 12:01 PM, Steve Burrus wrote:
>>>
>>> well I uyet again am encountering problems with installing the
>>> Django
>>> server. I managed to get to this point "(stevesenv)
>>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>"
>>>
>>>
>>> It looks as though you have successfully got virtualenv working.
>>>
>>> Therefore the short answer to your question is ...
>>>
>>> (stevesenv) C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install
>>> django
>>>
>>> Cheers
>>>
>>> Mike
>>>
>>>
>>> but where exactly do I go
>>>
>>> from here in installing django? Man y thanx to anyone who can
>>> help me
>>> with this "trying" problem of mine.Â
>>>
>>> --
>>> 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/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com
>>>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> 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/9wVk4lDZcMY/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/58cd5e27-6d4d-6929-aa44-b59c526a8c55%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/CABcoaSDkTfc2QoxD_S3PqJCaTiigmp1msrvxDOq-pUK9Y9hD8Q%40mail.gmail.com
>>>
>>> 

Preferable JS's coding style for the Django.

2016-07-04 Thread Seti Volkylany
In the Web have many a variants for JS style coding. The Django give less 
detail about good JS coding (see 
https://docs.djangoproject.com/en/1.9/internals/contributing/writing-code/javascript/#code-style).
Here is what I found: https://github.com/madrobby/pragmatic.js, 
https://github.com/rwaldron/idiomatic.js/,https://github.com/airbnb/javascript, 
and other.
What experts can advise on this issue?

-- 
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/09b62848-96a1-40bc-9680-46b9b7112161%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


When need return the HttpResponseBadRequest and why?

2016-07-04 Thread Seti Volkylany
.

-- 
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/7f2bfae4-66d1-44c6-9255-4f862d42d43b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django and SQL Server

2016-07-04 Thread Massimo Barbierato
Hi everybody.

I have a little problem with SQL Server. I'm using django-pyodbc as db 
backend but when i run inspectdb it occurs an error because some of the 
tables in the SQL Server database have unicode chars (an example: the table 
name is 'Attività').
How can I resolve that?

I can't change tables names because another app is based on that db :(

Thanks

Max

ps: yes, the tables names are in italian :)

-- 
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/6e4532b6-56bb-4021-a923-d9cf2c1edcba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Friends i can not run python manage.py migrate on Django 1.6.1. Can you give me advice plz?

2016-07-04 Thread Juan Escamilla
As   Dvschramm said the migrate command was iimplemented until 1.7 .
You can try to pip upgrade django to a suitable version: 


pip install 'django>1.6 ,<1.7'

more on:
http://stackoverflow.com/questions/5226311/installing-specific-package-versions-with-pip


El lunes, 4 de julio de 2016, 18:04:28 (UTC+1), Крутые видео-советы по Гугл 
Хром, Вконтакте, Ютуб escribió:
>
> Friends i can not run python manage.py migrate on Django 1.6.1. 
>
> I read that i need to install South first. I installed it but "python 
> manage.py migrate" has the same problem
>
> Please see screenshot_43 friends
>
> So i read another google topic 
>  where 
> i saw that maybe command "migrate" not supported by Django 1.6.1
>
> I am new to Django. Please can you give me your advices friends?
>
> How can i run the comman  "python manage.py migrate"??
>
>

-- 
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/e9fbd433-6992-4fc5-8e03-88cc8277bf2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Friends i can not run python manage.py migrate on Django 1.6.1. Can you give me advice plz?

2016-07-04 Thread Darian Schramm
Look into South. Django migrations wasn’t included until 1.7 if I remember 
correctly. 


On July 4, 2016 at 10:04:27 AM, Крутые видео-советы по Гугл Хром, Вконтакте, 
Ютуб (yan.hadzhyi...@gmail.com) wrote:
> Friends i can not run python manage.py migrate on Django 1.6.1.
>  
> I read that i need to install South first. I installed it but "python
> manage.py migrate" has the same problem
>  
> Please see screenshot_43 friends
>  
> So i read another google topic
> where  
> i
> saw that maybe command "migrate" not supported by Django 1.6.1
>  
> I am new to Django. Please can you give me your advices friends?
>  
> How can i run the comman "python manage.py migrate"??
>  
> --
> 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/4e037197-346c-4827-bd0d-1130fc633944%40googlegroups.com.
>   
> For more options, visit https://groups.google.com/d/optout.
>  

--  
Darian Schramm


-- 
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/etPan.577a9831.66e2e740.4d0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Friends i can not run python manage.py migrate on Django 1.6.1. Can you give me advice plz?

2016-07-04 Thread Крутые видео-советы по Гугл Хром , Вконтакте , Ютуб
Friends i can not run python manage.py migrate on Django 1.6.1. 

I read that i need to install South first. I installed it but "python 
manage.py migrate" has the same problem

Please see screenshot_43 friends

So i read another google topic 
 where i 
saw that maybe command "migrate" not supported by Django 1.6.1

I am new to Django. Please can you give me your advices friends?

How can i run the comman  "python manage.py migrate"??

-- 
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/4e037197-346c-4827-bd0d-1130fc633944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Postgis Raster Query API Spatial Look up. Intersects problem

2016-07-04 Thread Juan Escamilla

Dear Developers,

I recently installed the latest Django version (github)  
'1.11.dev20160703135514'

To use the spatial lookup API . Specially the GeoQuery.filter(__intersects, 
something) function.

I've found that the method hangs while executing. 

I'm using a very big dataset. If I use a small raster it works without 
problems.
In any case, there is a function (ST_Polygon) in between that is making a 
lot of troubles. Seems that everything is faster without it.

Let me show you:

t0.biomeGeometry is a Polygon Field from geodjango model base

DemMexLow is the ModelBase of a raster table.

aa = DemMexLow.objects.filter(rast__intersects=t0.biomeGeometry)

If I retrieve the data it almost never ends. Takes a lot of time.

Examining the raw query I got this:

SELECT "demmex120"."rid", "demmex120"."rast" FROM "demmex120" WHERE 
ST_Intersects(ST_Polygon("demmex120"."rast"), 
ST_GeomFromEWKB('\001\003\000\000 
\346\020\000\000\001\000\000\000\005\000\000\000\000\000\000\000\000@[\300\000\000\000\000\000\000;@\000\000\000\000\0004[\300\000\000\000\000\000\000;@\000\000\000\000\0004[\300\000\000\000\000\;@\000\000\000\000\000@[\300\000\000\000\000\;@\000\000\000\000\000@[\300\000\000\000\000\000\000;@'::bytea))


where: demmex120 is the name of the table.

The substring in yellow : ST_Polygon("demmex120"."rast"   is the problem.

If I run the raw sql without the ST_Polygon the query is fast. 

What is the purpose of this?


Thank you very much and best wishes

Juan



 

-- 
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/1be483fa-a95a-4d5e-98e6-0161b9e58159%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to freeze models without denormalizing them?

2016-07-04 Thread Антон Ставинский
Hello. 
If you changing some fields of Author, books will not changed, except you 
changed Author.id. 
I think it would be much clear if you will provide some real python 
example. 

On Sunday, July 3, 2016 at 5:20:40 PM UTC+3, Hermano Cabral wrote:
>
> Hello guys and gals, 
>
> Assuming a simple django project where you have models Author and Book 
> (pseudo code): 
>
> Author: 
>  - Name = char field 
>  - Birthdate = date field 
>
> Book: 
>  - Name = char field 
>  - Author = foreign key (Author) 
>
> Is there a way to freeze books in a way that changes to an author are not 
> propagated to its books? I know I can denormalize the Book model to 
> accomplish that, but I'm looking for another way to do that. I tried using 
> some of the versioning apps out there but none of them work well for my 
> case. 
>
> The scenario I have is that some of my models cannot be changed after they 
> are entered into the system, for example, if the "Bible" Book is entered 
> into the system with the Author "Jedus Christ", when someone catches the 
> typo and changes the Author name to "Jesus Christ" the Book "Bible" would 
> still need to have "Jebus Christ" as it's Author. 
>
> Thanks. 
>
> Sent from my iPhone

-- 
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/b89ac939-4065-4390-bfe5-65c70cf8f3a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing Django Problem.

2016-07-04 Thread Steve Burrus
Well I successfully set up the Django server an d then connected to oit BUT
I couldn't use that "syncdb" command to then set the pw and username in the
admin.

On Sun, Jul 3, 2016 at 11:15 PM, Mike Dewhirst 
wrote:

> On 4/07/2016 1:06 PM, Steve Burrus wrote:
>
>> Well I did tjhis okay "(stevesenv)
>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install django" but
>> still the question persists where I go from here? I remember using
>> "django-admin" before. How do I use that?
>>
>
> Here is a good place to start ...
>
> https://docs.djangoproject.com/en/1.9/
>
> That page covers how the documentation is organised. You need to work your
> way through all the installation steps including database etc.
>
> Then the most important next step is to wrk through the tutorial. Once you
> get that done there are quite a few third party tutorials on the web.
>
> Good luck
>
>
> Mike
>
>
>
>
>
>> On Sun, Jul 3, 2016 at 9:32 PM, Mike Dewhirst > > wrote:
>>
>> On 4/07/2016 12:01 PM, Steve Burrus wrote:
>>
>> well I uyet again am encountering problems with installing the
>> Django
>> server. I managed to get to this point "(stevesenv)
>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>"
>>
>>
>> It looks as though you have successfully got virtualenv working.
>>
>> Therefore the short answer to your question is ...
>>
>> (stevesenv) C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install
>> django
>>
>> Cheers
>>
>> Mike
>>
>>
>> but where exactly do I go
>>
>> from here in installing django? Man y thanx to anyone who can
>> help me
>> with this "trying" problem of mine.Â
>>
>> --
>> 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 > 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/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/django-users/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com?utm_medium=email_source=footer
>> >.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in
>> the Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>>
>> https://groups.google.com/d/topic/django-users/9wVk4lDZcMY/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/58cd5e27-6d4d-6929-aa44-b59c526a8c55%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/CABcoaSDkTfc2QoxD_S3PqJCaTiigmp1msrvxDOq-pUK9Y9hD8Q%40mail.gmail.com
>> <
>> https://groups.google.com/d/msgid/django-users/CABcoaSDkTfc2QoxD_S3PqJCaTiigmp1msrvxDOq-pUK9Y9hD8Q%40mail.gmail.com?utm_medium=email_source=footer
>> >.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/9wVk4lDZcMY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> 

Re: Slow Django dev server reload

2016-07-04 Thread Vijay Khemlani
How many models are there in your project?

On Mon, Jul 4, 2016 at 3:46 AM, Hildeberto Mendonça 
wrote:

> Isn't it related to the amount of migration files in your project?
>
> On Mon, Jul 4, 2016 at 9:13 AM, Babatunde Akinyanmi 
> wrote:
>
>> This is a punch in the dark. It takes about 3 -  5 seconds on my my
>> windows machine when I run the dev server using pycharm's inbuilt terminal
>> and my code is way below 5k lines
>> On Jul 4, 2016 7:20 AM, "Krishna Bharadwaj" 
>> wrote:
>>
>>> Hi Fred,
>>>
>>> It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6 GHz Intel
>>> Core i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious to know if I was doing
>>> something wrong. Any pointers regarding this will be very helpful.
>>>
>>> On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:

 Krishna,

 How long is "a long time"?  I have a project of ~200K lines of
 python/django code.  The dev server reloads in a second or so.

 --Fred
 --
 Fred Stluka -- mailt...@bristle.com -- 
 http://bristle.com/~fred/
 Bristle Software, Inc -- http://bristle.com
 
 -- Glad to be of service!
 Open Source: Without walls and fences, we need no Windows or Gates.
 --

 On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:

 Hi everyone,

 I am working on a project which is substantially big (~40k lines of
 python/django code including management commands). Dev server seems to be
 taking a lot of time to reload after making changes. I was wondering if
 this is due to any bad programming practice at my end? Or is this expected
 once the project grows big? I wanted to know if anyone in the group is
 dealing with it in a better way?

 - Regards
 Krishna Bharadwaj
 --
 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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%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/CA%2BWjgXPbO5duGSC8NgGLqNzAwVNGNKkp%2BkE437Lv7%3D%2BVSmBhyA%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Hildeberto Mendonça, Ph.D
> Blog: http://www.hildeberto.com
> Twitter: https://twitter.com/htmfilho
>
> --
> 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/CAJ9t6qMv1FE03zRRNJRoaiH5AhuVWK0T_m_yjCP5L9LcFnXTqQ%40mail.gmail.com
> 

How get used AdminSite in a Django-project (custom or standart)?

2016-07-04 Thread Seti Volkylany
if I have my custom adminsite

http://dpaste.com/0ZJ77EH

To get used the adminsite I simple imported it.


from conf.admin import ProgrammerHelperAdminSite


But may exists build-in Django method, for getting used AdminSite

For example Django has useful method for getting AUTH_USER_MODEL

from django.contrib.auth import get_user_model






-- 
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/7a9e39df-e3ce-4a35-b918-553e61e6c799%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: resetting table id (SOLVED)

2016-07-04 Thread Javier Guerra Giraldez
On 4 July 2016 at 01:09, Gary Roach  wrote:
> All of this drove home the fact that db.sqlite3 is no more than a text file
> and can be thrown away and recreated any time I like


wrong.

SQLite keeps the database on a single file, but its nowhere near a
"text file".  you did truncate to a single byte ('\n', added by
default if you don't use the '-n' option on echo), and it had to be
thrown away and recreated.  it would've been 'nicer' to just delete
it.

-- 
Javier

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


Re: Installing Django Problem.

2016-07-04 Thread Hildeberto Mendonça
I strongly recommend this tutorial for beginners:
http://tutorial.djangogirls.org/en/

I helped me on my first contact with Django. The girls are doing a great
job there.

On Mon, Jul 4, 2016 at 6:15 AM, Mike Dewhirst  wrote:

> On 4/07/2016 1:06 PM, Steve Burrus wrote:
>
>> Well I did tjhis okay "(stevesenv)
>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install django" but
>> still the question persists where I go from here? I remember using
>> "django-admin" before. How do I use that?
>>
>
> Here is a good place to start ...
>
> https://docs.djangoproject.com/en/1.9/
>
> That page covers how the documentation is organised. You need to work your
> way through all the installation steps including database etc.
>
> Then the most important next step is to wrk through the tutorial. Once you
> get that done there are quite a few third party tutorials on the web.
>
> Good luck
>
>
> Mike
>
>
>
>
>
>> On Sun, Jul 3, 2016 at 9:32 PM, Mike Dewhirst > > wrote:
>>
>> On 4/07/2016 12:01 PM, Steve Burrus wrote:
>>
>> well I uyet again am encountering problems with installing the
>> Django
>> server. I managed to get to this point "(stevesenv)
>> C:\Users\sbur87\Desktop\steves_dir\stevesenv>"
>>
>>
>> It looks as though you have successfully got virtualenv working.
>>
>> Therefore the short answer to your question is ...
>>
>> (stevesenv) C:\Users\sbur87\Desktop\steves_dir\stevesenv>pip install
>> django
>>
>> Cheers
>>
>> Mike
>>
>>
>> but where exactly do I go
>>
>> from here in installing django? Man y thanx to anyone who can
>> help me
>> with this "trying" problem of mine.Â
>>
>> --
>> 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 > 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/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/django-users/e29b7fb8-ebda-4afc-890d-4048c4fe2e52%40googlegroups.com?utm_medium=email_source=footer
>> >.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in
>> the Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>>
>> https://groups.google.com/d/topic/django-users/9wVk4lDZcMY/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/58cd5e27-6d4d-6929-aa44-b59c526a8c55%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/CABcoaSDkTfc2QoxD_S3PqJCaTiigmp1msrvxDOq-pUK9Y9hD8Q%40mail.gmail.com
>> <
>> https://groups.google.com/d/msgid/django-users/CABcoaSDkTfc2QoxD_S3PqJCaTiigmp1msrvxDOq-pUK9Y9hD8Q%40mail.gmail.com?utm_medium=email_source=footer
>> >.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit 

Re: Slow Django dev server reload

2016-07-04 Thread Hildeberto Mendonça
Isn't it related to the amount of migration files in your project?

On Mon, Jul 4, 2016 at 9:13 AM, Babatunde Akinyanmi 
wrote:

> This is a punch in the dark. It takes about 3 -  5 seconds on my my
> windows machine when I run the dev server using pycharm's inbuilt terminal
> and my code is way below 5k lines
> On Jul 4, 2016 7:20 AM, "Krishna Bharadwaj" 
> wrote:
>
>> Hi Fred,
>>
>> It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6 GHz Intel
>> Core i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious to know if I was doing
>> something wrong. Any pointers regarding this will be very helpful.
>>
>> On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:
>>>
>>> Krishna,
>>>
>>> How long is "a long time"?  I have a project of ~200K lines of
>>> python/django code.  The dev server reloads in a second or so.
>>>
>>> --Fred
>>> --
>>> Fred Stluka -- mailt...@bristle.com -- 
>>> http://bristle.com/~fred/
>>> Bristle Software, Inc -- http://bristle.com
>>> 
>>> -- Glad to be of service!
>>> Open Source: Without walls and fences, we need no Windows or Gates.
>>> --
>>>
>>> On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:
>>>
>>> Hi everyone,
>>>
>>> I am working on a project which is substantially big (~40k lines of
>>> python/django code including management commands). Dev server seems to be
>>> taking a lot of time to reload after making changes. I was wondering if
>>> this is due to any bad programming practice at my end? Or is this expected
>>> once the project grows big? I wanted to know if anyone in the group is
>>> dealing with it in a better way?
>>>
>>> - Regards
>>> Krishna Bharadwaj
>>> --
>>> 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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%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/CA%2BWjgXPbO5duGSC8NgGLqNzAwVNGNKkp%2BkE437Lv7%3D%2BVSmBhyA%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Hildeberto Mendonça, Ph.D
Blog: http://www.hildeberto.com
Twitter: https://twitter.com/htmfilho

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


Re: Slow Django dev server reload

2016-07-04 Thread Babatunde Akinyanmi
This is a punch in the dark. It takes about 3 -  5 seconds on my my windows
machine when I run the dev server using pycharm's inbuilt terminal and my
code is way below 5k lines
On Jul 4, 2016 7:20 AM, "Krishna Bharadwaj"  wrote:

> Hi Fred,
>
> It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6 GHz Intel Core
> i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious to know if I was doing
> something wrong. Any pointers regarding this will be very helpful.
>
> On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:
>>
>> Krishna,
>>
>> How long is "a long time"?  I have a project of ~200K lines of
>> python/django code.  The dev server reloads in a second or so.
>>
>> --Fred
>> --
>> Fred Stluka -- mailt...@bristle.com -- 
>> http://bristle.com/~fred/
>> Bristle Software, Inc -- http://bristle.com
>> 
>> -- Glad to be of service!
>> Open Source: Without walls and fences, we need no Windows or Gates.
>> --
>>
>> On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:
>>
>> Hi everyone,
>>
>> I am working on a project which is substantially big (~40k lines of
>> python/django code including management commands). Dev server seems to be
>> taking a lot of time to reload after making changes. I was wondering if
>> this is due to any bad programming practice at my end? Or is this expected
>> once the project grows big? I wanted to know if anyone in the group is
>> dealing with it in a better way?
>>
>> - Regards
>> Krishna Bharadwaj
>> --
>> 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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%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/CA%2BWjgXPbO5duGSC8NgGLqNzAwVNGNKkp%2BkE437Lv7%3D%2BVSmBhyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Slow Django dev server reload

2016-07-04 Thread Krishna Bharadwaj
Hi Fred,

It takes about 3.5 - 5 seconds on my machine (Mac OSX - 2.6 GHz Intel Core 
i5, 8 GB 1600 MHz DDR3 and SSDs). I was curious to know if I was doing 
something wrong. Any pointers regarding this will be very helpful.

On Sunday, 3 July 2016 20:47:50 UTC+5:30, Fred Stluka wrote:
>
> Krishna,
>
> How long is "a long time"?  I have a project of ~200K lines of
> python/django code.  The dev server reloads in a second or so.
>
> --Fred 
> --
> Fred Stluka -- mailt...@bristle.com  -- 
> http://bristle.com/~fred/ 
> Bristle Software, Inc -- http://bristle.com 
> 
>  
> -- Glad to be of service! 
> Open Source: Without walls and fences, we need no Windows or Gates. 
> --
>
> On 7/3/16 8:42 AM, Krishna Bharadwaj wrote:
>
> Hi everyone, 
>
> I am working on a project which is substantially big (~40k lines of 
> python/django code including management commands). Dev server seems to be 
> taking a lot of time to reload after making changes. I was wondering if 
> this is due to any bad programming practice at my end? Or is this expected 
> once the project grows big? I wanted to know if anyone in the group is 
> dealing with it in a better way? 
>
> - Regards
> Krishna Bharadwaj
> -- 
> 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/a97cacc1-c8c8-4075-a853-5f5d1bb156d6%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/d1e25f49-5672-4dd0-bdf1-cf8ffd012e4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.