Re: Inserting image alongwith text in django's TextField

2013-12-23 Thread Vijay Shanker
Thanks Mrinmoy. using redactor instead.


On Mon, Dec 23, 2013 at 3:17 PM, Mrinmoy Das wrote:

> Hi Vijay,
>
> Use something which allows you to do that.
>
> There are a bunch of tools available
>
> https://www.djangopackages.com/grids/g/wysiwyg/
>
>
> Mrinmoy Das
> http://goromlagche.in/
>
>
> On Mon, Dec 23, 2013 at 3:11 PM, vijay shanker  wrote:
>
>> Hi
>> I am trying to insert images in between of text (basically an article
>> with images interspersed in between) with django's TextField so that i can
>> add and position the image in the TextField box in admin.I tried tinymce's
>> tinymce_models.HTMLField() for body field of my Article model but it did
>> not have any option to insert image in between of article object.How can i
>> accomplish it ?
>> Regards
>> Vijay
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/86aee995-aaa1-4f03-8980-99c09e2e61c9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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/dnLNrwxz9v8/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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFWA-MPkGBiDUeCNK-wXde03cNaZu5X5XD9zvk12coDOCHO27A%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Fwd: Merry Christmas & a Happy New Year

2013-12-23 Thread Sijo James John
Wishing you and your family a Merry Christmas and a Happy New Year.







-- 
Sijo James John

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


Re: ViewDoesNotExist at /admin/

2013-12-23 Thread Gabriele Stoia
I think I found the problem...maybe...

I running my app in the same hosting of another app ... (sorry for my 
english..is not my first language... I'm italian...)

I have







*-- first app-- feincms-- other module-- ...--second app-- -- feincms-- -- 
other module*

Maybe my second-app is using feincms of the first app which is different 
version.
I think this because I got this error :

No module named filterspecs
/home/*alessandrocambogia*/feincms/admin/filterspecs.py in , line 7

where *alessandrocambogia *is the first-app.

I need to have 
/home/alessandrocambogia/*gabryandjenny*/feincms

where *gabryandjenny * is the second-app

but actually I don't know how to change the path... Is my first experience in 
Django.
Can you help in this  Please ??? 
Thank you in advance.

Gabri




Il giorno martedì 24 dicembre 2013 07:45:02 UTC+7, Russell Keith-Magee ha 
scritto:
>
>
> On Mon, Dec 23, 2013 at 10:53 AM, Gabriele Stoia 
>  > wrote:
>
>> Hi Russel,
>>
>> thank you for your e-mail !!!
>> I thought that something was connected with MPTT or FeinCMS... I'll try 
>> to work out !
>> What I really don't understand why so many problem when you in deployment 
>> ??? In local everything was super fine !!!
>>
>
> If you're having "deployment only" problems, this points to a problem with 
> the way your development process is organised. These sorts of problems only 
> emerge because your development environment is fundamentally different to 
> your production environment -- for example, different versions of software, 
> different paths. If you make good use of virtualenv to isolate your 
> project, and use requirements files to ensure version compatibility, you 
> should be able to minimise this sort of problem.
>
> Yours,
> Russ Magee %-)
>

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


Re: I can't figure out the django qeryset for retriving a value from a field by a condition

2013-12-23 Thread Russell Keith-Magee
Hi Ali,

The syntax you're looking for is:

MyModel.objects.filter(mobile_name='xyz')

The Django tutorial provides a good explanation of the sorts of features
that are available in Django ORM queries.

Yours,
Russ Magee %-)



On Tue, Dec 24, 2013 at 8:27 AM, Ali Hayder  wrote:

> HI,
> My model like this
>
>
>> *mobile_name = models.CharField("Mobile Name", max_length=50)*
> * opinion = models.CharField('Comments', max_length=2000)*
> * total = models.FloatField('Total Mark')*
>
> the sql qery should like this "SELECT total FROM tablexyz WHERE
> mobile_name=xyz"
>
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/faf3674f-c1c6-41f6-98c6-a01b12d5d6f9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: Parsing json.dumps to HighCharts in Django

