Re: Running Python3 code and placing results in a view

2016-01-03 Thread Daniel Roseman
On Sunday, 3 January 2016 23:37:50 UTC, Andrew Stringfield wrote: > > Hello all, > > I am interested in running the code of: > #!/usr/bin/python3 > from wifi import Cell, Scheme > ssid = [cell.ssid for cell in Cell.all('wlan0')] > print(ssids) > > > with a view in Django and the results

Re: 'CharField' object has no attribute 'model'

2015-12-26 Thread Daniel Roseman
On Saturday, 26 December 2015 06:34:02 UTC, Billu wrote: > > I'm trying to make a single choice quiz (i.e. Choose one from 4 options). > I'll populate the quiz (with 30 questions) depending upon what topic the > user chooses. I'm made some models and forms, but when I try to migrate it > says

Re: Can you remove a model's last field of SQLite3 in Django 1.8?

2015-11-29 Thread Daniel Roseman
On Sunday, 29 November 2015 17:17:54 UTC, KwangYoun Jung wrote: > > Can you remove a model's last field of SQLite3 in Django 1.8? > > I have a model that has only one column in SQLite3. > When I remove a last field of the model, I get an error like below > > > > *django.db.utils.OperationalError:

Re: how upload and display image on page using Django

2015-11-20 Thread Daniel Roseman
On Friday, 20 November 2015 19:45:31 UTC, Mayur Kakade wrote: > > I am new in Django I have some problem in django ... I am trying to upload > and display photo on page please help me > You do this by writing some code. -- DR. -- You received this message because you are subscribed to the

Re: Getting NoReverseMatch and can't find the mistake

2015-11-20 Thread Daniel Roseman
On Thursday, 19 November 2015 21:38:50 UTC, Bob Aalsma wrote: > > Umm, one of the things I've found difficult is to determine the logic in > the translation of the class names in models.py to other variables. > > And I'm sorry to have not included the models.py. This is the part of > ZoekVraag:

Re: Getting NoReverseMatch and can't find the mistake

2015-11-19 Thread Daniel Roseman
On Thursday, 19 November 2015 19:04:05 UTC, Bob Aalsma wrote: > > Really sorry Tom, I've been looking at your text and thinking about it for > most of today, but no penny dropping. > I'm rather unsure which bits go where, I'm trying to understand this by > rebuilding the tutorial. > > I can't

Re: Error: The response content must be rendered before it can be accessed.

2015-11-04 Thread Daniel Roseman
On Wednesday, 4 November 2015 20:51:53 UTC, sonu kumar wrote: > > class based views are as below > > class TagList(TemplateView): > > def get_context_data(self, **kwargs): > > ... > > qlist = QueList.as_view()(self.request, **kwargs) > print qlist > > ... >

Re: Need example view on how to react on a webhook in Django

2015-10-18 Thread Daniel Roseman
On Friday, 16 October 2015 15:24:21 UTC+1, Sabine Maennel wrote: > > Hello, > > I tried to followed this Tutorial from Go Django, but I do not get it to > work. Can you please help me on how to react on a webhook in my application. > > *This is the tutorial,* that I tried to follow: >

formset concurrency control

2015-10-08 Thread Daniel Roseman
Can you explain further why you think the pk is not sufficient? Ordering by name, or adding and removing entities, does not change the pk of other entities; indeed that's the whole point of a pk. What exactly are you concerned about? -- DR. -- You received this message because you are

Re: Fetching data in Django project

2015-10-07 Thread Daniel Roseman
On Wednesday, 7 October 2015 18:19:30 UTC+1, Bhanu Kathuria wrote: > > By scrapping I have collected database from other website. How can I show > it in my Django project. > With a URL, a view, and optionally a template. Just like any other data. -- DR. -- You received this message because

Re: Crente usar o django 1.3

2015-09-26 Thread Daniel Roseman
On Saturday, 26 September 2015 12:29:24 UTC+1, Carlos Andre wrote: > > Hi to all, i want creat a new user in any time without admin interface, i > dont know use the functions from User modules. > Thanks to help > Then you should read the documentation, or the code. And you should upgrade your

Re: http://stackoverflow.com/questions/32549006/how-to-automatically-save-the-headline-for-every-new-article-provided-my-3rd-par

2015-09-14 Thread Daniel Roseman
On Monday, 14 September 2015 08:35:42 UTC+1, n00b wrote: > > > http://stackoverflow.com/questions/32549006/how-to-automatically-save-the-headline-for-every-new-article-provided-my-3rd-par > Yes, that is a link. Congratulations. -- DR. -- You received this message because you are subscribed to

