how to forbidden refresh page in django during loading after press submit button in form and only allow close window

2016-06-09 Thread meInvent bbird
how to forbidden refresh page in django during loading after press submit 
button in form and only allow close window

-- 
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/0b42fe82-1b00-42b1-9de5-6425fc79e7a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


which regex are for filtering malicious input in django?

2016-06-09 Thread meInvent bbird
which regex are for filtering malicious input in django?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+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/e1fe2b2f-e1d4-449d-bf94-3ba12fdf4b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to forbidden mouse click and keyboard typing when loading page after press submit button in django web?

2016-06-09 Thread meInvent bbird
how to forbidden mouse click and keyboard typing when loading page after 
press submit button in django web?

-- 
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/792a83c6-500a-4443-8c2b-e1a0cb7ae661%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Expiration date option

2016-06-09 Thread James Schneider
On Wed, Jun 8, 2016 at 9:25 AM, 'David Turner' via Django users <
django-users@googlegroups.com> wrote:

> Hi James
>
> Just one more quick question:
> I have two django models both containing the same information, temps and
> companies.
> The models both contain the following fields:
>
> odd days
> weekends
> nights
> emergencies
>
> Currently this allows me to filter on these fields in django admin.
> My question is would I be better treating these as a many to many model
> and using them that way and how would I filter them in django admin?
>
>
I have not used the admin much beyond the tutorial, so any answers from me
would be less than useful.

I don't quite understand the question. The only reason you would connect
them with a M2M would be if the two models had some sort of relationship
with each other. I don't think I have enough information to provide a
recommendation one way or the other. Ease of filtering in the admin should
have less influence than the business use case for model design.

I'm also not entirely sure what 'temps' refers to (temporary employees?),
which doesn't help my understanding of the question.

If you have two models that contain the same information, would it be more
prudent to combine them into a single more generic model and
separate/filter them by some sort of categorical field? For example, you
might have a model for a Car, and a model for a Truck, but both could
potentially be lumped together in a more generic model called Automobile,
or Vehicle (which is even more generic). Automobile could have a
'vehicle_class' attribute that would designate it as a 'car', 'truck', etc.
It's really dependent on the business use case and whether or not there is
enough difference between the two classes of vehicles to warrant having
separate models. Think of separate models from a very high level like "I
need all the car-like things over here, and all the people-like things over
here." Your models usually won't get more specific than that unless there
is a specific reason to do so.

Even if the business logic was different, but the underlying data structure
was the same, you could employ proxy models for 'Automobile' named 'Car'
and 'Truck' that have overlapping model methods with different behavior
(but are maintained within the same DB table).

I feel like I'm rambling on a tangent, so I'll stop there.

-James

-- 
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%2Be%2BciUfDrBMkidPi-GF9Lw%3DOn-maoBgsAxKUpvfcma5QZG2fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


weak object has gone away

2016-06-09 Thread Martín Massera
Hi ! 

Every 6-12 months it happens that all my views start failing with this 
error:
  

TypeError: weak object has gone away


There are some caches here and there and it seems to me that there must be 
a problem with them, but I dont know since this doesnt happen when I 
develop, it only happens after months of uptime.

I posted this question in stackoverflow if you want to look there, I really 
appreciate the help!

http://stackoverflow.com/questions/37737709/weak-object-has-gone-away-python-django

Take care!
Martin

-- 
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/956d96f7-81dc-42b7-beb1-8fb7308c88a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django and jQuery, I don't get it

2016-06-09 Thread Mike Dewhirst
I can't help at all with jquery but IIRC there is a question in the 
Admin "Are you sure?" when you try deleting something from a list view.


Might be a start

Mike

On 10/06/2016 1:06 AM, Olivier Dalang wrote:

Hi !

I'm using several modules that rely on jQuery, and have some own needs
as well :

- admin
- grappelli
- autocomplete light
- session security
...


I also see that there are tons of different variables that reference
jQuery, defined by theses modules, some of which are the same, and some
of which are not :

$
jQuery
django.jQuery
grp.jQuery
yl.jQuery
...


I also see django uses this type of syntax which seems to deal about
dependecies and clonflicts, but is very cryptic to me (unfortunately
such a problem is very hard to google) :

/*global DateTimeShortcuts, SelectFilter*/
...
(function($) {
    'use strict';
    
})(django.jQuery);



