CMS for Online News Paper

2015-10-02 Thread Milind Singh
I am a beginner, and working on my first django based project - a wevsite with CMS for Online News Paper. Dear expert kindly suggest me with: 1. Structure 2. How to use portlets 3. Extending django admin , etc Thanks in advance -Milind -- You received this message because you are subscribed to

Re: Finding average

2015-10-02 Thread Tim Graham
Please have a look at the aggregation docs and see if you can figure it out: https://docs.djangoproject.com/en/stable/topics/db/aggregation/ On Friday, October 2, 2015 at 2:46:39 AM UTC-4, Bhanu Kathuria wrote: > > I have attached my model files and template files. Please tell how can i > find a

Re: Foreign key in sqlite3

2015-10-02 Thread Ricardo Daniel Quiroga
add foreign key in model, not in database, but it can cause conflicts with django. anyway if you even want to do it reviews the documentation SQLite 2015-09-30 13:12 GMT-03:00 Gergely Polonkai : > Assuming you are using Django and it's ORM, the same way as in any other > database: > > fieldname =

Method call at end of Django session

2015-10-02 Thread Amarjeet Kapoor
Want to know how and where can I implement a method in Django which is to called automatically only when a session end ( i.e. when user close the webapp or browser ). I want to know where that method should be written, how to call it automatically after end of session. I want to use this method t

Why should we use Django Rest Framework?

2015-10-02 Thread Robert librado
>From what ive seen when i use it its like django admin but with more features. I also noticed that it has the serializers are those for like using it with a machine ot translatign code? I also have question on why its needed i understand that the api is for client and users to collect data is

Re: Sending mail using smtp server

2015-10-02 Thread Robert librado
when ive used this method ive experience errors the port 587 seems to have issues. could you post some basic code. that would work for anybody please thanks email me back djangocharm2...@gmail.com thanks On Monday, September 28, 2015 at 5:56:42 PM UTC-5, Rajat Singh wrote: > > I want to kno

Re: Why should we use Django Rest Framework?

2015-10-02 Thread Andreas Kuhne
Hi Robert, The main reason for using django rest framework is if you need a backend to communicate with one or more rich frontends. An example could be if you have a website running django and you want to create a mobile application for iOS or android. You can then create an API that will communic

Re: Method call at end of Django session

2015-10-02 Thread Andreas Kuhne
Hi, I don't think you can reliably do that. Django never knows when the user closes his browser window. Because a session is stateless (there is only a connection to the server when it responds to a request). However you could do this via a bit of ajax or a pretty unreliable javascript event. Wha

Re: Converting implicit m2m through table to explicit through model with Django 1.7 migrations

2015-10-02 Thread John Lucas
Thanks for the replies. Carsten - that link is broken for me unfortunately. Thanks for the thumbs up Simon - appreciate the help. I'll be sure to document this once I have a moment. I have one follow up question. Both so I can see the proof in the pudding myself and because I'm generally curious

Re: Why should we use Django Rest Framework?

2015-10-02 Thread James Schneider
> > From what ive seen when i use it its like django admin but with more > features. > Django Admin is not an API, nor can it be used that way. If you need API functionality, you would write the interface yourself, or use a package such as DRF. DRF and the Django Admin perform the same functional

Re: Method call at end of Django session

2015-10-02 Thread Vijay Khemlani
Also it is most likely inconsistent if the user has the same webpage opened on two different tabs On Fri, Oct 2, 2015 at 5:55 PM, Andreas Kuhne wrote: > Hi, > > I don't think you can reliably do that. Django never knows when the user > closes his browser window. Because a session is stateless (t

Re: Corrupted Migration?

2015-10-02 Thread Daniel Chen
@Mike: I'm using Python 2.7.10 and Django 1.7. I'm not sure the ticket applies, but I appreciate the link! @James: Sorry, I misspoke! [field] actually corresponds to a old field in state X. Before adding the new fields in state Y, the migration is trying to remove some old fields in state X but

Re: Corrupted Migration?

2015-10-02 Thread Daniel Chen
@Mike: I'm using Python 2.7.10 and Django 1.7. I'm not sure the ticket applies, but I appreciate the link! @James: Sorry, I misspoke! [field] actually corresponds to a old field in state X. Before adding the new fields in state Y, the migration is trying to remove some old fields in state X but

Re: Corrupted Migration?

2015-10-02 Thread Mike Dewhirst
On 3/10/2015 8:35 AM, Daniel Chen wrote: My confusion is in the fact that the model state wouldn't roll back to state X after the first failed transaction (like the DB did). No. The model is all your own work. Anything you write stays written. The migration system tries to implement your work.

Re: Corrupted Migration?

2015-10-02 Thread James Schneider
On Fri, Oct 2, 2015 at 3:37 PM, Daniel Chen wrote: > @Mike: I'm using Python 2.7.10 and Django 1.7. I'm not sure the ticket > applies, but I appreciate the link! > > @James: Sorry, I misspoke! [field] actually corresponds to a old field in > state X. Before adding the new fields in state Y, the m

Re: Corrupted Migration?

2015-10-02 Thread James Schneider
> > @James: Sorry, I misspoke! [field] actually corresponds to a old field in >> state X. Before adding the new fields in state Y, the migration is trying >> to remove some old fields in state X but isn't finding them. I think this >> means that I'm unable to re-run that migration since it's lookin