Re: DRF API deployment

2015-09-03 Thread Daniel Roseman
On Thursday, 3 September 2015 11:00:22 UTC+1, Prashant wrote: > > Hi guys, > > I've just created an api from drf generator which is working fine on > localhost, it is a web service for an android app. Now I've to deploy it on > a server with IP 12.112.23.54 (ip is false) with an id and password.

Re: display readonly or not

2015-08-11 Thread Daniel Roseman
On Tuesday, 11 August 2015 06:24:32 UTC+1, Mike Dewhirst wrote: > There is a get_read_only() method in the admin.ModelAdmin class. It > normally returns self.readonly_fields but you can give it a callable. > > >

Re: Foreign key in a ModelForm

2015-08-09 Thread Daniel Roseman
On Saturday, 8 August 2015 12:58:59 UTC+1, durir...@gmail.com wrote: > > I searched in the web for some example of setting a FK in a ModelForm > (bound and unbound), but the examples I founded didn't worked for me. The > best thing I think I've is this: > > *forms.py* > > > > > > > > > *class

Re: Passing parameters / attributes to javascript in a template

2015-08-04 Thread Daniel Roseman
On Tuesday, 4 August 2015 17:32:11 UTC+1, Alex Heyden wrote: > > I don't quite follow what you're doing with set_first_call_true and > set_first_call_false. Are you using that to control the for loop behavior? > > If you are, take a look at >

Re: How extract from list with BooleanVar objects each object

2015-07-25 Thread Daniel Roseman
On Saturday, 25 July 2015 17:04:50 UTC+1, Dariusz Mysior wrote: > > I want from list (1) with BoolenVar objects (2) extract this objects in > "from" loop (3)...How can I do it... > > def createCheckButton(self): > y=3 > for x in range(self.lp): > self.chooseButton=BooleanVar()

Re: Grouping lists in a template

2015-07-13 Thread Daniel Roseman
On Monday, 13 July 2015 01:50:11 UTC+1, Andrea wrote: > > Hello. I'm new to both django and python. Been trying to figure out how to > group items from a model for hours now. > > This in an example code i made up to illustrate my problem: > # Models > class Book(models.Model): >

Re: Recommend guide to setting up a production server with Django and Python 3

2015-07-10 Thread Daniel Roseman
On Friday, 10 July 2015 12:42:32 UTC+1, Christian Kleineidam wrote: > > Is there a recommended guide to set up a new Django enviroment with Python > 3? > It seems like the official guide on https://docs.djangoproject.com/en/1.8/ > tells me to use a decidated server instead of letting django run

Re: Access dynamic session variable name in template

2015-07-02 Thread Daniel Roseman
On Thursday, 2 July 2015 19:09:59 UTC+1, jorr...@gmail.com wrote: > > Hi everyone, > > I am trying to keep track of who has voted on a comment by setting session > variables like 'commentvote1', 'commentvote2', etc to True. These variable > names are dynamically generated based on the id of the

Re: comment and uncomments in django html template

2015-06-20 Thread Daniel Roseman
On Friday, 19 June 2015 17:48:41 UTC+1, Sindhujit Ganguly wrote: > > This does not work for javascript defined inside html templates.. This is > for html structures.. I needed for multiple line comments in js scripts. > >> >>

Re: calling a view from a view doesnt clear the URL path

2015-05-29 Thread Daniel Roseman
You can redirect with whatever arguments you want, as long as the receiving URL accepts them. -- 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

calling a view from a view doesnt clear the URL path

2015-05-29 Thread Daniel Roseman
Why should it? The browser requested the original view, and the code returned a response to that request. The browser doesn't know or care that the process of constructing that response involved calling another view function. If you want to change the URL, instead of returning the result of

Re: How can this error be corrected?

2015-05-23 Thread Daniel Roseman
On Saturday, 23 May 2015 18:09:31 UTC+1, Preeti wrote: > > > ImportError: No module named 'django.contrib.staticfilesdjango' > > You're missing a comma after the 'staticfiles' entry in INSTALLED_APPS. -- DR. -- You received this message because you are subscribed to the Google Groups "Django

Re: Which is the best tutorial to learn django, djangobook.com or djangoproject.com?

2015-05-23 Thread Daniel Roseman
On Saturday, 23 May 2015 18:17:15 UTC+1, Preeti wrote: > > Which is the best tutorial to learn django, djangobook.com or > djangoproject.com? > Why do you even need to ask that question, given the large bold warning on the front page of the Django book site? -- DR. -- You received this