Being a javascript ignorant, up to now, each time I had some javascript
exceptions because of jQuery conflicts/undefined, I hacked a bit
randomly until the exception disappeared, but I never understood the
logic behind this.

I'd love some guidance, as my project grows more and more complex, and
hacking randomly doesn't shine as a particularly good long term strategy.

As partical example, what would be a clean way to add jQuery.AreYouSure
 to the django admin
forms ?

Is there some documentation or guidelines that explain best practices ?
Or is it indeed a mess and not just me not understanding ?

Thanks !

Olivier


--
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/CAExk7p2eggp9rTviqo%2BQ%3DUhprxoLPJ4kWeP7Z_sx0xjZY%3DSVqA%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/dd1395af-9459-f32a-d300-ed60657a14bd%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Custom Database Connector Based on psycopg2 for External Postgres DB

2016-06-09 Thread Michal Petrucha
On Wed, Jun 08, 2016 at 06:14:44PM -0700, Brandon wrote:
> Hi! I am attempting to create my own database connector for Django for an 
> external PostgreSQL DB that I have running. For this application, I issue 
> the SQL queries and get responses over a REST API, so in theory, I'd like 
> to adopt what already exists in the Postgres connector 
> (django.db.backends.postgresql_psycopg2 I believe). Ideally, my hope is 
> that I'd just override the psycopg2 call to the Postgres DB with my own 
> call to my REST API, since the SQL query is the same. But I'm having 
> trouble figuring out where this can go and if it can be this simple. Any 
> help or advice would be much appreciated, thanks in advance!

Hi Brandon,

In order for this to work, you'd need to reimplement a Python
DBAPI-compatible wrapper around your REST API with support for a bunch
of non-trivial features, such as correct parameter substitution, or
type handling. Also, you'd probably need to implement transaction
handling somehow, which will be a non-trivial thing, because
transactions by definition rely on some state of a database
connection, whereas REST is supposed to be stateless.

Overall, this does not sound like a good idea to me, and I would
strongly recommend using a regular Postgres database connection
instead.

Cheers,

Michal

-- 
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/20160609213019.GF29054%40konk.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: Stuck on tutorial your first Django app part 2

2016-06-09 Thread Bill Freeman
What is the definition of your __str__() method?

On Thu, Jun 9, 2016 at 4:11 PM, Neil Hunt  wrote:

> Hello,
>
> I'm enjoying the tutorial and now I'm stuck on the second page (writing
> your first Django app part 2), shortly after this paragraph.
>
> 'It’s important to add __str__()
> 
> methods to your models, not only for your own convenience when dealing with
> the interactive prompt, but also because objects’ representations are used
> throughout Django’s automatically-generated admin.'
>
> The tutorial says to go into the interactive shell again.
>
> This line runs without error.
>
> 'from polls.models import Question, Choice'
>
> The next line Question.objects.all() results in
>
> '[]' instead of
>
> '[]'
>
> Any help would be much appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3154675a-5749-434e-9fce-3aae49014959%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/CAB%2BAj0un20P4O3hd%3DvyRk6FOqO9c3KoN8xYEd7%3DCsXyCaDAoKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Stuck on tutorial your first Django app part 2

2016-06-09 Thread Neil Hunt
Hello,

I'm enjoying the tutorial and now I'm stuck on the second page (writing 
your first Django app part 2), shortly after this paragraph.

'It’s important to add __str__() 

 
methods to your models, not only for your own convenience when dealing with 
the interactive prompt, but also because objects’ representations are used 
throughout Django’s automatically-generated admin.'

The tutorial says to go into the interactive shell again.

This line runs without error.

'from polls.models import Question, Choice'

The next line Question.objects.all() results in

'[]' instead of 

'[]'

Any help would be much appreciated.

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


Queries regarding Custom Managers with model inheritance.

2016-06-09 Thread Dheerendra Rathor
I was going 
through 
https://docs.djangoproject.com/en/1.9/topics/db/managers/#custom-managers-and-model-inheritance
 
regarding custom managers and I decided to do some tests. Here are my 
models:

from django.db import models


class CustomManager(models.Manager):

use_for_related_fields = True


class ExtraManager(models.Manager):
use_for_related_fields = True


class AnotherManager(models.Manager):
use_for_related_fields = True


class A(models.Model):

objects = CustomManager()

all_objects = AnotherManager()

class Meta:
abstract = True


class B(A):
pass