2013-12-23 Thread Russell Keith-Magee
On Mon, Dec 23, 2013 at 2:11 PM, Filipe Ferminiano Rodrigues <
filipe.fermini...@gmail.com> wrote:

> This is my views.py
>
> def piechart(request):
> responses_pie =  
> AnswerRadio.objects.values("body").annotate(Count("id"))
> res = []
> for cat in responses_pie:
> res.append([
> cat["body"],
> cat["id__count"],
> ])
> return render(request, 'chart_code_v2.html', {'responses_pie_json': 
> json.dumps(res)})
>
> reponses_pie_json has 2 keys, body - string values - and id__cout -
> integer values. But, in template, I'm not getting how to input
> response_pie_json in data of HighCharts. I'm trying to use
>
> data: {{ responses_pie_json|safe }}
>
> But It just show a blank screen. What should i do?
>

If you're getting a completely blank screen, one of four things is
happening:

 * You're not hitting the view you think you are. That means your URL
definition isn't actually hitting the piechart view - it's matching
something else. If you're still in development, try dropping a print
statement into the top of the view, and make sure that the right view is
being invoked.

 * The template file is empty. If chart_code_v2.html is blank, then nothing
will be rendered.

 * You're not hitting the right template. Are you sure that you know
*which* chart_code_v2.html is being rendered? Again, try putting some dummy
text into your template and make sure that the file you're saving is the
file that is being found by the call to render().

 * The page is rendering HTML that contains nothing visible. For example,
if your template is *only* rendering a chart, but there's no data being
provided, it's possible that the rendered chart is blank. Use the "view
source" option of your browser to see if content is actually being
rendered; then you can work out if the problem is rendering the right
template, or if the problem is in the way you're driving your graphics
library.

Once you've worked out which of these is happening, you should be able to
sort out a fix fairly quickly.

Yours,
Russ Magee %-)

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


Re: ViewDoesNotExist at /admin/

2013-12-23 Thread Russell Keith-Magee
On Mon, Dec 23, 2013 at 10:53 AM, Gabriele Stoia wrote:

> Hi Russel,
>
> thank you for your e-mail !!!
> I thought that something was connected with MPTT or FeinCMS... I'll try to
> work out !
> What I really don't understand why so many problem when you in deployment
> ??? In local everything was super fine !!!
>

If you're having "deployment only" problems, this points to a problem with
the way your development process is organised. These sorts of problems only
emerge because your development environment is fundamentally different to
your production environment -- for example, different versions of software,
different paths. If you make good use of virtualenv to isolate your
project, and use requirements files to ensure version compatibility, you
should be able to minimise this sort of problem.

Yours,
Russ Magee %-)

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


I can't figure out the django qeryset for retriving a value from a field by a condition

2013-12-23 Thread Ali Hayder
HI, 
My model like this 
 

> *mobile_name = models.CharField("Mobile Name", max_length=50)*
* opinion = models.CharField('Comments', max_length=2000)*
* total = models.FloatField('Total Mark')*

the sql qery should like this "SELECT total FROM tablexyz WHERE 
mobile_name=xyz"

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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/faf3674f-c1c6-41f6-98c6-a01b12d5d6f9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Template Interactions & NoReverse Match Errors

2013-12-23 Thread Timothy W. Cook
SOLVED: by adding the cur_mgr ID to the get() kwargs.


On Mon, Dec 23, 2013 at 8:38 AM, Timothy W. Cook  wrote:

>
> (details below)
> I have a dashboard view and from there I want to perform various
> activities inside a portion of the page.
> So, I built a dashboard base template to reuse.  From the main index.html
> I call a view with the ID of the user
> (it is actually an internal role ID not the user id) which calls the
> dashboad that extends the dashboad base.
> However, now when I attempt to call one of these other views without using
> any parameters I get a NoReverse match error.
> For example, clicking on Add Project I get:
>
> NoReverseMatch at /papers/add_project/
> Reverse for 'mgr_dashboard' with arguments '()' and keyword arguments
> '{'pk': ''}' not found.
> 1 pattern(s) tried: ['mgr_dashboard/(?P\\d+)$']
>
> What is wrong with my design approach?  mgr_dashboard is being called from
> mgr_db_base.html without a parameter,
> even though it doesn't exist in add_project.html. It is already loaded.  I
> want to call some views with a cur_mgr.id and some without it.
> If I remove the tab (in mgr_db_base) for mgr_dashboard I get the same
> error for searchresult_list.html
>
> Thanks,
> Tim
>
> Code Details:
> mgr_db_base.html:
>  http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
> http://www.w3.org/1999/xhtml;>
>   {% load staticfiles i18n %}
> 
> SRE Manager Dashboard
> 
> 
> 
> 
> 
>
> {% block tabs %}
> 
>  alt="SRE Logo" />
> 
>  class="active">Projects
>  class="active">Search Results
>  class="active">Reviewer List
> 
> 
>  
> {% endblock tabs %}
>
> {% block content %}
> {% endblock content %}
> 
>  
> 
>
> mgr_dashboard.html:
> {% extends "mgr_db_base.html" %}
> {% load i18n %}
> {% load static from staticfiles %}
> {% block content %}
>
> {% block mgr_content %}
> {% block mgr_header %}
> 
> 
> Add
> Projects
> Add
> Results Files
> Add
> Reviewers
> 
> 
> 
> {% if trial %}
>Hello {{user.name}}
> Your FREE TRIAL Expires:  class="redfont">{{expires|date:"H:i Y-m-d"}}
> 
> {% else %}
>Hello {{user.name}}
> Your Current Subscription Expires:  class="redfont">{{expires|date:"H:i Y-m-d"}} 
> {% endif %}
> 
> 
> 
> 
> 
> 
>  />
> 
> 
> {% endblock mgr_header %}
> {% block mgr_details %}
> 
>  cellspacing="2">
> 
> Project Name
> Description
> 
> {% for p in projects %}
> 
> {{p.prj_name}}
> {{p.prj_descr}}
> 
>{% endfor %}
> 
> 
> {% endblock mgr_details %}
>
> {% block mgr_details2 %}
>
> {% endblock mgr_details2 %}
> 
> {% endblock %}
>
> 
>  {% endblock %}
>
>  add_project.html:
>  {% extends "mgr_db_base.html" %}
> {% load i18n %}
> {% load static from staticfiles %}
> {% block content %}
>
> {% block mgr_content %}
> {% block mgr_header %}
> 
> 
> 
> 
> 
>   Create a New Project
> 
> 
>
> 
> {% endblock mgr_header %}
> {% block mgr_details %}
> 
> {% if form.errors %}
>Invalid data. Please try
> again.
> {% endif %}
> 
>   {% csrf_token %}
>   {{ form.as_p }}
>   
> 
> 
> {% endblock mgr_details %}
>
> {% block mgr_details2 %}
>
> {% endblock mgr_details2 %}
> 
> {% endblock %}
>
> 
>  {% endblock %}
>
>
> papers/urls.py
> """The urls for the papers app."""
> from django.conf.urls import patterns, url
>
> from papers.views import *
>
> urlpatterns = patterns(
> '',
> url(
> r'^add_searchresult/$',
> SearchResultCreateView.as_view(),
> name='add_searchresult'
> ),
> url(
> r'^searchresult_list/(?P\d+)$',
> SearchResultListView.as_view(),
> name='searchresult_list'
> ),
>
> url(
> 

Re: How to deploy a django project in the web?

2013-12-23 Thread C. Kirby
You can read up about deploying django in the deployment section of the 
docs:

https://docs.djangoproject.com/en/1.6/howto/deployment/

On Friday, December 20, 2013 11:36:58 PM UTC-6, Pablo Diaz wrote:
>
> I've finished my django project but I'm only running it locally. I want to 
> put it on a website
>

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


Re: Django Site/Docs/Tutorials translation

2013-12-23 Thread Lucas Infante
Thanks, Fabio!

On Wednesday, December 18, 2013 6:45:44 PM UTC-2, Fabio Caritas Barrionuevo 
da Luz wrote:
>
> The translation project is hosted in Transifex.com [1][2]
>
> [1] https://www.transifex.com/projects/p/django-docs/language/pt_BR/
> [2] https://www.transifex.com/projects/p/django/language/pt_BR/members/
>
> Em segunda-feira, 16 de dezembro de 2013 09h20min40s UTC-3, Lucas Infante 
> escreveu:
>>
>> Hello guys!
>>
>> Sorry if my question is not being asked in the right place (I hope it is).
>>
>> I am interested in translating Django official site/docs/tutorials into 
>> brazilian portuguese. Does anyone know who would I have to contact (to get 
>> information on how to do this) or how could I be able to contribute to 
>> Django Project in that way?
>>
>> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/40d78ebf-bdc1-476e-a0f6-11486a299d18%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Should exceptions in dev server appear as tracebacks in the console by default?

2013-12-23 Thread hjwp
The docs say:


*"All messages reaching the django catch-all logger when DEBUG 
 is 
True are sent to the console. They are simply discarded (sent to 
NullHandler) when DEBUG 
 is 
False."*
https://docs.djangoproject.com/en/1.6/topics/logging/#django-s-default-logging-configuration

>From reading that, I would (naively?) expect to see tracebacks in the 
terminal I'm running manage.py runserver, if any of my views raise an 
exception for example. I don't see any, however.

Is this because the exception *is* caught, in that it gets intercepted and 
turned into the nice django debug page?  Am i misinterpreting the docs?  If 
so, would it be worth adding a couple of words of clarification in case 
anyone else might misread it like me?  Assuming anyone is that silly?

Of course, I would rather prefer it if exception tracebacks *did* go to the 
console by default, as well as to mail_admins and/or to a nice django debug 
page...

hp

PS minimal repro:

django-admin.py startproject myproj
python manage.py startapp myapp



*urls.py:*
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
# Examples:
url(r'^$', 'myapp.views.home', name='home'),
)


*myapp/views.py:*
def home(request):
raise Exception('arg')


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


Re: migrating DailyStockSelect.com to django

2013-12-23 Thread Javier Guerra Giraldez
On Mon, Dec 23, 2013 at 6:02 AM, d ss  wrote:
> best would be to provide me directly with the recommended tools to perform
> the following:


honestly, no matter how experienced you are in Python, if you're new
to Django, the best and fastest way to get you running is to do the
tutorial.

not only it does introduce you to Django as a library, but also to the
way that the different parts of it fit together.  and in the end, it
establishes some common language that makes it *much* easier to ask
for extra help here.

cheers,

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFkDaoQvwwAExJeRKJqcbSQ1w-UT_mO7Ko%2BC8mfQvHMJ5nY0wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


immigration to django

2013-12-23 Thread d ss
hey guys
i am an experienced user of python, have heard a lot of Django and would 
like to migrate my website that is a combination of html+CSS - generated 
automatically via python to django.
the URL is  DailyStockSelect.com
the home page consists of tables that are updated daily, the number of 
lines in the tables may vary
links in the top menu are static data...

best would be to provide me directly with the recommended tools to perform 
the following:

1- have styling templates in order to updating conveniently the design of 
the web app
2- set up the daily updating of all tables and charts from say a JSON file
3- set up user subscription to email notification (would there also be 
notification sent directly to international mobile numbers?)
4- user registration
5- integration with a payment gateway, for example authorize.net for 
instance.

many thanks guys in advance and hopefully soon i ll become an experienced 
django developer as well!
Samir

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


migrating DailyStockSelect.com to django

2013-12-23 Thread d ss
hey guys
i am an experienced user of python, have heard a lot of Django and would 
like to migrate my website that is a combination of html+CSS - generated 
automatically via python to django.
the URL is  DailyStockSelect.com
the home page consists of tables that are updated daily, the number of 
lines in the tables may vary
links in the top menu are static data...

best would be to provide me directly with the recommended tools to perform 
the following:

1- have styling templates in order to updating conveniently the design of 
the web app
2- set up the daily updating of all tables and charts from say a JSON file
3- set up user subscription to email notification (would there also be 
notification sent directly to international mobile numbers?)
4- user registration
5- establish the connection to 2checkout.com - payment gateway

many thanks guys in advance and hopefully soon i ll become an experienced 
django developer as well!
Samir

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


Re: Instant Hosting for Django-CMS...No Setup Needed...Demo Inside

2013-12-23 Thread Mark Moss
Thanks Tim for pointing the risks. 

By the way, the production VMs that are activated for actual customers have 
Debug=Off. Moreover, the demo VM is rebuilt every few hours to avoid any 
negative tweaking.

--
- Mark
*Instantly deploy Django-Cms with built-in 5 themes 
*

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


How to give facility to user to add django model field dynamically?

2013-12-23 Thread navnath gadakh


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


Re: python_2_unicode_compatible error

2013-12-23 Thread Mario Hari
I resolved it using the answer available @ 
http://stackoverflow.com/questions/20741754/python-2-unicode-compatible-error

Happy hacking,
mario23

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


Template Interactions & NoReverse Match Errors

2013-12-23 Thread Timothy W. Cook
(details below)
I have a dashboard view and from there I want to perform various activities
inside a portion of the page.
So, I built a dashboard base template to reuse.  From the main index.html I
call a view with the ID of the user
(it is actually an internal role ID not the user id) which calls the
dashboad that extends the dashboad base.
However, now when I attempt to call one of these other views without using
any parameters I get a NoReverse match error.
For example, clicking on Add Project I get:

NoReverseMatch at /papers/add_project/
Reverse for 'mgr_dashboard' with arguments '()' and keyword arguments
'{'pk': ''}' not found.
1 pattern(s) tried: ['mgr_dashboard/(?P\\d+)$']

What is wrong with my design approach?  mgr_dashboard is being called from
mgr_db_base.html without a parameter,
even though it doesn't exist in add_project.html. It is already loaded.  I
want to call some views with a cur_mgr.id and some without it.
If I remove the tab (in mgr_db_base) for mgr_dashboard I get the same error
for searchresult_list.html

Thanks,
Tim

Code Details:
mgr_db_base.html:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
http://www.w3.org/1999/xhtml;>
  {% load staticfiles i18n %}

SRE Manager Dashboard






{% block tabs %}



Projects
Search Results
Reviewer List


 
{% endblock tabs %}

{% block content %}
{% endblock content %}

 


mgr_dashboard.html:
{% extends "mgr_db_base.html" %}
{% load i18n %}
{% load static from staticfiles %}
{% block content %}

{% block mgr_content %}
{% block mgr_header %}


Add
Projects
Add
Results Files
Add
Reviewers



{% if trial %}
   Hello {{user.name}}
Your FREE TRIAL Expires: {{expires|date:"H:i Y-m-d"}}

{% else %}
   Hello {{user.name}}
Your Current Subscription Expires: {{expires|date:"H:i Y-m-d"}} 
{% endif %}









{% endblock mgr_header %}
{% block mgr_details %}



Project Name
Description

{% for p in projects %}

{{p.prj_name}}
{{p.prj_descr}}

   {% endfor %}


{% endblock mgr_details %}

{% block mgr_details2 %}

{% endblock mgr_details2 %}

{% endblock %}


 {% endblock %}

 add_project.html:
 {% extends "mgr_db_base.html" %}
{% load i18n %}
{% load static from staticfiles %}
{% block content %}

{% block mgr_content %}
{% block mgr_header %}





  Create a New Project




{% endblock mgr_header %}
{% block mgr_details %}

{% if form.errors %}
   Invalid data. Please try
again.
{% endif %}

  {% csrf_token %}
  {{ form.as_p }}
  


{% endblock mgr_details %}

{% block mgr_details2 %}

{% endblock mgr_details2 %}

{% endblock %}


 {% endblock %}


papers/urls.py
"""The urls for the papers app."""
from django.conf.urls import patterns, url

from papers.views import *

urlpatterns = patterns(
'',
url(
r'^add_searchresult/$',
SearchResultCreateView.as_view(),
name='add_searchresult'
),
url(
r'^searchresult_list/(?P\d+)$',
SearchResultListView.as_view(),
name='searchresult_list'
),

url(
r'^reviewers_list/(?P\d+)$',
ReviewersListView.as_view(),
name='reviewers_list'
),

url(
r'^searchresult_import/(?P\d+)$',
SearchResultImportView.as_view(),
name='searchresult_import'
),

url(
r'^papers_list/(?P\d+)$',
PapersListView.as_view(),
name='papers_list'
),

url(
r'^rvr_papers_list/(?P\d+)$',
RvrPapersListView.as_view(),
name='rvr_papers_list'
),

url(
r'^paper_details_mgr/(?P\d+)$',
PaperDetailsMgrView.as_view(),
name='paper_details_mgr'

Re: Instant Hosting for Django-CMS...No Setup Needed...Demo Inside

2013-12-23 Thread tim
You may want to read our documentation which warns of the security risks in 
deploying sites on the public internet with DEBUG=True.

https://docs.djangoproject.com/en/dev/ref/settings/#debug

On Saturday, December 21, 2013 6:37:11 AM UTC-5, Mark Moss wrote:
>
> Hi Frank,
>
> Debug is enabled intentionally since this is a demo machine.
>
> All themes are fine without any problem. You just need to change the 
> default theme from Admin side. To demonstrate it, I have now changed to 
> Hfree Software theme, which can be seen at -- http://198.154.98.107:8000/
>
> You will find the admin login info on this page -- 
> http://gigapros.com/portal/django-cms-hosting
>
> - Mark
>

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


python_2_unicode_compatible error

2013-12-23 Thread Mario Hari
I've "models.py" as follows,
#encoding: utf-8
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.timezone import now


# Create your models here.
@python_2_unicode_compatible
class Tag(models.Model):
name = models.CharField(max_length=50, unique=True)

class Meta:
verbose_name = 'tag'
verbose_name_plural = 'tags'
ordering = ['name']

def __str__(self):
return self.name
.  and so on

*when I ran* "python manage.py syncdb" this is the error I got. 

itman@itman:~/djangoApp/mysite$ python manage.py syncdb 
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 
443, in execute_from_command_line
utility.execute()
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 
382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", 
line 196, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", 
line 231, in execute
self.validate()
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", 
line 266, in validate
num_errors = get_validation_errors(s, app)
  File 
"/usr/lib/python2.7/dist-packages/django/core/management/validation.py", 
line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 
158, in get_app_errors
self._populate()
  File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 
67, in _populate
self.load_app(app_name)
  File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 
88, in load_app
models = import_module('.models', app_name)
  File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 
35, in import_module
__import__(name)
  File "/home/clrg/djangoApp/mysite/bmark/models.py", line 4, in 
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name python_2_unicode_compatible


don't know why the module is not imported. I'm using python 2.7 and django 
1.4. Any help would be of immense 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f3be54b7-81bc-4729-986f-656213ba9b1b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Inserting image alongwith text in django's TextField

2013-12-23 Thread Mrinmoy Das
Hi Vijay,

Use something which allows you to do that.

There are a bunch of tools available

https://www.djangopackages.com/grids/g/wysiwyg/


Mrinmoy Das
http://goromlagche.in/


On Mon, Dec 23, 2013 at 3:11 PM, vijay shanker  wrote:

> Hi
> I am trying to insert images in between of text (basically an article with
> images interspersed in between) with django's TextField so that i can add
> and position the image in the TextField box in admin.I tried tinymce's
> tinymce_models.HTMLField() for body field of my Article model but it did
> not have any option to insert image in between of article object.How can i
> accomplish it ?
> Regards
> Vijay
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/86aee995-aaa1-4f03-8980-99c09e2e61c9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Inserting image alongwith text in django's TextField

2013-12-23 Thread vijay shanker
Hi
I am trying to insert images in between of text (basically an article with 
images interspersed in between) with django's TextField so that i can add 
and position the image in the TextField box in admin.I tried tinymce's 
tinymce_models.HTMLField() for body field of my Article model but it did 
not have any option to insert image in between of article object.How can i 
accomplish it ?
Regards
Vijay

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