Re: Django 1.8 and MySQL, how to connect??

2015-05-20 Thread Daniel Roseman
On Wednesday, 20 May 2015 16:05:17 UTC+1, eduardo.c...@gmail.com wrote: > > Hi, I never used Django with MySQL data base before. Someone can tellme > how I can (if it's possible) connect my Django web site with a data base in > MySQL. I tryed to install "mysqlclient-1.3.6-cp27-none-win32.whl"

Re: Help with templating and databases.

2015-05-10 Thread Daniel Roseman
On Sunday, 10 May 2015 13:49:44 UTC+1, Reznov Ammar wrote: > > Hi guys :), > > I have a question about flask and databases in django. > There is nothing in this question related to Django. Why are you asking about Flask on a Django group? -- DR. -- You received this message because you are

Re: NoReverseMatch at /polls/1/results/

2015-05-09 Thread Daniel Roseman
On Saturday, 9 May 2015 05:05:00 UTC+1, James Schneider wrote: > > I agree that the typo is also an issue and should be fixed, but that > wouldn't result in the OP's error, since reverse() is complaining about a > 'detail' URL specifically. The typo would result in a similar error when > the

Re: Upload above apache web root?

2015-04-07 Thread Daniel Roseman
On Monday, 6 April 2015 22:38:36 UTC+1, Stephanie Socias wrote: > > I've implemented this same solution (using custom file storage and the > "upload_to" parameter) but now cannot get the uploaded files to display > from my template. I would normally use {{ STATIC_URL }} but, since I've now >

Re: FK relations hell : help with `_set` feature

2015-03-30 Thread Daniel Roseman
On Monday, 30 March 2015 13:04:00 UTC+1, François GUÉRIN wrote: > > Hi all, > > I'm using django for a couple of years, and I've a question about > relations in the ORM and templates. I massively use class-based generic > views. > > I' currently working with a model which have many other

Re: QueryDict and its .dict() method - why does it do that?

2015-03-26 Thread Daniel Roseman
On Thursday, 26 March 2015 17:52:48 UTC, Gabriel Pugliese wrote: > > This gist is self informative - some information from list is lost: > https://gist.github.com/gabrielhpugliese/640b69eefc5b7490a07c > > Some of my buddies have pasted Rails(Rack) and PHP conversion right below. > Is that

Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread Daniel Roseman
On Monday, 23 March 2015 14:16:00 UTC, Fellipe Henrique wrote: > > Hello, > > I have this settings.py [1], and my CustomUser [2] > > When I try to use in my template: > > {{ user_first_name }} > > don't show anything... What I miss in these code? > > You should show your view. Are you using a

Re: fake button run a view and come back to the same page.

2015-03-10 Thread Daniel Roseman
On Tuesday, 10 March 2015 17:11:16 UTC, dk wrote: > > I been trying to find information on how to make a button to run a python > script in the back. > I do have a table with some buttons, and I want to click in one, and > behind doors, will run a python script. > > since I don't know to much

Writing your first Django app, part 5 Testing

2015-02-21 Thread Daniel Roseman
You're doing this in the shell, which uses your devv database in which you have obviously defined a poll already. The docs are taking about running this in a unit test, which would create a blank db without any polls. -- DR. -- You received this message because you are subscribed to the

Re: JSON Response

2015-02-20 Thread Daniel Roseman
What it sounds like actually is that the OP is not preventing the default action of the form, so the page is being submitted normally and displaying the response. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Proble understanding DetailView url doesn't match the slug

2015-02-14 Thread Daniel Roseman
On Saturday, 14 February 2015 04:28:40 UTC, inoyon artlover KLANGRAUSCH wrote: > > > urlpatterns = patterns('', > url(r'^admin/', include(admin.site.urls)), > url(r'^(?P)$',List.as_view()), > ) > That regex will never match anything. You need to give it some character classes to match:

Re: admin shows `model name` object instead of values for foreign key fields

2015-02-06 Thread Daniel Roseman
On Friday, 6 February 2015 20:30:02 UTC, larry@gmail.com wrote: > > I have a 1.7 app, and in admin when I reference a foreign key field, > instead of showing the values in the drop down, it shows "`model name` > object": > > > How can I get it show the values from the IPGroups table? I'm

Re: Strange error with reverse() when running tests

2015-02-06 Thread Daniel Roseman
On Thursday, 5 February 2015 12:34:51 UTC, João Sampaio wrote: > > There are 3 Python files attached. > > I have my URL file attached. I'm using django-rest-framework (in case you > are wondering what the routers are). When I use ./manage.py test with the > first file (file1.py), the tests