class C(A):
objects = ExtraManager()


class D(C):
pass


class E(A):
all_objects = AnotherManager()
objects = ExtraManager()


class F(E):
pass


Here are the results of few code executions:

In [1]: from app.models import *

In [2]: F.objects
Out[2]: 

In [3]: D.objects
Out[3]: 

In [4]: D._default_manager
Out[4]: 

In [5]: F._de
F._default_manager  F._deferred 

In [5]: F._default_manager
Out[5]: 

In [6]: F.all_objects
Out[6]: 



Here I have few queries:
- How come AnotherManager is default Manage for D? It is neither default 
manager for C and neither it is first Manager in A.
 
- Why D.objects is ExtraManager (from C objects) but F.objects is default 
Django Manager

Someone please help to understand theses. 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/45df67aa-3d06-4ef5-a736-42c5ff773228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django - Crop Images with jquery and after that save them on cdn

2016-06-09 Thread sevenrrainbow
I'm try to use jquery and python to "crop" a image in Django. I want to 
work in admin but also in front-end.

The user selects a box/rectangle, for the portion of the image that he want 
to crop.

django-image-cropping  
package 
is close to what I want, but I have some problems in admin, use a old 
jquery version(need to maintain two) and seems that is not working very 
well with cdn. 

I like the jquery part using http://deepliquid.com/projects/Jcrop/demos.php.


sorl-thumbnail,  django-versatileimagefield are good but they don't have 
the jquery implementation that I want.

I can try also do it without a package if I can find a good tutorial. I 
found many tutorials for php but nothing yet for python.

Can you guide me, give me an example and how to do 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/9ae1b88f-05ce-400f-adad-923a86d904bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin download doesn't work but doa

2016-06-09 Thread Ezequiel Bertti
Hi!

Can you send the complete exception message whit traceback to us?

On Thu, Jun 9, 2016 at 1:07 PM, McKinley  wrote:

> I have a view that allows me to download, but I can't download from Django
> admin. This is my view that allows me to download. How do I put similar
> logic in the admin?
>
>
> def script_download(request, script_id):
> scripts = Scripts.objects.get(id=script_id)
> fsock = open(str(scripts.zipfile_file_name),'r')
> response = HttpResponse(fsock, content_type='application/zip')
> response['Content-Disposition'] = "attachment; filename=%s  "% str(
> scripts.zipfile_file_name)
> return response
>
>
> --
> 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/760e012c-5aef-43b3-ba60-452d067459f6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ezequiel Bertti

https://telegram.me/ebertti
https://twitter.com/ebertti
https://github.com/ebertti

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


Re: Adding Tinymce to Admin

2016-06-09 Thread Ankush Thakur
Nope. And you know why, coz I'm an idiot! :P

Will try this and post here if I run into problems. Thanks a ton!

~~Ankush

On Thursday, June 9, 2016 at 5:15:52 PM UTC+5:30, jorr...@gmail.com wrote:
>
> Have you looked at https://github.com/aljosa/django-tinymce ?
>

-- 
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/4ee8d6d4-c633-4327-80c0-cb7042024e7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Tinymce to Admin

2016-06-09 Thread Ankush Thakur
Ah, yes! I entirely forgot about admin.py, my head swirling with too many 
concepts to remember. Let me work on that see how it goes. Thanks! :-)

~~Ankush

On Thursday, June 9, 2016 at 2:20:04 PM UTC+5:30, ludovic coues wrote:
>
> I'm pretty sure you can specify a widget to use in admin for each model 
> and field. 
>
> Part 7 of the tutorial will show you how to alter the admin without 
> changing the file in the virtualenv. 
> The documentation on ModelAdmin have an example of what you are trying to 
> do :)
>
> +33614874342
> On 8 Jun 2016 6:56 p.m., "Ankush Thakur"  > wrote:
>
>> I wish to add TinyMCE editor to my Django-powered app. My Model is a 
>> typical blog model, with a TextField for the actual post contents. Now what 
>> I want is, every time I'm editing the contents (or adding a new blog), I 
>> should be able to write in a WordPress-style editor. 
>>
>> I understand that I'd need to add some third-party app for TinyMCE and 
>> then set it as a widget, but my problem is that the admin templates do not 
>> reside in my project Git repository. They are in the virtualenv directory, 
>> and I'm not sure how I'll be able to integrate them into my project.
>>
>> A little voice at the back of my head tells me that I won't need to alter 
>> Admin, but I'm not sure. Because I don't have any forms (I directly 
>> edit/create from the Admin), I don't think I can get away with only saying 
>> something like 'content = models.TextField(widget='tinymce')'?
>>
>> Regards,
>> Ankush Thakur
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CALX%3DrKLBResPR-n8SCibpckFAN5PwhHWSH5xBgEnmPaGLUvsrw%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/d990f370-741c-4c88-9e34-95d9f18aca9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Quick-render an object in generic CBV

