manage.py not able to run any commands

2019-12-17 Thread Phil Yang
Hi, All of a sudden, when I tried to run manage.py runserver, it didn't produce any output, and it didn't do anything. In fact, the manage.py script seems to not be able to run other commands, such as startapp or createsuperuser. I've already used the command many times prior, and it has

manage.py can't run any commands

2019-12-17 Thread Phil Yang
Hi, The manage.py script for all my projects has suddenly stopped working. It can't run any commands, such as runserver or startapp. Python is installed correctly; I have tested this with other scripts. I deleted Django and reinstalled, the problem still persists. Basically, whenever I run

Re: Reach the server

2019-07-16 Thread CHENXIN YANG
:48 PM mohammed habib wrote: > You also need to make sure that your port 8000 from the guest virtualbox > maps to port 8000 on your host virtualbox > > Sent from my iPhone > > On 15 Jul 2019, at 23:34, CHENXIN YANG wrote: > > I created the new Django project on a vagran

Reach the server

2019-07-15 Thread CHENXIN YANG
I created the new Django project on a vagrant virtual box, but I had trouble reaching the server at http://127.0.0.1:8000/ after running the server. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Data Level Access Control

2019-05-22 Thread Yang Luo
Hi datta, You can try PyCasbin: https://github.com/pycasbin/django-casbin On Wednesday, January 6, 2010 at 4:55:12 AM UTC+8, datta wrote: > > Hi, > > Is there a setting/module that helps me to achieve data level access > control in a web application. > > For example, if I have a sales app, the

ModuleNotFoundError: No module named 'models'

2017-05-29 Thread jinghui yang
ModuleNotFoundError: No module named 'models' How to fix this error? -- 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.

Re: How to configure client side SSL trusted CA certificate ?

2017-02-09 Thread Gang Yang
to set environment variables for > supervisord, uwsgi, apache mod_wsgi by Google Search > <https://www.google.com/search?q=site:stackoverflow.com%20set%20environment%20variable%20wsgi%20python> > . > > I hope it helps solve your problem. > > On Thu, Feb 9, 2017 a

Re: How to configure client side SSL trusted CA certificate ?

2017-02-08 Thread Gang Yang
.cert /tmp/custom-certs > cp ~/Download/bar.example.com.cert /tmp/custom-certsexport > REQUESTS_CA_BUNDLE='/tmp/custom-certs' > > > Relevant source code in requests library: > https://github.com/kennethreitz/requests/blob/v2.13.0/requests/sessions.py#L658-L662 > > > On T

How to configure client side SSL trusted CA certificate ?

2017-02-07 Thread Gang Yang
Hi, I'm pretty new to Django and encountered some client side SSL issue. I'm trying to use django-cas-ng (CAS client) to do CAS authentication and the CAS server is using a self-signed server certificate. After obtaining the service ticket (ST), django-cas-ng tried to verify the ST by calling

How to configure CA certificates for client side in Django?

2017-02-07 Thread Gang Yang
Hi, I'm pretty new to Django and encountered an SSL (client side) issue. I'm trying to use django-cas-ng (CAS client) for CAS authentication and my CAS server uses a self-signed server certificate for dev env. After obtaining the service ticket (ST), django-cas-ng tried to verify the ST and

related_name for two models which have same name but belong to different app

2016-11-28 Thread Xueguang Yang
Hi: I am a little confused about this section of django official docs: Be careful with related_name when you are using related_name in an abstract base class (only), part of > the name should contain

VariableDoesNotExist: Failed lookup for key

2015-12-17 Thread Yang Liu
python 2.7.11 and django 1.9 I run the code in "python manage.py shell" Django 1.9 In[2]: import django In[3]: from django.template import Template, Context In[4]: t = Template("{% if x and x.strip %}OK{% else %}Empty{% endif %}") In[5]: t.render(Context({})) 2015-12-17 14:13:43,443