Re: Create User method for Custom Manager Django

2015-02-03 Thread Daniel Roseman
On Tuesday, 3 February 2015 06:19:47 UTC, Max Nathaniel Ho wrote: > > Hi all, > > I am following this tutorial ( > http://musings.tinbrain.net/blog/2014/sep/21/registration-django-easy-way/) > to create a user registration model in Django. > > I understand that the class UserManager is

Re: Reduce start up time for manage.py

2015-01-30 Thread Daniel Roseman
On Friday, 30 January 2015 14:01:17 UTC, Avraham Serour wrote: > > I believe putting imports inside functions would slow down execution, it > will make the import everytime the function is executed > > one could make something like a lazy import, but you would be trading slow > startup for slow

Re: Why this code does not change users firstname and lastname?

2015-01-20 Thread Daniel Roseman
On Monday, 19 January 2015 12:39:38 UTC, joulumaa wrote: > > Why would it make sense to switch from different form type? > I use below form to get information that I like to save to user database? > Part of information I need ot update goes to Additional user info class, I > would like to stay in

Re: Any reliable django stripe payments library

2015-01-20 Thread Daniel Roseman
On Tuesday, 20 January 2015 04:39:47 UTC, Chen Xu wrote: > > Hi Everyone, > Is there any reliable django stripe payments library that does not require > to run a python manage.py syncdb? The reason I am asking is I am uaing > SQLAlchemy instead of its builtin ORM. > > Thanks > You don't need a

Re: Why this code does not change users firstname and lastname?

2015-01-19 Thread Daniel Roseman
On Monday, 19 January 2015 09:22:02 UTC, joulumaa wrote: > > I have created user earlier in code with email address and password. > Created users work fine. > Now in later phase I asked more information and would like to fill in > first_name and last_name. > Code shows old first_name and

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Daniel Roseman
On Monday, 19 January 2015 07:28:14 UTC, Cheng Guo wrote: > > Hello, > > I am new to Django and I have run into an issue with views.py. I > understand that there is a function behind each view. For a view that I am > currently writing, it accepts a file upload from user and stores the file >

Re: Content using {% include %} not appearing on detailed page Django

2014-12-17 Thread Daniel Roseman
On Tuesday, 16 December 2014 19:27:41 UTC, Andrew Nguyen wrote: > > I'm having some problems getting some of my content to appear on my > detailed page view, which I have in two separate html files that are being > pulled in using {% include %}. Inside my two files, slider.htmland >

AttributeError raised when calling form's superclass clean() method, however the form doesn't get filled with errors

2014-12-15 Thread Daniel Roseman
You should show your view. You should not call clean directly: it is called automatically by is_valid. Also note that the keys of self.fields are strings, so neither your if nor your elif will ever execute. -- DR. -- You received this message because you are subscribed to the Google Groups

Re: Odd subform caching problem

2014-12-15 Thread Daniel Roseman
On Monday, 15 December 2014 11:04:13 UTC, Gerald Klein wrote: > > > > Daniel, > I didn't include any code as I didn't do anything unusual but if you think > that would help here it is.I was hoping that there was some ordinary > theoretical basis for this as I didn't do anything custom really,

Re: Odd subform caching problem

2014-12-15 Thread Daniel Roseman
On Monday, 15 December 2014 00:53:05 UTC, Gerald Klein wrote: > > HI, I have a simple contact form with an address subform in the form of > "TabularInline" where you can add an arbitrary amount of addresses, after I > add a contact and an address and save, when I go to add a brand new contact >

Re: Beginner: What are the pitfalls of using an html form without using django forms? I.e. form.py

2014-12-09 Thread Daniel Roseman
On Tuesday, 9 December 2014 01:37:44 UTC, T Kwn wrote: > > I'm created a form where a user can add or remove other users from a > group. Because the number of available users is unknown beforehand, I > needed to create a checkbox form where the number of elements is dynamic. > However, I

Re: django ModelForm: error name 'self' is not defined

2014-12-09 Thread Daniel Roseman
On Tuesday, 9 December 2014 06:17:57 UTC, JAI PRAKASH SINGH wrote: > > hello all, > > > I am trying to make a registration form using User model so i am using > ModelForm > > as I am using bootstrap template i need to add some atribute like class > placeholder > > so i am using widget, am

Re: Changes to Model does not migrate to sqlite with Django 1.7?

2014-12-08 Thread Daniel Roseman
On Monday, 8 December 2014 11:07:11 UTC, Tobias Dacoir wrote: > So what am I doing wrong? I'm sure it's just my fault. At first I even > manually edited the migrations file in the past, for example when I changed > one of the fields to be mandatory instead of being optional. Old data in >

Re: Changes to Model does not migrate to sqlite with Django 1.7?

2014-12-08 Thread Daniel Roseman
On Monday, 8 December 2014 07:23:33 UTC, Tobias Dacoir wrote: > > Hi, > > I'm having trouble with changes to my Models. I just added a couple of new > fields to my existing models but when I run manage makemigrations it says: > No changes detected. When I try to log in to the admin panel it

Re: Using login_required decorator

2014-12-02 Thread Daniel Roseman
On Monday, 1 December 2014 23:59:00 UTC, Rootz wrote: > > I have a small project but I am trying to restrict access on some of the > django app urls to login users only. The problem is that when I hit a page > that requires login users I expected that they(users) are redirected to the > login

Re: Query set append

2014-12-02 Thread Daniel Roseman
On Monday, 1 December 2014 19:07:59 UTC, check@gmail.com wrote: > > Hello > > I am very new to python and Django . I have a basic question : > > 1. I have three database tables : Table A , Table B and Table C > 2. in my views.py i do : > >- tableB_QuerySet =

Re: Problem Making New Django project - please help

2014-12-02 Thread Daniel Roseman
On Tuesday, 2 December 2014 09:59:30 UTC, Shashwat singh wrote: > > > > PLEASE HELP WITH THIS > Nobody can possibly help with this. This is a random error message. What were you doing when you got it? What did you type at the command line? What code do you have already? And, please do not

Re: default login template not found (registration/login.html)

2014-11-20 Thread Daniel Roseman
On Thursday, 20 November 2014 11:39:09 UTC, Yen wrote: > > Hi, > > I follow the doc to test the login system. I set a view function with > @login_required to show successful login message. > > In the html, a link like: > Login > > The URLconf under 'account' namespace contains one url: >

Re: Deploying Django project

2014-11-19 Thread Daniel Roseman
On Wednesday, 19 November 2014 10:22:25 UTC, termopro wrote: > > I have created a Django 1.7 project and would like to deploy it. I am > reading about how to do it right and i have some questions. > > If i understand correctly deployment should contain the following steps: > > 1) Initial remote

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Daniel Roseman
On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote: > > I'm trying to figure out how to create my Custom User Model. > > In the official docs I basically found two different strategies: Extending > User Model or Custom User Model: >