2016-06-09 Thread Ankush Thakur
I'm exploring generic class-based views these days, and was wondering about
something. When I use DetailView, the object gets passed to the template,
where I have to print all of the properties one by one in the desired HTML
element.

I was wondering if it's possible to quick-render an object the way we do
with model forms? I mean, is there some way I can say something like
'object.as_table()'? I thought of using FormView as a substitute for this,
but that requires data to be present in POST, and forcibly populating POST
seems like a bad idea.

Any thoughts?

Regards,
Ankush Thakur

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+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/CALX%3DrK%2BYJkSS_GVRzE3n7oDRwsU%2B21BR8o_1jMXCFxqynh0n9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template tag don't work ==

2016-06-09 Thread Ing. Jaime Sanchez
ok this is view.

def junior_pending_impacts(request, pk=None):
queryset_list = IgcNew.objects.all()
count_new = IgcNew.objects.filter(IGC_Status__contains='New').count()
# log.warning('%s' % count_new)
noregistro = overall_impact.objects.all()
# log.warning('%s' % overall_impact.igc_master)

if overall_impact.igc_master == IgcNew.pk:
valor = overall_impact.igc_master
log.warning('%s' % valor)

context = {
"title": "Pending Impacts.",
"count": count_new,
"object_list": queryset_list,
"overall": noregistro,
}
return render(request, "junior_pending_impacts.html", context)

this is template.

{% for obj in object_list %}

  var myVar = setInterval(myTimer, 1000);
  
  function myTimer() {
  var d = new Date();
  document.getElementById("demo").innerHTML = 
d.toLocaleTimeString();
  }
  
{% if obj.IGC_Status == 'New' %}

  
IGC ID: {{ obj.pk }}
  IGC 
Subject: {{ obj.subject|truncatechars:100 }}
  
  
  
Summary: {{ obj.summary|truncatechars:100 }}
Impact: {% for over in overall %}{% ifequal 
over.igc_master obj.id %}TEST{{ over.igc_master }}{{ over.impact }}{% 
endifequal %}{% endfor %}
Pimary Contact(s): 
{% for over in overall %}

{% with index=over.igc_master %}

test {{ index }}
{% if index == obj.pk %}
mal {{ index }}
{% else %}
OK {{ index }}
{% endif %}

{% endwith %}


{% ifequal obj.pk over.igc_master %}
  Test Jaime Sanchez
  {{ over.primary_contacts }}
{% endifequal %} 
{% endfor %}
NOC Technician: 
Status: 
Remaining Time: 
Preview
  

{% endif %}
{% endfor %}

El jueves, 9 de junio de 2016, 11:33:24 (UTC-5), Ing. Jaime Sanchez 
escribió:
>
> Help please!!
>
> I need do like this
> in django 1.9 template tag 
>
> {% if model1.obj == model2.obj %}
> print ok
> {% else %}
> print not OK
> {% endif %}
>
> but don't work.
>
> someone help me??
>

-- 
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/08860d9d-beb2-483a-81c2-1c9bbccb8899%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where is this warning coming from?

2016-06-09 Thread Tim Graham
timezone.now().date() returns datetime.date() which doesn't have a timezone.

You can use the date lookup in Django 1.9+: 
https://docs.djangoproject.com/en/stable/ref/models/querysets/#date