Is django-nonrel still updating, or will be part of future django

2015-11-19 Thread Alex Yang
Is django-nonrel still updating, or will be part of future django What is most used framework when django is used with MongoDB. Thanks! -Alex -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Why sqlite time is different from my settings.py TIME_ZONE?

2015-06-02 Thread Hyunseo Yang
I'm using Sqlite for my project database. I need date and time in my model so i'm using this field. date = models.DateTimeField() On the result template (results.html), the time is correct (localtime or TIME_ZONE in my settings.py) The problem is, when i check the database on Django admin

An FieldDoesNotExist happen when I use migrate

2015-05-19 Thread Zhong Yang
Hi everyone, I'm a new user, please help me if you have time, I'm very appreciate. My Django version is 1.8.0 I have User model it has friends list which is many to many type, the code like this: friends = models.ManyToManyField("self") When I use command migrate to update database, the

Could SelectDateWidget show chinese?

2014-01-17 Thread forrest yang
Just try to use django in a chinese web site. Is that possilbe to make SelectDateWidget show chinese month name? or is there any other workaround? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

source code of the Django Tutorial?

2013-10-21 Thread Yang Yang
mplete set of source files showing the complete 6 tutorials? thanks! yang -- 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+unsubsc

Re: Django throws an exception when I add data from admin interface

2013-07-29 Thread Yu Yang
Thanks for your reply, you are right. On Saturday, July 27, 2013 12:21:07 AM UTC+8, Tom Evans wrote: > > On Fri, Jul 26, 2013 at 4:22 PM, Yu Yang <yy20...@gmail.com > > wrote: > > It is a blog app, I have created a Article model and Tag model. when I > add > &

Django throws an exception when I add data from admin interface

2013-07-26 Thread Yu Yang
It is a blog app, I have created a Article model and Tag model. when I add data to Article table from Admin interface, the data is stored to database, but if I click the link to change the entry, it throws an exception "string indices must be integers, not str", the traceback is as follows:

Re: how to change the root url of a project?

2013-06-26 Thread yang guang
Thank you, Jani! What you said is exactly what I want to know. I didn't distinguish the dev environment and product environment. And I have fixed it now. Guang 在 2013年6月26日星期三UTC+8下午8时07分39秒,Jani Tiainen写道: > > On Wed, 26 Jun 2013 04:40:26 -0700 (PDT) > yang guang <yg5...@gmail

how to change the root url of a project?

2013-06-26 Thread yang guang
HI, all I'm a beginner of django. Here I start a project named mysite. And I can browse it with http://127.0.0.1:8000. But now I want to change it to http://127.0.0.1:8000/mysite/ and stll keep my url mapping as url(r'^$', 'index') instead of (r'^mysite/$', 'index'). Because there are some

Re: Best practice of subclassing default/3rd part apps?