Re: Newbie question on serving static files from apache

2014-11-15 Thread Daniel Roseman
On Saturday, 15 November 2014 03:13:37 UTC, pythonista wrote: > > I am using django 1.7 and apache. > > I do not understand the instructions on the django tutorial. > > The files were delivered as expected in debug mode and locally from the > django web server. > > > Can someone provide me with a

Re: Where does django store auth migrations?

2014-11-09 Thread Daniel Roseman
On Sunday, 9 November 2014 13:40:12 UTC, Dr Ed wrote: > > Okay, I'm confused. I found it, in here: > /Users//.virtualenvs//lib/python2.7/site- > packages/django/contrib/auth/migrations > > Why are app related migrations being stored in this location? > > Cheers, > > Ed > What? Migrations

Re: Model Manager QuerySet over-ride class not working as expected

2014-11-03 Thread Daniel Roseman
On Sunday, 2 November 2014 18:12:10 UTC, rmschne wrote: > > I've upgraded to Django 1.7.1 > > Following the upgrade most (haven't tested all, but for all tested this > true) the over-rided queryset is not functioning. > > when the code calls > qs=Member.Active_objects.all() > > then all

Re: DB foreign key constraints : Django 1.7 regression ?

2014-10-30 Thread Daniel Roseman
On Wednesday, 29 October 2014 17:53:40 UTC, not...@gmail.com wrote: > > Hi ! > > Just tested the following: > >- create clean DB >- run syncdb >- compare obtained tables when using Django 1.6.8 and Django 1.7.1 > > My findings : > > In Django 1.7, some fields with models.ForeignKey no

Re: Rendering TabuarInline inside ModelAdmin without a foreign key

2014-10-29 Thread Daniel Roseman
On Wednesday, 29 October 2014 03:57:36 UTC, somecallitblues wrote: > > Hi list, > > I have a table of orders where one of the columns is a IntegerField > containing the id of a user who created the order. > > Since it's not a FK field django admin can't display these orders inline > inside the

