If you have a fixed number of items in each of the sublists you can do
{{ i.0 }} # First element
{{ i.1 }} # Second element
or you can iterate over it
{% for sub_element in i %}
{{ sub_element }}
{% endfor %}
On Thu, Feb 12, 2015 at 2:55 PM, dk wrote:
> i do have a list of list like
if i.2 == to somestuff? do something? or
> all that need to be set in the view function?
>
> thanks
>
>
> On Thursday, February 12, 2015 at 12:15:50 PM UTC-6, Vijay Khemlani wrote:
>
>> If you have a fixed number of items in each of the sublists you can do
>>
>>
Try adding "http://"; at the start
Also, consider that the format is 111.111.111.111: (the port is after a
colon, not a dot)
On Fri, Feb 13, 2015 at 8:03 PM, dk wrote:
> its just a string with an ip address and that's it.
>
> {{ j }}
> so at the end should be something like
> 11.111.1
What is the actual content of the response you are getting from the AJAX
request?
On Wed, Feb 18, 2015 at 10:27 AM, João Marques
wrote:
> Hey guys, so basicly I want to send a GET request with ajax to one of my
> views and the specific view returns an html response that will be loaded on
> a div
.
On Wed, Feb 18, 2015 at 1:47 PM, João Marques
wrote:
> Im getting nothing really... I just do alert(response); and nothing shows
> up.
>
> quarta-feira, 18 de Fevereiro de 2015 às 14:48:48 UTC, Vijay Khemlani
> escreveu:
>>
>> What is the actual content of the respon
What is being sent to the view from the browser is fine, it's just being
url encoded, the actual value is something like this then:
[[['5E', '10A', '8D'], ['8B', '11B', '12G'], ['8C', '7B'], ['12C', '11F',
'6A'],['5E', '10G', '10H'],['8A','11E'], ['7A', '12E', '12F'], ['5A',
'11C', '12B','11G'], [
you can compile python locally
On Thu, Feb 19, 2015 at 10:27 AM, SHINTO PETER wrote:
> How to install django in redhat where i have python 2.6 and 2.7 and i need
> to install django in python 2.7
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users"
What do you mean with "in a good way"? Does your code work?
On Thu, Feb 19, 2015 at 4:14 PM, elcaiaimar wrote:
> Hello,
>
> I was wondering how I can send a response JSON in a good way, because I
> have the next code:
>
> if "product_id" in request.POST:
> try:
> id_p
atus":"True","product_id":p.id} But this should be
> read for the JS code, and if it's True show an alert saying Remove it!
>
> Is there anything wrong in my code?
>
> El jueves, 19 de febrero de 2015, 21:49:59 (UTC+1), Vijay Khemlani
> escribió:
>&g
There's no "range" in django templates, you just use
{% for elem in sols %}
Regarding making the request using POST, are you sure you're not having a
proble with CSRF?
https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/
It has a section for AJAX requests
On Thu, Feb 19, 2015 at 7:44 PM,
I would do something like this
video = Video()
video.original = form.cleaned_data['video'] # Assuming the form field is
"video"
video.user = user
video.title = form.cleaned_data['title'] # Assuming the form field is
"title"
video.save() # You might need to make the mp4_480 and mp4_7
Then in your task function you can get the file from the video model
instance, trascode it, and store it in the corresponding fields of the
object (mp4_480, mp4_720)
On Fri, Feb 20, 2015 at 10:18 AM, Vijay Khemlani wrote:
> I would do something like this
>
> video = Video()
> vi
nage to get the rest of the essential things to work.
>
> sexta-feira, 20 de Fevereiro de 2015 às 00:08:32 UTC, Vijay Khemlani
> escreveu:
>>
>> There's no "range" in django templates, you just use
>>
>> {% for elem in sols %}
>>
>> Regard
I'm not sure if there's an official stance on that, but I believe that
since Django is a "MVT" framework, that kind of logic does not seem to be
appropiate neither for templates nor views, so models seem like the logical
choice.
That way you can also make sure that the side-effect that you want to
hat I
> can use ffmpeg code (subprocess.call('ffmpeg -i path/.../original
> path/.../mp4_720') to transcode.
>
> Thank you.
>
> On Fri, Feb 20, 2015 at 6:49 PM, Vijay Khemlani
> wrote:
>
>> Then in your task function you can get the file from the video model
>&g
If you're using jQuery 1.5.1 or above you can do this instead
// using jQuery
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
It's not clear what's the purpose of the view you are showing. ¿Is it
supposed to display a form with "haircolor" and "status" fields and filter
the results it displays based on that?
In that case you can declare a form:
from django import forms
class ScreeningForm(forms.Form):
haircolor = f
You can use a post_save signal for the User Model
https://docs.djangoproject.com/en/1.7/ref/signals/#post-save
from django.db.models.signals import post_save
from django.contrib.auth.models import User
def create_about(sender, **kwargs):
user = kwargs['instance']
if kwargs['created']:
candidate.messages_sent = sent_messages.get(
candidate.candidate.user.id)
candidates.append(candidate)
context['candidate_list'] = candidates
context['form'] = form
return context
On Sat, Feb 21, 2015 at 9:57 AM, Ronaldo Bahia wrote:
> Hi Vija
, Feb 22, 2015 at 10:53 PM, Ronaldo Bahia
wrote:
> Vijay,
>
> For some reason, I'm getting SyntaxError with self.cleaned_data in
> forms.py
>
> I'd like you to teach me how to make this. I have no problem to share my
> project code.
>
> Do you think we can ma
//stackoverflow.com/questions/28637326/how-to-filter-results-using-forms-in-django-best-approach
>
> *Ronaldo Bahia *
> Diretor | JobConvo.com
> Tel: 11 3280 6971
>
> 2015-02-22 23:16 GMT-03:00 Vijay Khemlani :
>
>> Well, I think you can continue posting the updated code her
to write is:
>
> def filter_job_candidates(job):
> assert self.is_valid()
> job_candidates = Job.objects.applied_to.all()
>
> Or am I wrong?
>
> Sorry for bothering...
>
>
>
> Em segunda-feira, 23 de fevereiro de 2015 10:50:49 UTC-3, Vijay Khemlani
> escreve
You're welcome, glad I could help :D
On Mon, Feb 23, 2015 at 5:25 PM, Ronaldo Bahia wrote:
> Awesome! Now it works perfectly.
>
> I'm updating my stackoverflow code for anyone facing the same doubt.
>
> Thanks a lot man
>
>
> Em segunda-feira, 23 de fever
It's true that the Global Interpreter Lock will prevent threads from a
single process from running concurrently, but your server (uWSGI, gunicorn,
etc) will spawn multiple process that don't conflict with the GIL.
Also, if you need some form of multiprocessing celery is a good choice, and
one that
Parsing a CSV file is not a particularly hard thing to do
https://docs.python.org/2/library/csv.html
You can change the example to read from the file in your model an instead
of printing to the console, to store it in the database.
On Tue, Feb 24, 2015 at 8:53 PM, elcaiaimar wrote:
> Hello,
>
Old platforms such as ASP.NET "Classic" (not MVC) have some sort of widgets
(Web Forms in the case of of ASP) that rendered very customized (and very
ugly) HTML that "worked" with their backend.
The trend nowadays is to separate the backend and frontend as much as
posible, allowing any frontend fr
is the signals.py module being loaded at some point?
If it isn't, then the connect function is never being called.
On Wed, Feb 25, 2015 at 2:01 PM, Rootz wrote:
> I have tried using the request_finished signal but nothing happens when I
> tried testing it.
> What suggestions or recommendations
The rest of the uWSGI / gunicorn / whatever workers are available to handle
the other requests.
If there are so many uploads that all of the workers are busy then there
are ways to upload files directly to Amazon S3 (for example) from the
browser without going through your server.
On Sun, Mar 1,
Both save the user to the database, but "user_form.save()" leaves the user
password in plain text (which won't work when the user tries to login
later) so the password must be set correctly
(user.set_password(user.password)) and then the user has to be saved again
for the correct (hashed) password
Also, why would matplotlib return without having finished its job?
On Wed, Mar 4, 2015 at 2:58 PM, Bill Freeman wrote:
> Sleeping in a web server, which potentially has many users, is considered
> bad form, even if it works. A better place for such time outs is in
> JavaScript in the browser.
You can save files as part of models, for example using FileFields
https://docs.djangoproject.com/en/1.7/ref/models/fields/#filefield
Or you can handle them manually, for example using default_storage
https://docs.djangoproject.com/en/1.7/topics/files/
Regarding File Search, I don't know, never
Changing the double quotes for single quotes seems to do the trick, but I
don't know why it works
On Thu, Mar 5, 2015 at 1:24 PM, Carsten Fuchs wrote:
> Dear Django fellows,
>
> using Django 1.7.5, I have a problem with commas in string literals in the
> cycle tag, e.g. with
>
> {% cycle "He
Your first command (wget ...) failed because wget does not exist on Windows
I think weakrefset is available in pip, why not try to install it that way?
On Fri, Mar 6, 2015 at 9:36 PM, Collin Anderson
wrote:
> Hi,
>
> That doesn't look good :)
>
> Maybe try reinstalling python.
>
> Collin
>
> On
You might find the m2m_changed signal useful
https://docs.djangoproject.com/en/1.7/ref/signals/#m2m-changed
On Sat, Mar 7, 2015 at 7:57 AM, Fabien Schwob wrote:
> Hello,
>
> I would like to detect changes in a ManyToMany field, to update data
> in the linked Model. I've two objects :
>
> class
You might find the m2m_changed signal useful
https://docs.djangoproject.com/en/1.7/ref/signals/#m2m-changed
On Sat, Mar 7, 2015 at 7:57 AM, Fabien Schwob wrote:
> Hello,
>
> I would like to detect changes in a ManyToMany field, to update data
> in the linked Model. I've two objects :
>
> class
If you are using a modelform then you don't need to re-define the original
model fields, in this case
Class AccountForm(forms.ModelForm):
class Meta:
model = Accounts
fields = ['authid', 'authtoken', 'provider']
You leave the "user" field out as it is not part of the form itse
ange.
> On sam. 7 mars 2015 at 16:53 Vijay Khemlani wrote:
>
>> You might find the m2m_changed signal useful
>>
>> https://docs.djangoproject.com/en/1.7/ref/signals/#m2m-changed
>> On Sat, Mar 7, 2015 at 7:57 AM, Fabien Schwob wrote:
>>
>>> Hello,
>&g
Unbound forms have no validation errors as they haven't been filled yet by
the user.
I think you are trying to solve the wrong problem. Why are you creating
your form manually in the first place? Your HTML markup is easy to do with
Django forms and packages suck as crispy forms
On Tue, Mar 10, 20
Your question is how to make a responsive website or something else?
On Tue, Mar 10, 2015 at 12:05 PM, inoyon artlover KLANGRAUSCH <
inoyonartlo...@googlemail.com> wrote:
> Hi there,
>
> how can I get Django working with responsinator.com ?
>
> Best regards! :)
>
> --
> You received this message
Hmmm... what about the classic Google Analytics?
On Tue, Mar 10, 2015 at 5:04 PM, Andreas Kuhne
wrote:
> Hi all,
>
> I would like to be able to track the number of visitors on our website. We
> previously had django-tracking installed and a munin node that tracked the
> information. Unfortunatel
At least when I tested a similar query it makes an OUTER JOIN, not an INNER
JOIN
What's the actual SQL command being executed?
print Shops.objects.filter(...).query
On Wed, Mar 11, 2015 at 1:19 PM, Ajay M
wrote:
> Hi Vijay,
> The search text is okay.. I think when
At least when using Postgres that query makes a LEFT OUTER JOIN so it
shouldn't discard Shops just because they don't have a state or city.
So your query seems to be OK
are you sure your search text is fine? the orm will not automatically strip
the search_text into a list of keywords or things li
What URL is being generated in the final HTML?, and does that path match
the one you have in the static folder in your app?
Also, if your are on debug mode, you don't need to run collectstatic
On Thu, Mar 19, 2015 at 10:19 PM, Fellipe Henrique
wrote:
> Thanks, but I already try the docs, but my
You don't need special rules in the URL config to serve static files in
development as far as I know
so you have a route to "/static/public/css/bootstrap.min.css" and I assume
that when you try to access
http://localhost:8000/static/public/css/bootstrap.min.css
you get a 404 error
Where is boot
Soo when you open your webpage, look at its source code, click on the
"/static/public/css/bootstrap.min.css" path it shows the file in Firefox?
On Fri, Mar 20, 2015 at 11:37 AM, Néstor wrote:
> Is it OK to have this syntax?
> href="{% static "public/css/bootstrap.min.css" %}">
>
> Should y
0, 2015 at 11:43 AM, Vijay Khemlani
> wrote:
>
>> Soo when you open your webpage, look at its source code, click on the
>> "/static/public/css/bootstrap.min.css" path it shows the file in Firefox?
>>
>
> Yes.. when I open source code in firefox, c
It works, but the javascript you are generating has syntax errors.
For example, you are missing the commas after every element.
Either way, dumping variables directly from django templates to JavaScript
is not very elegant, you could make a JSON object in the view beforehand
json_tags = json.dum
They should look exactly the same
are all the static files (CSS / JS) being loaded correctly in production?
On Sat, Mar 21, 2015 at 8:27 PM, talex wrote:
> While using the Django development server, I like the appearance of the
> admin site from django.contrib. After deploying the application
Judging from the makemigrations output, you deleted a model (User) but also
added it as a foreignkey field to another model (Persona), is that what you
wanted?
On Sun, Mar 22, 2015 at 3:16 PM, wrote:
> Hi,
>
> makemigrations works but migrate does not:
>
> [xan@mercuri gargamella]$ python manage
JSON is literally the notation for objects and arrays in JavaScript, when
you "print" it it outputs valid JavaScript code.
On Mon, Mar 23, 2015 at 11:59 AM, dk wrote:
> AHHH!!!...
> that make scenes that the java script did work when I did it manually.
> I haven't use json files before, so
You can't include images in the options of a typycal html dropdown
To do so you need to use JavaScript, for example this plugin
http://designwithpc.com/plugins/ddslick#demo
And pass the options in the format specified by the plugin
On Mon, Mar 23, 2015 at 1:51 PM, Sandeep kaur wrote:
> Anybod
You can use an IntegerField with choices
https://docs.djangoproject.com/en/1.7/ref/models/fields/#choices
On Mon, Mar 23, 2015 at 4:28 PM, Daniel Grace wrote:
> How to create a field with multiple values? For example an integer field
> that takes on particular values:
>
> state = models.Intege
from django.db.models import Q
User.object.get(Q(username=myusername) | Q(email=myEmail))
On Mon, Mar 23, 2015 at 9:30 PM, nobody wrote:
> Hi,
>
> How can I search the database using multiple parameters similar like
> "where username ="myUserName" or email = "MyEmail"?
>
> I tried to run User.o
To prevent the CSRF validation you can use the csrf_exempt decorator
https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/#utilities
The normal way to handle a POST request is to issue a redirect (HTTP 302)
after handling the request, but if it is an automated request I guess you
can return an
you want to encode them before they are submitted to the server? why?
On Tue, Mar 31, 2015 at 1:23 PM, Pnelson wrote:
> Im trying to learn django and i have a form in html that have 3 arguments
> (app_id,user_id and username) and i want to encode those 3 arguments in
> base64.
>
> views.py
>
> d
Call form.is_valid() (and check that it returns True) before accessing
form.cleaned_data
On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia wrote:
>
> Hi every one.
>
> Can you help me in this?
>
>
> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for
ahia wrote:
> Thanks. Solved cleaned_data issue.
>
> Now I getting:
>
> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>
> Or
>
> Cannot assign "u'Title'": "CandidateToJob.job" must b
post your updated code
On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia wrote:
> Dont know why but I still get the same error
>
> Ronaldo Bahia
>
> Em 02/04/2015, às 10:50, Vijay Khemlani escreveu:
>
> In your Form class "job" is a ChoiceField, and it returns
gt; *Ronaldo Bahia *
> Diretor | JobConvo.com
> Tel: 11 3280 6971
>
> 2015-04-02 13:15 GMT-03:00 Vijay Khemlani :
>
>> post your updated code
>>
>> On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia
>> wrote:
>>
>>> Dont know why but I still get the
What are you trying to do exactly?
On Sun, Apr 5, 2015 at 10:27 AM, José Jesús Palacios
wrote:
> How can I work with pyserial and django form to read from serial to
> field?
> Is it possible?
>
> Thanks to everyone.
>
> --
> You received this message because you are subscribed to the Google Gro
n be a weight of weighbridge, number of car plate or reading a
> barcode.
> Outside the browser, It's not problem, but I want to use it as user
> interface.
>
> El domingo, 5 de abril de 2015, 19:55:02 (UTC+2), Vijay Khemlani escribió:
>>
>> What are you trying to do exac
If you don't need the advanced features of Django or REST framework it's
easy to ignore them, it's not like they require tons of resources or
configuration files to work.
On Thu, Apr 9, 2015 at 10:24 AM, graeme wrote:
> If you do not need Django at all, Flask or Bottle.
>
> If you are going to u
You can use get_model
from django.db.models.loading import get_model
YourModel = get_model('your_app', tableName)
On Wed, Apr 15, 2015 at 2:01 PM, Tim Chase
wrote:
> On 2015-04-15 09:45, Henry Versemann wrote:
> > My problem is since the logic won't know which tables will be in
> > the incomin
tblEntryObj seems to be an instance of your model, it is not a dictionary,
so normally it wouldn't have a "keys" method.
On Wed, Apr 15, 2015 at 5:32 PM, Henry Versemann
wrote:
> Vijay,
>
> I tried your method, and while it got me the table class that I wanted,
> fo
In the title: "'OrderedDict' object has no attribute 'keyOrder'"
On Thu, Apr 16, 2015 at 6:13 AM, Pavel Kuchin
wrote:
> Hi Willy,
>
> Can you send an error, because I see only the SignupFormExtra class.
>
> Yours sincerely,
> Pavel
>
> четверг, 16 апреля 2015 г., 1:41:47 UTC+3 пользователь willy
Why are you talking to me? I'm not OP xD
On Thu, Apr 16, 2015 at 9:57 AM, Pavel Kuchin
wrote:
> Hi Vijay,
>
> Looks like Django does not use SortedDict anymore
> (
> https://github.com/django/django/commit/07876cf02b6db453ca0397c29c225668872fa96d#django/form
Are the queries associated with a certain form? Or they are arbitrary
queries?
On Mon, Apr 20, 2015 at 10:01 AM, guettli wrote:
> We want to store the QuerySet query (not the result) some how.
>
> Background: users should be able to save a complex query as "my favorite
> query".
>
> Pickling que
Overwrite the constructor of the form (__init__), pass the user or whatever
parameters you may need and overwrite the choices of the field in the body
of the method.
On Mon, Apr 20, 2015 at 10:56 PM, Steve Hiemstra
wrote:
> I am trying to build a form with dynamic choices. e.g., the choices shou
Do you only need to serialize Q objects? No aggregation / annotations?
On Tue, Apr 21, 2015 at 8:00 AM, guettli wrote:
>
>
> Am Montag, 20. April 2015 17:12:21 UTC+2 schrieb Vijay Khemlani:
>>
>> Are the queries associated with a certain form? Or they are arbitrary
>
I think it's better to pass the email as a query parameter instead of in
the path
/acceptfriend/?email=hpenvy%40hp.com
Or even better, use a POST request, since it seems the request will touch
the DB and have side effects.
On Tue, Apr 21, 2015 at 6:02 PM, Bill Freeman wrote:
> The @ in the ema
What about and old-school DetailView?
def get_context_data -> Creates the two forms and puts them in the context
def post -> Validates and process the forms
On Tue, Apr 21, 2015 at 7:41 PM, Ilya Kazakevich
wrote:
> Hello,
>
> I have several models with one-to-one relation. For example
>
> cl
What specific version of Python are you using (2.7...x?)
On Wed, Apr 22, 2015 at 8:26 PM, John DeRosa
wrote:
> Oh, sorry.
>
> Well, you’re using joblib. The joblib.load() call loads something and
> return a Python object into the symbol clf.
>
> It would seem you need to look at the object that
user_passes_test is for decorating functions, not classes
Django Rest Framework has its own system for permissions (and you seem to
be already using it)
http://www.django-rest-framework.org/api-guide/permissions/
Use that instead I think
On Sun, May 3, 2015 at 2:35 PM, Shekar Tippur wrote:
>
The line that's failing is not for the User model, but for the BeeradUser
model.
Assuming this is your same model
http://stackoverflow.com/questions/29913814/creating-new-account-with-or-without-modelforms-and-designing-with-html-css
Then I guess you have a "is_active" field in the BeeradUser mo
The paths inside statcosti.html are absolute to the filesystem of your
machine, so they don't make sense for the web server
For example
resolves to (asuming localhost at port 8000)
http://localhost:8000/var/www/magazantea/templates/R2HTML/grafico2.png
So your browser makes a request to Django
Maybe the brackets confuse the querydict, try calling its items method (to
convert it into a list of tuples) or its dict method (to turn it into a
normal python dict)
On Thu, May 21, 2015 at 3:34 PM, Fellipe Henrique
wrote:
> Any ideas?
>
> I finish all my possibilities in these problem.. :( and
Try posting the source code involved (model, view, template, maybe a form
if there is one) because just by your description is kinda hard to check
what is wrong.
On Sat, May 23, 2015 at 3:11 AM, gabn88 wrote:
> I have multiple checkboxes which are coming from a model with a single
> value. This
If some of the fields are "already approved" and thus they can't be edited,
why are you rendering those as editable form fields in the first place?
On Tue, May 26, 2015 at 9:55 PM, Gergely Polonkai
wrote:
> Hello,
>
> I'm currently having hard times changing a form field's value from within
> th
https://pip.pypa.io/en/latest/installing.html
On Tue, Jun 2, 2015 at 7:37 PM, Steve Burrus
wrote:
> how do I get get-pip.py?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails f
I don't think you should be doing that kind of work in the web server
process.
If you want to run a task that may take a long time to finish then use
celery or something like that.
On Fri, Jun 5, 2015 at 1:34 PM, dk wrote:
> this is what I got from putting
> *time.sleep(60)*
> *print "s
It doesn't answer the question, but why don't you want to render the field
automatically?
On Tue, Jun 9, 2015 at 6:47 PM, wrote:
> Hi,
>
> I have the same problem of this guy (
> http://stackoverflow.com/questions/21884631/keeping-option-selected-after-form-is-submitted-in-django),
> but I do no
You can add methods to your model class
class Container(models.Model):
name = models.CharField(max_length=128)
capacity = models.IntegerField()
contains = models.IntegerField()
def usage_percentage():
return 100.0 * self.contains / self.capacity
And in your template
{% i
Wihtout knowing anything about your project, I think going RedHat + Oracle
might be a bit overkill, especially Oracle since it is a mess to configure
and tune.
Have you considered CentOS as an alternative? same binaries and libraries
as RedHat but completely free, and also easier to deploy in the
Subclassing the django.forms.widgets.Select class and setting it as a
widget for the form field.
On Wed, Jun 10, 2015 at 2:13 PM, wrote:
> I decided to use {{ form.activity }} instead of that code above, but it is
> a bit strange, it should work in that way.
>
> Now, I'm using django-widget-twea
If the description is stored as HTML I guess you could use something like
BeautifulSoup or pyquery to parse it and find the tag
from bs4 import BeautifulSoup
soup = BeautifulSoup(blog.description)
image_src = soup.find('img')['src']
On Mon, Jun 15, 2015 at 8:59 AM, Robin Lery wrote:
> I have
No, you need to post the parts of your code that may have triggered the
error.
In this case, your urls.py and the method in your views.py that handles the
request probably.
On Mon, Jun 15, 2015 at 9:32 PM, Shekar Tippur wrote:
> James,
>
> Is this what you mean?
>
> - Shekar
>
>
>> Environment:
the package is called "rest-framework" and it includes the authtoken app
http://www.django-rest-framework.org/api-guide/authentication/
INSTALLED_APPS = (
...
'rest_framework.authtoken'
)
On Thu, Jun 18, 2015 at 3:00 PM, Daniel Grace wrote:
> What is the preferred way of adding social
How is your project folder structure?
If you open a normal python shell from the same directory as your manage.py
and execute "import myapp.settings" what does it say?
On Fri, Jun 19, 2015 at 1:16 PM, Todd Kovalsky
wrote:
> Having a miserable time trying to get a django site running on a wintel
What is the actual content of request.body? (as in, "print request.body")
On Sun, Jun 21, 2015 at 9:26 AM, Dhaval M wrote:
> Thank you in advance for any help (this is my first post to this community)
>
> I am using Django as my application server for my project. I am new to web
> development so
Are you using a ModelChoiceField?
https://docs.djangoproject.com/en/1.8/ref/forms/fields/#modelchoicefield
Or a normal ChoiceField setting the choices manually?
On Thu, Jun 25, 2015 at 11:28 AM, dragon wrote:
> Hi!
>
> I have a form with a choice field. I fill it from a model let's name it
> A
You could dynamically create a ModelForm based on the model class:
from django.forms import ModelForm
MetaClass = type('Meta', (), {'model': ProductItemText})
MetaModelForm = type('ProductModelForm', (ModelForm, ), {'Meta': MetaClass})
form = MetaModelForm()
The only thing you would need is th
Try with
Contact.objects.all()[0]
On Mon, Jul 6, 2015 at 1:03 PM, Chris Strasser
wrote:
> I tried and this happens:
>
> from main.models import Contact
>
> >>> contact = Contact.all()[0]
>
> Traceback (most recent call last):
>
> File "", line 1, in
>
> AttributeError: type object 'Contact'
To tell you the truth I'm not quite sure what are you trying to accomplish,
but for starters if you have a select multiple widget then your form field
should be a forms.MultipleChoiceField
On Mon, Jul 13, 2015 at 4:38 PM, dk wrote:
> I made a quick project with an app, that might be easier to s
I remember this question from... february I think, what's changed since
then?
On Tue, Jul 14, 2015 at 3:29 PM, Robin Lery wrote:
> I would like to convert video into mp4 using ffmpeg and celery for the
> asynchronous task. When user uploads a video, it will be for the
> original_video and save i
I guess any kind of report they want to generate will require some
knowledge of relational databases.
Considering that, I think Jasper Reports is a good tradeoff, It has a
graphical interface to create the queries, and the reports can be accessed
by anyone after it's query and design is done.
On
I think in those cases you would need to add some custom logic to your view
to check whether the URL is valid for the "step" the user is in the
workflow.
On Fri, Oct 10, 2014 at 10:47 AM, robert brook wrote:
> I know how to detect an ajax request.
>
> I am interested int the general issue of the
You need to pass a dictionary as a second parameter to
the render_to_response method with the variables that you wish to access in
the template.
for example:
return render_to_response('index.html', {"people_info": pers})
that way you can access the variable "people_info" in the template.
On Th
It would be useful to see the path rendered in the final HTML in the
document, as it could be related to the "STATIC_URL" setting or some other
cause.
On Thu, Oct 16, 2014 at 11:44 AM, Babatunde Akinyanmi
wrote:
>
> On 16 Oct 2014 15:36, tundeba...@gmail.com wrote:
> >
> > Hi,
> > > %}" />
> >
If you are usign class based generic views you can use the decorators in
the URL config of your app, for example
urlpatterns = patterns('',
(r'^about/', login_required(AboutView.as_view())),
)
On Thu, Oct 16, 2014 at 12:49 PM, Rootz wrote:
> Can I use both Generic View and the Django.contr
I agree, but we need to determine where the problem lies.
is the STATIC_URL param OK? is the STATICFILES_DIRS setting correct?
I think the starting point is checking whether the url to the static asset
is being determined correctly and then move forward.
On Thu, Oct 16, 2014 at 3:00 PM, Daniel R
101 - 200 of 446 matches
Mail list logo