Re: how to use view function in another function of view in django

2016-06-16 Thread 'Abraham Varricatt' via Django users
I'm going to go out and make a random guess that when you say "use a view inside another view" with respect to the code you posted, you want all calls to index() or list() to render the base view. In that case just use return. i.e. def index(request): return base(request) Yours, Abraham V.

Re: TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread 'Abraham Varricatt' via Django users
Not sure what the issue is without more info about the error, but is the regular expression for that view correct? Assuming that you want to divert folks to the root of your site can you try the following? url(r'^/$', views.dashboard, name = 'dashboard') NOTE: if the error still persists, it

Re: Hi, i'm new to django i need some mini project which contain atleast 4 page for go through how it works

2016-08-31 Thread 'Abraham Varricatt' via Django users
This might be silly to ask but - can we assume you've completed the django tutorial? On Monday, 29 August 2016 16:56:33 UTC+5:30, rajeshkmr9583 wrote: > > Hi, > > i'm new to Django i need some mini project which contain at least 4 > page for go through how it works.. > > Thanks > -- You

Re: Getting Start Django

2016-08-31 Thread 'Abraham Varricatt' via Django users
It's nice that you are on Ubuntu. :) Here is a quick and dirty way to get up to speed, (going to assume you will use python3) # Installing virtualenv globally $ sudo apt-get update $ sudo apt-get install python3-pip $ sudo pip3 install virtualenv Once you have that done, navigate to an empty

Re: Custom Template Tag

2016-09-15 Thread 'Abraham Varricatt' via Django users
The idea of doing a POST request during template rendering seems weird. As others have mentioned - that's not the place for it. But perhaps you issue could be a matter of performing your POST operation on the client side, instead of the django server? In that case, it might be worth

Package a virtualenv to deploy across multiple systems?

2016-09-21 Thread 'Abraham Varricatt' via Django users
Hello, Do we have any standard/recommended way to distribute the python virtualenv used in a django application across multiple servers? I'm able to write a provisioning script to do the following on a server, (for brevity, this is just a high-overview) * Clone the master branch of my django

Re: Drawback of delete all migrations file

2016-12-09 Thread 'Abraham Varricatt' via Django users
Hello Sylvain, I think you have two concerns here, On Friday, December 9, 2016 at 1:39:50 PM UTC-5, Sylvain Dégué wrote: > SO im thinking about reset completly my production database and remove all > the migrations to start fresh. I dont have much data in the production > database so its

Re: Filling out a form using a json file

2016-12-12 Thread 'Abraham Varricatt' via Django users
Hello Jochen, On Monday, December 12, 2016 at 9:17:11 AM UTC-5, joche...@gmail.com wrote: > > > for editing Objects, but it seems that those views can only deal with > objects that already are in the database. So is there a more > idiomatic way to solve this or am I stuck with the above

Re: Is it possible to swap 1.8 and 1.10/1.11 Admin static files

2017-05-30 Thread 'Abraham Varricatt' via Django users
How ... did you impose our will on this user? ;) I'd like to hear more ... for peaceful research purposes, of course. -Abraham V. On Monday, May 29, 2017 at 9:19:01 PM UTC-4, Mike Dewhirst wrote: > > Cancel this question. We will force the user to comply with our reality. > > Cheers > > Mike

Re: ANN: django-admin-tools 0.8.1 released

2017-05-30 Thread 'Abraham Varricatt' via Django users
By chance do you have any screenshots in your documentation? -Abraham V. On Tuesday, May 30, 2017 at 8:39:54 AM UTC-4, izi wrote: > > Hello, > > We are happy to announce the availability of the version 0.8.1 of > django-admin-tools: > https://pypi.python.org/pypi/django-admin-tools/0.8.1 >

Re: uWSGI ModuleNotFoundError Django 1.11

2017-06-02 Thread 'Abraham Varricatt' via Django users
Consider thinking of the problem this way - you are trying to tell uwsgi to run a django project located within a certain directory using a virtualenv located in another directory. What James is asking is, if you have checked that the virtualenv you are using has all the dependencies to run

count from multiple tables in a single query?

2017-05-31 Thread 'Abraham Varricatt' via Django users
Hello, Is it possible to get the count of entries from multiple tables in a single query call? I'm looking at the official docs on aggregation and I can't find anything. For example assume I have the following 2 tables, class Author(models.Model): name = models.CharField(max_length=100)

Re: User has no dcf_profile : RelatedObjectDoesNotExist

2017-06-16 Thread 'Abraham Varricatt' via Django users
On Friday, June 16, 2017 at 7:06:33 AM UTC-4, Nabil BOUDERBALA wrote: > > After extending an existing user model, I get RelatedObjectDoesNotExist > exception with a value User has no dcf_profile. I seems that dcf_profile > isn't created automatically for each user. > It took me awhile to

Re: Images are not displaying

2017-06-16 Thread 'Abraham Varricatt' via Django users
If this is a production deployment, you probably need to run collectstatic and test if static files are being served correctly - more a deployment issue than a django matter. But, if you are testing with 'runserver' on a development system ... without exact knowledge of your folder structure,

Re: Link to download

2017-05-05 Thread 'Abraham Varricatt' via Django users
That's an interesting project! If I use WhiteNoise as part of a production deploy somewhere, can I skip (or ignore) running 'manage.py collectstatic' ? Yours, Abraham V. On Wednesday, 3 May 2017 15:13:36 UTC-4, Dan Tagg wrote: > > You might want to check out WhiteNoise ( >

Re: about tutorial "app reusable section" issue

2017-05-01 Thread 'Abraham Varricatt' via Django users
Hello Xuanbei, You are most likely getting that erro because you still have 'polls' mentioned inside INSTALLED_APPS within your settings.py file. On a different note, can you link to the tutorial you are following? I don't recall the official django tutorial instructing to install polls via

Re: count from multiple tables in a single query?

2017-05-31 Thread 'Abraham Varricatt' via Django users
regate function. > > If the models are unrelated, then I’m fairly certain that you can only use > separate queries to get your results. > > > > > > *From:* 'Abraham Varricatt' via Django users [mailto: > django...@googlegroups.com ] > *Sent:* Wednesday, May 31, 2017 2:14