On Thursday, June 9, 2016 at 7:43:33 AM UTC-4, jorr...@gmail.com wrote:
>
> I have a view that calculates some quick statistics:
>
> def index(request):
> context = {
> 'topics_unanswered': Topic.on_site.filter(topic_type=1, 
> date_published__isnull=False, reply__isnull=True).count(),
> 'members_unapproved': 
> User.objects.filter(profile__is_approved=False).count(),
> 'members_unverified_7days': 
> User.objects.filter(profile__is_approved=False, 
> date_joined__lte=timezone.now()-timezone.timedelta(days=7), 
> profile__email_verified=False).count(),
> 'topics_today': 
> Topic.on_site.filter(date_published__gte=timezone.now().date()).count(),
> 'replies_today': 
> Reply.on_site.filter(date_published__gte=timezone.now().date()).count(),
> 'members_today': 
> User.objects.filter(date_joined__gte=timezone.now().date()).count(),
> }
> return render(request, 'admincp/index.html', context)
>
>
> But when I open the page I get the following warnings:
>
> ...\lib\site-packages\django\db\models\fields\__init__.
> py:1393: RuntimeWarning: DateTimeField Topic.date_published received a 
> naive dat
> etime (2016-06-09 00:00:00) while time zone support is active.
>   RuntimeWarning)
>
> ...\lib\site-packages\django\db\models\fields\__init__.
> py:1393: RuntimeWarning: DateTimeField Reply.date_published received a 
> naive dat
> etime (2016-06-09 00:00:00) while time zone support is active.
>   RuntimeWarning)
>
> ...\lib\site-packages\django\db\models\fields\__init__.
> py:1393: RuntimeWarning: DateTimeField User.date_joined received a naive 
> datetim
> e (2016-06-09 00:00:00) while time zone support is active.
>   RuntimeWarning)
>
> [09/Jun/2016 13:38:09] "GET /admincp/ HTTP/1.1" 200 14002
>
> I'm using timezone(), so why am I getting these warnings?
>
> Thanks for the help!
>

-- 
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/f3850440-9c74-485e-897d-78ab068cb187%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: template tag don't work ==

2016-06-09 Thread Tim Graham
A sample project to reproduce the problem is probably needed.

On Thursday, June 9, 2016 at 12:33:24 PM UTC-4, Ing. Jaime Sanchez wrote:
>
> Help please!!
>
> I need do like this
> in django 1.9 template tag 
>
> {% if model1.obj == model2.obj %}
> print ok
> {% else %}
> print not OK
> {% endif %}
>
> but don't work.
>
> someone help me??
>

-- 
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/69ac610b-4099-43f0-b68e-a21e159f7585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


template tag don't work ==

2016-06-09 Thread Ing. Jaime Sanchez
Help please!!

I need do like this
in django 1.9 template tag 

{% if model1.obj == model2.obj %}
print ok
{% else %}
print not OK
{% endif %}

but don't work.

someone help me??

-- 
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/0a53a5c6-8255-444f-b7ee-6ea20b399b87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Admin download doesn't work but doa

2016-06-09 Thread McKinley
I have a view that allows me to download, but I can't download from Django 
admin. This is my view that allows me to download. How do I put similar 
logic in the admin?


def script_download(request, script_id):
scripts = Scripts.objects.get(id=script_id)
fsock = open(str(scripts.zipfile_file_name),'r')
response = HttpResponse(fsock, content_type='application/zip')
response['Content-Disposition'] = "attachment; filename=%s  "% str(
scripts.zipfile_file_name)
return response


-- 
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/760e012c-5aef-43b3-ba60-452d067459f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django and jQuery, I don't get it

2016-06-09 Thread Olivier Dalang
Hi !

I'm using several modules that rely on jQuery, and have some own needs as
well :

- admin
> - grappelli
> - autocomplete light
> - session security
> ...


I also see that there are tons of different variables that reference
jQuery, defined by theses modules, some of which are the same, and some of
which are not :

$
> jQuery
> django.jQuery
> grp.jQuery
> yl.jQuery
> ...


I also see django uses this type of syntax which seems to deal about
dependecies and clonflicts, but is very cryptic to me (unfortunately such a
problem is very hard to google) :

/*global DateTimeShortcuts, SelectFilter*/
> ...
> (function($) {
> 'use strict';
> 
> })(django.jQuery);



Being a javascript ignorant, up to now, each time I had some javascript
exceptions because of jQuery conflicts/undefined, I hacked a bit randomly
until the exception disappeared, but I never understood the logic behind
this.

I'd love some guidance, as my project grows more and more complex, and
hacking randomly doesn't shine as a particularly good long term strategy.

As partical example, what would be a clean way to add jQuery.AreYouSure
 to the django admin forms ?

Is there some documentation or guidelines that explain best practices ? Or
is it indeed a mess and not just me not understanding ?

Thanks !

Olivier