How to get related data on one to one field of a foreign key?

2014-10-25 Thread Daniel Roseman
That's what you've already done with your select_related call. What you should have asked is how you access that data in the template, and the answer is that you simply follow the relationship from your Log object: {% for log in logs %} {{ log.myfield }} {{ log.userprofile.picture }} {%

Re: django-admin creates the views.py files in the wrong place!

2014-10-23 Thread Daniel Roseman
On Thursday, 23 October 2014 21:45:18 UTC+1, Aliane Abdelouahab wrote: > > Try the code like that, it will not work, > > now move the views.py from /rango to the initial directory where the is > the manage.py (/abdou) and it will work > Nope; that is the correct structure, as it is, with no need

Re: django-admin creates the views.py files in the wrong place!

2014-10-23 Thread Daniel Roseman
On Thursday, 23 October 2014 15:34:15 UTC+1, Aliane Abdelouahab wrote: > > i followed exactly by words the tutorial > > http://www.tangowithdjango.com/book17/chapters/setup.html#creating-a-django-application > and it seems the problem is about creating the double directory, and when > doing

Re: DateTimeField: Hide clock

2014-10-23 Thread Daniel Roseman
On Thursday, 23 October 2014 11:28:10 UTC+1, Oskar Lyrstrand wrote: > > models.py: > class Post(models.Model): > pub_date = models.DateTimeField > > template.html: > {{ post.pub_date }} > > output: > 23 october 2014 19:25 > > Problem is I dont want "19:25" to show. What can I do? > Why are

Re: django-admin creates the views.py files in the wrong place!

2014-10-23 Thread Daniel Roseman
On Wednesday, 22 October 2014 22:05:07 UTC+1, Aliane Abdelouahab wrote: > > Hi, > Django 1.7 when a beginner runs the first tutorial, he has to change the > views.py file outside the app to the whole project itself. > i found this, >

Re: Many-to-many Relationship Between Django Apps Fails

2014-10-21 Thread Daniel Roseman
On Tuesday, 21 October 2014 14:32:04 UTC+1, Paul Childs wrote: > > *What's been done so far:* > >- I was on Django 1.5 and upgraded to 1.6 (cannot go higher as we are >on Python 2.6) and this did not solve the problem. >- I have researched this issue to death and cannot seem to find a

Re: djangoproject.com tutorial part 3

2014-10-21 Thread Daniel Roseman
On Tuesday, 21 October 2014 00:01:56 UTC+1, Tri Vo wrote: > > I am calling the page with "python manage.py runserver 0.0.0.0:8000" When > I load up the page before adding the views and urls files, I see the polls > and everything that I have set up with the codes from the previous pages of >

Re: Unable to store static

2014-10-16 Thread Daniel Roseman
That is completely untrue. The template tag and the HTML element are evaluated in different contexts, so do not conflict at all. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Problem with a token in my custom template tag

2014-10-15 Thread Daniel Roseman
On Wednesday, 15 October 2014 19:30:01 UTC+1, Daniel Grace wrote: > > Hi, > I'm encountering the following problem with a token in my custom template > tag: > Request Method: GET > Request URL: http://127.0.0.1:8000/flows/ > Django Version: 1.7 > Exception Type: ValueError > Exception Value: >

Re: Static Media Server (Tango with Django)

2014-10-13 Thread Daniel Roseman
On Monday, 13 October 2014 08:39:26 UTC+1, Max Nathaniel Ho wrote: > > Hi all, > > I am going through this tutorial on Tango with Django - > http://www.tangowithdjango.com/book/chapters/templates_static.html > > I extracted the specific part of the tutorial as seen in *BOLD*. > *4.4. The Static

Re: How to get user ID and ID of newly created record in a CreateView?

2014-10-10 Thread Daniel Roseman
On Friday, 10 October 2014 19:03:49 UTC+1, Daniel Grace wrote: > > Hi, I am using a CreateView. I want to create some related data on a > table ("Log" model), so I need the ID of the record being created for the > related field (see "flow" below). Also I need the ID of the user creating > the

Re: Custom Exception Handler not being called

2014-10-10 Thread Daniel Roseman
On Friday, 10 October 2014 03:14:32 UTC+1, Néstor Boscán wrote: > > Hi > > I've created a rest service using the APIView and created my own custom > exception handler. I configured my custom exception handler in my > settings.py file using: > > REST_FRAMEWORK = { > 'EXCEPTION_HANDLER':

Re: best aproach to pass an email from the url to a view?

2014-10-10 Thread Daniel Roseman
On Friday, 10 October 2014 01:00:29 UTC+1, dk wrote: > > I put the Email that I got from a form into the url (I am using the url as > a variable to store the email) > > and look like this > http://127.0.0.1:8000/polls/vote/thank/a...@b.com/ > > > url: > url(r'^vote/thank/(? #here should be RE

Re: Failure to get data from database and onto template.

2014-10-02 Thread Daniel Roseman
ver, in the course of struggling with Problem 2, suddenly my table of > contents is out of order again, and I* have not touched* those lines of > code. I don’t understand how that could be. Daniel Roseman suggested I > create a new field, number it, and order by that instead of relying on the

Re: 1 named url per page/screen?

2014-10-02 Thread Daniel Roseman
On Wednesday, 1 October 2014 21:35:30 UTC+1, Malik Rumi wrote: > > Ok, thank you Daniel. Your response is reasonable and makes sense, but > that clarity is not on the docs page. But this leads me to a related follow > up: The need for the parameter, be it 'green' as in my case or '1945' as in >

Re: 1 named url per page/screen?

2014-09-26 Thread Daniel Roseman
On Thursday, 25 September 2014 22:43:43 UTC+1, Malik Rumi wrote: > > 1. I am trying to understand the documentation here: > https://docs.djangoproject.com/en/1.7/topics/http/urls/#naming-url-patterns >

Re: Right way to create proxy to User model in Django 1.7

2014-09-13 Thread Daniel Roseman
On Friday, 12 September 2014 19:54:53 UTC+1, Izabella Gál wrote: > > Hi! > > Could you, please, help me to find the right way to create proxy to User > model in Django 1.7? > > In 'myapp.models.py' I have a MyUser class which should inherit from the > user model specified in

Re: error with heroku

2014-09-10 Thread Daniel Roseman
On Wednesday, 10 September 2014 09:06:20 UTC+1, ngangsia akumbo wrote: > > Please why am i having this error > > (djangoapps)yems firstapp # ls > firstapp manage.py Procfile > > > > nano Procfile > web: gunicorn hellodjango.wsgi --log-file - > > Please i need some help > > Your project

Re: Iterate forms with for loop

2014-08-21 Thread Daniel Roseman
On Thursday, 21 August 2014 10:33:11 UTC+1, Kamal Kaur wrote: > > I'm iterating multiple forms for all the instances of a table in the > template using for loop. > > But only the last form is being considered and it saves the data from > last form only. I'm not getting how to differentiate

Re: Unable to access data in field during migration v1.7c2

2014-08-11 Thread Daniel Roseman
On Friday, 8 August 2014 16:51:52 UTC+1, Matthew Meyer wrote: > > I have a model with a FK to a field called employee. I'm trying to > migrate it to django.contrib.auth.models.User. I call > a migrations.RunPython command and when I try to access the data in the > field before I migrate it and

Re: Problme in creating dynamic ChoiceField

2014-08-05 Thread Daniel Roseman
On Tuesday, 5 August 2014 13:28:28 UTC+1, VIPUL BANSAL wrote: > > Hi, > > I trying to create a drop-down which gets repopulated every time we land > on the page. > > If I use the following code everything works correctly: > > class DeleteMappingForm(forms.Form) : > subAreaDropDown =

Re: invalid attribute

2014-08-01 Thread Daniel Roseman
On Friday, 1 August 2014 11:55:10 UTC+1, ngangsia akumbo wrote: > > class Meta invalid attribute , price_sale, get_absolute_url > >> >>> You *have* to do better than this. As I have told you before, you must provide *all* the relevant information if you want people to help you. Put yourself in

Re: Access to custom fields in view?

2014-07-31 Thread Daniel Roseman
On Wednesday, 30 July 2014 19:02:00 UTC+1, Miguel Angel Yáñez Camacho wrote: in my view in this code i can access to a regular field but i CANT access > to custom fields, give me error > plantillas_db = templates_keyword.objects.select_related( >

Re: Getting the "Real" Foreign Key from a ModelForm

2014-07-28 Thread Daniel Roseman
On Monday, 28 July 2014 15:46:11 UTC+1, Tom Evans wrote: > > > > You can use kwargs, but it is much cleaner and less typing to use > Model.objects.create() as you can omit the subsequent save() as > create() creates valid objects (they have pks). > > You're right as far as that goes, but note

Re: Problem in the Tutorial 01

2014-07-24 Thread Daniel Roseman
On Thursday, 24 July 2014 13:53:54 UTC+1, Fabian Zentner wrote: > > Hey guys, > > I'm new with Django and Python as well. I'm doing the tutorial 1 on the > website (https://docs.djangoproject.com/en/1.6/intro/tutorial01/). > I'm using Python27 (C:\Python27) > In C:\Python27\Scripts\ I have the

Re: urls not maching

2014-07-14 Thread Daniel Roseman
On Monday, 14 July 2014 02:08:24 UTC+1, ngangsia akumbo wrote: > > > Those are actual urls , i am actually still developing this site, so i > decided to start with a blog first > You *have* to help us help you. Thomas specifically requested that you show *exactly* what URL you are requesting.

Lookup Fields

2014-07-06 Thread Daniel Roseman
Sounds like you want a ForeignKey to "self". -- DR. -- 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

How to install Django on Windows - pip, command prompt.

2014-07-06 Thread Daniel Roseman
You can't have been following that documentation very closely, as there is a whole section on how to install pip before the bit that you quote. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Using session data to populate multiple forms

2014-06-25 Thread Daniel Roseman
On Wednesday, 25 June 2014 08:58:05 UTC+1, Aaron Reabow wrote: > > Perhaps I should be more specific. > > How do i populate some fields in a table from a form, and other fields > from session variables in the view (or the template or the model if that > was more appropriate) > > many thanks, >

Re: Using session data to populate multiple forms

2014-06-24 Thread Daniel Roseman
On Tuesday, 24 June 2014 14:30:48 UTC+1, Aaron Reabow wrote: > > Hi All, > > I have been scratching around this for a bit now. > > Sometimes I *don't want people to have to register* on my site, but I do > want to *capture some information* about them and *reuse it across > multiple mini

Re: Strange behavior when running a join in Django shell versus script

2014-06-18 Thread Daniel Roseman
On Wednesday, 18 June 2014 07:16:23 UTC+1, Jason Skicewicz wrote: > > I have a many to many relationship from my UserProfile object to an object > called ThemeTimes. The declaration looks like the following: > >theme_times = models.ManyToManyField('fixupthemes.FixupThemeTime', >>

Re: Using Django as a framework to deploy python script on a website:

2014-06-14 Thread Daniel Roseman
On Saturday, 14 June 2014 17:22:24 UTC+1, Eran Ariel wrote: > > Hi, I am interested in Django as a platform to deploy applications using > mod_wsgi, accordingly, whether existing Django libraries such as the forms > library could be applied for this purpose as user initiated POST requests – >

Re: Poll App part 3

2014-06-11 Thread Daniel Roseman
On Wednesday, 11 June 2014 11:18:55 UTC+1, divyanshi kathuria wrote: > > In Django poll application part 3, url passed in index.html is 'detail'. I > doubt it should be 'index'. > If you think there's a bug in the tutorial, you should log a ticket in the ticket tracker and/or make a pull

Re: django installation

2014-06-11 Thread Daniel Roseman
On Wednesday, 11 June 2014 11:00:38 UTC+1, Srinivas Reddy T wrote: > > There is no need to install virtualenv to install Django. > While this is technically correct, it is not good advice to give to a newbie. Experienced developers should be encouraging best practice among newcomers, and to be

Re: Modifying the request.POST data that is received from a form; form is not getting validated then

2014-06-10 Thread Daniel Roseman
On Tuesday, 10 June 2014 12:25:10 UTC+1, Anurag Baidyanath wrote: > > i am having difficulty in saving the form data to the database. > And we are having difficulty reading your code. If you can't be bothered to clean it up enough (eg removing all the commented-out lines) to make it easy to

Re: Instagram + Heroku + Django + HTTP headers

2014-06-04 Thread Daniel Roseman
On Tuesday, 3 June 2014 22:35:07 UTC+1, Dr Shauny wrote: > > Hi, > > I have a Django/Python app that is hosted on Heroku. The app uses the > Instagram API. > > I am trying to secure the app by enforcing signed HTTP headers using > X-Insta-Forwarded-For. > > The actual header value is constructed

Re: BookMarker Project - Opening local files on localhost through Django generated pages

2014-05-22 Thread Daniel Roseman
On Tuesday, 20 May 2014 19:29:06 UTC+1, Aseem Bansal wrote: > > I am working on a BookMarker project for managing my bookmarks. I was > creating the search page for lisitng bookmarks as per categories. I hit a > snag while testing it. I am unable to open locally stored webpages. I > understand

<    1   2   3   4   5   6   7   8   9   10   >