2012-10-06 Thread Xun Yang
ory > needs to be, and typically will be, earlier on sys.path than > site-packages or (yuck) dist-packages.) > > Installing upgrades to other packages CAN (but usually doesn't) break > any of these approaches, requiring you to track down the interaction > and edit your copy. > >

Best practice of subclassing default/3rd part apps?

2012-10-04 Thread Xun Yang
Quite often I have to make small changes to the original code when I'm using default/3rd part apps. Take an example of setting constrains for password, the default SetPasswordForm in django.contrib.auth.forms and RegistrationForm in django-registration don't have any. So I have to subclass

Re: 利用django能执行本地命令不?

2012-09-10 Thread Dongqing Yang
于 2012/9/10 19:12, littlefivegogogo 写道: > 我在做一个系统,想在服务器端可以执行一些操作,比如分析文件(这些有另外 > 的程序实现了),但是我需要先执行一个 dos命令(分析程序提供的接口),请 > 问这有没有什么办法实现?用cgi吗? -- Try to describe your problem in English that will let most people here to help u. >From my opinion, using dos command is not Django supposed to be dealed

Re: Is there are some id obfuscate libs in django?

2012-05-29 Thread forrest yang
et_object_or_404(Foo, >uuid=self.kwargs['uuid'], >token=self.kwargs['token']) > return object > > --- > > > Brian Schott > bfsch...@gmail.com > > > > On May 27, 2012, at 11:14 AM, Marcin Tu

Is there are some id obfuscate libs in django?

2012-05-27 Thread forrest yang
Just try to convert the increasing numeric id in the database to some other obfuscated id. The lib need to support long type integer range conversion and convert in two directions. Is there are some id obfuscate libs in django or widely used in django community? Any one knows that? Thanks

Re: How can I program multiple drop-down menus at one time by Django?

2010-07-19 Thread Boyle Yang
Thanks very much! This is solved by SelectDateWidget. Boyle Yang 2010/7/19 vjimw <im.a.machobea...@gmail.com> > I think you would want to make a custom widget for the birthday field > in your model. > > http://docs.djangoproject.com/en/dev/ref/forms/widgets/#customizing-widget

How can I program multiple drop-down menus at one time by Django?

2010-07-19 Thread Boyle Yang
Hello list, I am a new Djangoer. I am trying to program three drop-down menus in form of Django like the attachment at one time . How can I do? Thanks very much! Boyle Yang -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Filtering by the intermediary table using the GET parameters

2010-02-02 Thread Woongcheol Yang
Let's say your model looks like the following: class Standard(models.Model): class Product(models.Model): has_standard = models.ManyToManyField(Standard, through="ProductStandard") class ProductStandard(models.Model): standard = models.ForeignKey(Standard) product =

Show field labels instead of names in form error lists

2009-11-26 Thread Yang Zhang
What's the easiest way to have error lists describe fields using their labels instead of their names? Thanks in advance. -- Yang Zhang http://www.mit.edu/~y_z/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: how to import variable from view to form

2009-05-15 Thread Yang ChengFu
ices = user_choices_list > > email = forms.ChoiceField() > > in view: > def contact(request): > variable_from_views=get_list_from_ldap(user_input_variable) > form = ContactForm(variable_from_views) > return render_to_response('contact_form.html', {'form': form}) >

Re: how to import variable from view to form

2009-05-15 Thread Yang ChengFu
Anybody can help me out! Thanks! --- Yang a écrit : > Hello, > > I'd like to import the variables from view to form, but after trying > several ways, I failed. > > For example: user01 inputs his username/password(apache > authentication) to login, then based on th

how to import variable from view to form

2009-05-14 Thread Yang
Hello, I'd like to import the variables from view to form, but after trying several ways, I failed. For example: user01 inputs his username/password(apache authentication) to login, then based on this username, function, get_list_from_ldap, will get a relative list from LDAP. Different username

Re: Variables between Form and views

2009-05-13 Thread Yang
...) > > ~Jakob > > On 13 Maj, 08:51, Yang <chengfu.y...@gameloft.com> wrote: > > > Hi guys, > > > I am a beginner of Django, a problem has been unsolved for a long > > time, can you help me. > > > I have a file forms.py: > >

Variables between Form and views

2009-05-13 Thread Yang
Hi guys, I am a beginner of Django, a problem has been unsolved for a long time, can you help me. I have a file forms.py: from django import forms from views import dllist_choice class DLForm(forms.Form): distribution_list=forms.ChoiceField

Re: how to create some application variable for django

2009-04-17 Thread forrest yang
could any one provide some tips On Apr 17, 6:02 pm, forrest yang <gforrest.y...@gmail.com> wrote: > session would be created esaily, but could django create some > application variable like asp.net , or provide some special function > for the different period of server,

how to create some application variable for django

2009-04-17 Thread forrest yang
session would be created esaily, but could django create some application variable like asp.net , or provide some special function for the different period of server, on_server_start() on_application_start() or something like that? --~--~-~--~~~---~--~~ You