-- 
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/CAExk7p2eggp9rTviqo%2BQ%3DUhprxoLPJ4kWeP7Z_sx0xjZY%3DSVqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Design an encrypted time-limited API on Client/Server side

2016-06-09 Thread James Schneider
On Jun 9, 2016 4:59 AM, "Philip Lee"  wrote:
>
> I am planning design an encrypted time-limited API on both Client and
Server sides, the server side is written in Django, the client side is a
GUI program which call the API by
>
> import requests
> c = requests.post("http://127.0.0.1:8000/VideoParser/;, data={'videoUrl':
videoUrl })
>
> The way it call the API is desperately exposed to those who can use
network traffic capturing tools like wireshark and fiddler, while I don't
want anyone else could call the API with their customized videoUrl, and if
people made the post call with the same parameters 2 minutes later after
the client initially made the call, the call should be valid or expired, so
how to design the encrypted time-limited API on both Client and Server side
in this case ?
>

This is the exact reason HTTPS was invented. If you are concerned about
data privacy and integrity during transport, implement HTTPS on your server
and force the client to use it. You should also be authenticating and
authorizing users for the same reason.

> 
>
> P.S. I think add an identifier to the post data could prevent them using
the API
>
> import requests
> c = requests.post("http://127.0.0.1:8000/VideoParser/;, data={'videoUrl':
videoUrl, 'identifier':value_of_identifier })
>
> provided there is something encrypted in the value_of_identifier and it
changes with each call, but I don't know how to get started, any idea ?
>

The obfuscation techniques you are proposing will only make your life
miserable and will probably be trivial for an attacker to figure out.

Focus your energy on getting HTTPS properly in place.

-James

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


Re: Where is this warning coming from?

2016-06-09 Thread James Schneider
> py:1393: RuntimeWarning: DateTimeField User.date_joined received a naive
datetim
> e (2016-06-09 00:00:00) while time zone support is active.
>   RuntimeWarning)
>
> [09/Jun/2016 13:38:09] "GET /admincp/ HTTP/1.1" 200 14002
>
> I'm using timezone(), so why am I getting these warnings?
>

What is USE_TZ set to? If it is set to False (the default), you'll get
naive datetime values from django.utils.timezone:

https://docs.djangoproject.com/en/1.9/ref/utils/#django.utils.timezone.now

You can use timezone.is_aware() to verify.

https://docs.djangoproject.com/en/1.9/ref/utils/#django.utils.timezone.is_aware

-James

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


Re: Django query returns nothing for legacy databse

2016-06-09 Thread Remco Gerlich
Do you have a database router set up to tell Django which models are stored
in which database?

Greetings,
Remco Gerlich

On Thu, Jun 9, 2016 at 2:13 PM, Galil  wrote:

> Hello,
>
> I am using two databses for my Django app and one of them is an existing
> MySQL database:
>
> DATABASES = {
>  'default': {
>  'ENGINE': 'django.db.backends.sqlite3',
>  'NAME': os.path.join(BASE_DIR, 'users.sqlite3'),
>  },
>  'calls': {
>  'ENGINE': 'django.db.backends.mysql',
>  'NAME': 'portal2',
>  'USER': 'cdraccess',
>  'PASSWORD': '**',
>  'HOST': '[MY_HOST]',
>  },
>
> }
>
>
> I used inspectdb to create the models for the call and they look like:
>
> class Calls(models.Model):
>  callid = models.AutoField(db_column='CallID', primary_key=True) # Field
> name made lowercase.
>  conferencename = models.CharField(db_column='ConferenceName', max_length=
> 200) # Field name made lowercase.
>  jointime = models.DateTimeField(db_column='JoinTime') # Field name made
> lowercase.
>  leavetime = models.DateTimeField(db_column='LeaveTime', blank=True, null=
> True) # Field name made lowercase.
>
>  class Meta:
>  managed = True
>  db_table = 'ConferenceCall2'
>
>
> I called makemigrations and then migrate and everything looks fine.
>
> However, when I run a query like Calls.objects.all() the result is: [].
>
> Or when I tried Calls..objects.count() the result was: 0. The MySQL database 
> is not empty, but apparently Django ORM believes that it is.
>
> Am I missing something?
>
> --
> 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/c7052a27-e3ac-41fa-90a1-a1c266cd1c71%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/CAFAGLK2EU10QrxMdEUAVcwv7LYW7-_VvczPhFLakRWUE8Q7Ugg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django query returns nothing for legacy databse

2016-06-09 Thread Gagaro
Hi,

You should select the database you want to use: 
Calls.objects.using('calls').all()

See 
https://docs.djangoproject.com/en/1.9/topics/db/multi-db/#manually-selecting-a-database

On Thursday, 9 June 2016 14:13:22 UTC+2, Galil wrote:
>
> Hello,
>
> I am using two databses for my Django app and one of them is an existing 
> MySQL database: 
>
> DATABASES = {
>  'default': {
>  'ENGINE': 'django.db.backends.sqlite3',
>  'NAME': os.path.join(BASE_DIR, 'users.sqlite3'),
>  },
>  'calls': {
>  'ENGINE': 'django.db.backends.mysql',
>  'NAME': 'portal2',
>  'USER': 'cdraccess',
>  'PASSWORD': '**',
>  'HOST': '[MY_HOST]',
>  },
>
> }
>
>
> I used inspectdb to create the models for the call and they look like:
>
> class Calls(models.Model):
>  callid = models.AutoField(db_column='CallID', primary_key=True) # Field 
> name made lowercase.
>  conferencename = models.CharField(db_column='ConferenceName', max_length=
> 200) # Field name made lowercase.
>  jointime = models.DateTimeField(db_column='JoinTime') # Field name made 
> lowercase.
>  leavetime = models.DateTimeField(db_column='LeaveTime', blank=True, null=
> True) # Field name made lowercase.
>
>  class Meta:
>  managed = True
>  db_table = 'ConferenceCall2'
>
>
> I called makemigrations and then migrate and everything looks fine.
>
> However, when I run a query like Calls.objects.all() the result is: []. 
>
> Or when I tried Calls..objects.count() the result was: 0. The MySQL database 
> is not empty, but apparently Django ORM believes that it is.
>
> Am I missing something?
>
>

-- 
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/b283f4f1-b9ce-4c4e-84bc-b1d2be376931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django query returns nothing for legacy databse

2016-06-09 Thread Galil
Hello,

I am using two databses for my Django app and one of them is an existing 
MySQL database: 

DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR, 'users.sqlite3'),
 },
 'calls': {
 'ENGINE': 'django.db.backends.mysql',
 'NAME': 'portal2',
 'USER': 'cdraccess',
 'PASSWORD': '**',
 'HOST': '[MY_HOST]',
 },

}


I used inspectdb to create the models for the call and they look like:

class Calls(models.Model):
 callid = models.AutoField(db_column='CallID', primary_key=True) # Field 
name made lowercase.
 conferencename = models.CharField(db_column='ConferenceName', max_length=
200) # Field name made lowercase.
 jointime = models.DateTimeField(db_column='JoinTime') # Field name made 
lowercase.
 leavetime = models.DateTimeField(db_column='LeaveTime', blank=True, null=
True) # Field name made lowercase.

 class Meta:
 managed = True
 db_table = 'ConferenceCall2'


I called makemigrations and then migrate and everything looks fine.

However, when I run a query like Calls.objects.all() the result is: []. 

Or when I tried Calls..objects.count() the result was: 0. The MySQL database is 
not empty, but apparently Django ORM believes that it is.

Am I missing something?

-- 
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/c7052a27-e3ac-41fa-90a1-a1c266cd1c71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Custom Database Connector Based on psycopg2 for External Postgres DB

2016-06-09 Thread Brandon
Hi! I am attempting to create my own database connector for Django for an 
external PostgreSQL DB that I have running. For this application, I issue 
the SQL queries and get responses over a REST API, so in theory, I'd like 
to adopt what already exists in the Postgres connector 
(django.db.backends.postgresql_psycopg2 I believe). Ideally, my hope is 
that I'd just override the psycopg2 call to the Postgres DB with my own 
call to my REST API, since the SQL query is the same. But I'm having 
trouble figuring out where this can go and if it can be this simple. Any 
help or advice would be much appreciated, thanks in advance!

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


Design an encrypted time-limited API on Client/Server side

2016-06-09 Thread Philip Lee


I am planning design an encrypted time-limited API on both Client and 
Server sides, the server side is written in Django, the client side is a 
GUI program which call the API by

import requests
c = requests.post("http://127.0.0.1:8000/VideoParser/;, data={'videoUrl': 
videoUrl })

The way it call the API is desperately exposed to those who can use network 
traffic capturing tools like wireshark and fiddler, while I don't want 
anyone else could call the API with their customized videoUrl, and if 
people made the post call with the same parameters 2 minutes later after 
the client initially made the call, the call should be valid or expired, so 
how to design the encrypted time-limited API on both Client and Server side 
in this case ?
--

P.S. I think add an identifier to the post data could prevent them using 
the API

import requests
c = requests.post("http://127.0.0.1:8000/VideoParser/;, data={'videoUrl': 
videoUrl, 'identifier':value_of_identifier })

provided there is something encrypted in the value_of_identifier and it 
changes with each call, but I don't know how to get started, any idea ?

It would be better to show some code , I really don't know how to start to 
write code.

-- 
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/c90bd293-f44a-4916-bffa-1fae0663ed0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Tinymce to Admin

2016-06-09 Thread jorrit787
Have you looked at https://github.com/aljosa/django-tinymce ?

-- 
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/363caf31-2a40-4520-b53e-a2c21511bac6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Where is this warning coming from?

2016-06-09 Thread jorrit787
I have a view that calculates some quick statistics:

def index(request):
context = {
'topics_unanswered': Topic.on_site.filter(topic_type=1, 
date_published__isnull=False, reply__isnull=True).count(),
'members_unapproved': 
User.objects.filter(profile__is_approved=False).count(),
'members_unverified_7days': 
User.objects.filter(profile__is_approved=False, 
date_joined__lte=timezone.now()-timezone.timedelta(days=7), 
profile__email_verified=False).count(),
'topics_today': 
Topic.on_site.filter(date_published__gte=timezone.now().date()).count(),
'replies_today': 
Reply.on_site.filter(date_published__gte=timezone.now().date()).count(),
'members_today': 
User.objects.filter(date_joined__gte=timezone.now().date()).count(),
}
return render(request, 'admincp/index.html', context)


But when I open the page I get the following warnings:

...\lib\site-packages\django\db\models\fields\__init__.
py:1393: RuntimeWarning: DateTimeField Topic.date_published received a 
naive dat
etime (2016-06-09 00:00:00) while time zone support is active.
  RuntimeWarning)

...\lib\site-packages\django\db\models\fields\__init__.
py:1393: RuntimeWarning: DateTimeField Reply.date_published received a 
naive dat
etime (2016-06-09 00:00:00) while time zone support is active.
  RuntimeWarning)

...\lib\site-packages\django\db\models\fields\__init__.
py:1393: RuntimeWarning: DateTimeField User.date_joined received a naive 
datetim
e (2016-06-09 00:00:00) while time zone support is active.
  RuntimeWarning)

[09/Jun/2016 13:38:09] "GET /admincp/ HTTP/1.1" 200 14002

I'm using timezone(), so why am I getting these warnings?

Thanks for the help!

-- 
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/67c3251d-1785-4393-a905-1a787a2476d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding Tinymce to Admin

2016-06-09 Thread ludovic coues
I'm pretty sure you can specify a widget to use in admin for each model and
field.

Part 7 of the tutorial will show you how to alter the admin without
changing the file in the virtualenv.
The documentation on ModelAdmin have an example of what you are trying to
do :)

+33614874342
On 8 Jun 2016 6:56 p.m., "Ankush Thakur"  wrote:

> I wish to add TinyMCE editor to my Django-powered app. My Model is a
> typical blog model, with a TextField for the actual post contents. Now what
> I want is, every time I'm editing the contents (or adding a new blog), I
> should be able to write in a WordPress-style editor.
>
> I understand that I'd need to add some third-party app for TinyMCE and
> then set it as a widget, but my problem is that the admin templates do not
> reside in my project Git repository. They are in the virtualenv directory,
> and I'm not sure how I'll be able to integrate them into my project.
>
> A little voice at the back of my head tells me that I won't need to alter
> Admin, but I'm not sure. Because I don't have any forms (I directly
> edit/create from the Admin), I don't think I can get away with only saying
> something like 'content = models.TextField(widget='tinymce')'?
>
> Regards,
> Ankush Thakur
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+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/CALX%3DrKLBResPR-n8SCibpckFAN5PwhHWSH5xBgEnmPaGLUvsrw%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/CAEuG%2BTbDaS1dWsZFxaHpecMRL6BW_jHLZd_6N8_isnceyVUdSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.