Deploying your Django site doesn't have to be that painful. You can do it
in a single command with https://github.com/gcollazo/Fabulous. It'll take
you about an hour to have a full stack running with a bit of tweaking.
On 18 December 2014 at 11:11, James Schneider
wrote:
>
> As a reformed PHP and
Or use .latest()
On 19/12/2014 11:00 pm, "aRkadeFR" wrote:
> Hello Cássio,
>
> You first need to map your cars table with a Model in Django
> (https://docs.djangoproject.com/en/1.7/topics/db/models/),
> then you can construct your query something like this:
>
> Car.objects.order_by('-registered'
Look into celery. It's the best and easiest way to run bg jobs imo
On 08/01/2015 9:10 pm, "Sugita Shinsuke" wrote:
> Hi there.
>
> I'd like to run background application.
>
> I coded this code.
>
> I wrote the urls.py and I added in the view.
>
> def run_junix(request):
> cmd = "cd app_path;n
In this case you need to store templates in db which means you need to have
a custom loader for your templates. I think that this app does what you
need https://pypi.python.org/pypi/django-dbtemplates
Cheers,
M
On 25/11/2013 1:39 AM, "Harjot Mann" wrote:
> In django Is there any way through whi
I like Zinnia. It's a gun. I had issues understanding some of the code as
it's all built in CBVs, but once you get your head around it it rocks. Has
everything a blog should have and documentation is great. Even a WP import
tool is in it!
https://github.com/Fantomas42/django-blog-zinnia
On 4 Dec
Since the request is simply a dictionary, can you not append that attribute
to it?
On 28/12/2013 7:41 am, "alk...@gmail.com" wrote:
> I'm trying to access an attribute of the current view instance in the
> middleware layer.
>
> For example, given a class-based view like this:
>
> # views.pyclass
Sounds like you need 2.7 or at least 3. Check out this answer on SO
http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python
Can't have print('Your environment
is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))
Should be *print('Your environment
is:"{0}"'
It's hard to tell what the issue is from what you've posted, Igor. Have you
looked at Chrome inspector to see if there are any js errors in it? Or have
you tried inspecting the page to see if it's not some weird css issue? Try
placing usb_data into html outside of js or console.log data var to see
In your template try {{usb_data|safe}}
On 18/01/2014 4:53 pm, "Igor Korot" wrote:
> Hi, ALL,
> I'd like someone to help me understand this situation.
> Looking at the page:
> https://docs.djangoproject.com/en/dev/topics/serialization/ the part
> which says "Serialization formats->JSON" there is a
Try {% csrf_token %} by itself
On 19/01/2014 12:12 pm, "Chen Xu" wrote:
> Hi everyone,
> I am using Jinja2 instead of Django's own template engine, however I am
> having an issue where csrf_token is empty, I included the following line in
> my form:
>
>
>
> But csrf_token has no value.
>
> Can s
Eway is a great gateway for OZ and quite easy to integrate. Not sure how
well it works with other currencies.
On 25/02/2014 10:21 am, "lu zou" wrote:
> Can someone please advise some payment gateway which is friendly with
> mezzanine(cartridge) based project ,which is also easy to be implemented
You do have to be careful with templates if you're using too many
inclusions or if you have too much logic in them. There's a good django
debug toolbar add-on that informs you about the time a template takes to
compile.
On 27/02/2014 9:47 am, "ApathyBear" wrote:
> I was briefly talking with a dev
Amazon now has a dc in Sydney. I believe that Gondor is au based as well.
On 03/03/2014 10:44 pm, "lu zou" wrote:
> As above, can anyone suggest me some host which is Australia based and
> also django friendly?:)
>
> --
> You received this message because you are subscribed to the Google Groups
>
Return your context in json format, load it into js var and then use
.each() on it.
On 19/03/2014 3:27 am, "Kelechi Anyanwu" wrote:
> Hi guys!
>
> How do i use JQuery to loop through a chunk of Django RequestContext being
> returned to my template.
>
> Please i need response!!
>
> Thanks.
>
> --
There are a few ways in which you can do this. One of them is to add some
javascript to your code that will listen to onclick and check if your input
button is selected. If it is it will submit the form that initiates your
download. You can also do an Ajax post. Another way would be to create a
lin
You can use {{form.field_name}} to render the input tag,
{{form.field_name.label}} to render the label
and {{form.field_name.errors}} to render field errors. Simple example:
{{ reorder_form.comments.label }}
Have you tried user_list.exclude(user=user)?
On 10 April 2014 12:45, nobody wrote:
> Hi,
>
> I tried following statement, but did not remove the item from the list,
> appreciate any helps.
>
> user_list.exclude(user__username=user.username)
>
> Thank you.
>
> Kind regards.
>
>
> --
> You recei
I believe when you say framework you're referring to CMS with e-commerce. I
in same dilemma recently and settled on Mezzanine + cartridge. When you
install it it comes with a functioning cart and everything you need to get
ahead early. It has good docs and it's just Django without much magic in
it.
Two scoops is not a beginner's book. Start with tutorials. The one on
django site is a must, but there are lots of other tuts as well on the net.
Tango with django is a good one. Also django book is awesome resource
although somewhat outdated now. But I'd read first 7 chapters anyway
On 20/04/2014
Your clean method needs to return cleaned_data I believe
On 28/04/2014 10:02 pm, "Daniel Watkins"
wrote:
> Hello all,
>
> We're running in to an interesting validation problem. We have a model
> which represents a (specific type of) date interval, bounded by a start
> date and end date. Both fie
You'll need to create your own admin in that case. For 90% of my projects
I've unfortunately had to do that. You can find a good admin console kit,
perhaps something based on bootstrap and use the components to create
whatever you want. I usually use one called Metronic.
On 01/05/2014 7:43 pm, "Ken
Usually in the same templates directory your publisher_list.html is in.
On 05/05/2014 2:28 pm, "Venkat Subbiah" wrote:
> Trying to follow the generic views from this tuotorial. Where would be
> "base.html" be located.
>
> https://docs.djangoproject.com/en/1.6/topics/class-based-views/generic-disp
I assume you're using datetime object in which case you have a look at this
SO answer
http://stackoverflow.com/questions/3463930/how-to-round-the-minute-of-a-datetime-object-python
On 7 May 2014 17:55, hito koto wrote:
> Hi , good afternoon!
>
> I want to the round-up display function of time,
So, you basically need a shopping cart. Use sessions.
Other option would be to store everything in cookies and use js to
manipulate the products.
On 08/05/2014 11:25 pm, "Chi-Cheong Weng" wrote:
> Hi guys,
>
> I have been using Django for a little more than a year now, but I still
> cannot think
Try instead.
On 14 May 2014 13:26, hito koto wrote:
> I'm also have the erroes
>
> Exception Type: NoReverseMatch Exception Value:
>
> u'article.views.main year|add' is not a registered namespace
>
>
>
>
> 2014年5月14日水曜日 12時19分06秒 UTC+9 hito koto:
>
>> Hello,
>>
>> this time i have this the er
That should work. Do you get any errors?
On 16/05/2014 8:53 pm, "Coulson Thabo Kgathi" wrote:
> if o get an object like this
>
> p = Plot.objects.get(plot_plot_identifier='123323423')
>
> then do
> p.selected=1
> p.save()
>
> this does not save dont know why.
> the is no where the field is being
You can use init instead.
On 06/06/2014 5:09 am, "Kwest Ambani" wrote:
> Anyone know an alternative for Supervisor? I need something to keep
> Gunicorn running in the background. My server is running Python 3.3.2. with
> Nginx serving only static files.
>
> --
> You received this message because
I know this may sound silly but is there some kind of JavaScript code that
may be messing things up? Had a similar issue before and it was related to
JavaScript stupidity.
On 05/06/2014 10:39 pm, "Juergen Schackmann"
wrote:
> - all app servers are running the same code with same settings.
> - DNS
Ricardo is correct. But make sure you use abstract model for Customer in
this case. I use the AbstractUser a lot because in most cases the customers
need to be system users and have a log in etc.
On 24 June 2014 02:08, Ricardo Daniel Quiroga
wrote:
> Hi
> I think I would do as follows :P
>
Use commit=False when saving the form, add all the other attributes and
then call save(). E.g.
obj = form.save(commit=False)
obj.additional_stuff = additional
obj.save()
But some of that stuff such as creation date and time can be done
automatically at the model with auto_now=True
On 24 June 20
PyCharm IDE does a lot of this stuff. It's great at pointing out bad code.
But you can try https://chris-lamb.co.uk/projects/django-lint which is a
wrapper around pylint
On 24 June 2014 10:19, Mayur Sharma wrote:
> Hi,
>
> I am looking for industry level Django Static Analysis tools. Most of th
You don't want to use a csv. Store them in a db table cell. Even if you
have a million entries you'll be surprised how quick it will be.
On 26/06/2014 12:45 am, "Subodh Nijsure" wrote:
> Hello
>
> I have need to store data that can be graphed. Example I have mobile app
> that collects temperature
I always follow a similar pattern for media uploads and it works, so here
it is:
in settings.py
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
in your model:
file = models.ImageField(upload_to='wiki')
say you upl
Sounds like you have a js issue now. Have a look inside chrome console for
any errors and fix them. Modal not coming up wouldn't be a django issue.
On 28/06/2014 5:41 am, "sarfaraz ahmed" wrote:
> Hello,
>
> You were absolutely right.. the function was wrong. Please help me sort
> out that.. as t
Hey Jorge,
I think you should extend the Abstract User instead of doing it the old
way, which is creating that OneToOne relationship with a custom model. So,
you'll end up with this:
class IndependentAgent(AbstractBaseUser, PermissionsMixin):
tipo_licencia = models.CharField(max_lenght=140)
I’d recommend you to look at crispy forms as well.
On Sat, 2 Dec 2017 at 1:29 am, yingi keme wrote:
> Hey, i made a mistake in the previous reply. Its widget and not widgets.
> The correct code is:
>
>
> Intead of rendering it with the as_p. You can render them individually.
> ie
>
> {{form.name
You should use django-auth-ldap. It will give you the ability to bind ldap
attributes with the attributes from your user model using a dict inside
settings. It’ll also get the users’ groups and create those groups inside
Django. So try plugging that in and come back if you get stuck. All you
really
Mac or Linux with PyCharm. Windows can be used but you may struggle with
some Python packages which work well and are easily setup on nix.
On Wed, 3 Jan 2018 at 8:40 am, Mike Morris wrote:
> I've been linux only for many years - the last Windows I used was 2000
> Professional so you can gues
There's a nice LDAP app for Django at
https://pypi.python.org/pypi/django-auth-ldap/1.2.8 but I'm not sure if
it's suitable for what you need to do. I think you need a Python LDAP
module to create a connection, bind, perform a simple search and then parse
the results to get those email addresses.
It all depends what you want to do, Chris. I suggest you to find a html
template on sites like template monster or theme forest, split it into base
and extract page from it, make Django serve the static pages and then make
those features that should be driven by database dynamic by creating models
Take a look at Django Compressor.
On Tuesday, 1 November 2016, Web Architect wrote:
> Hi,
>
> Is there an optimal and efficient way to minify HTML in Django?
>
> I tried using django-htmlmin but it's affecting the performance.
>
> Thanks.
>
> --
> You received this message because you are subscr
You should use Django-PayPal app. It has views for IPN and PDT, stores
transaction details in DB, does TX verification and it fires of a signal
when when a successful transaction comes in to your webhook.
All you have to do is specify some URLs and settings. It'll even render
that front end form f
Or kill all python processes or try a different port in your config
On Fri, 23 Jun 2017 at 11:41 pm, Matthew Pava wrote:
> I’ve had this problem a few times. First, try updating PyCharm. I find
> when I click on my runserver icon, I just keep clicking it until it works.
> Not much of a fix, bu
Does that Guniorn command run directly from the command line? What's
gunicorn.pod? Make sure you can start gunicorn outside of supervisor and
then stick that command into conf file.
Cheers,
M
On Sun, 10 Sep 2017 at 2:28 am, Jonathan Cheng
wrote:
> I wrote a Django project and I use supervisor
+1 angular. Stack overflow is your friend and there's a lot of angular on
it. You can do a lot with it with basic knowledge as well. And template
syntax will make sense going to it from django
On 10 Sep 2015 3:53 pm, "Gergely Polonkai" wrote:
> Hello,
>
> this is a bit off topic here, and highly
Try this guide
http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
On 18 Sep 2015 6:55 am, "Hugo Kitano" wrote:
> What is the nginx config? And where do I find it?
>
> On Tuesday, September 15, 2015 at 12:46:40 PM UTC-7, Shawn Milochik wrote:
>>
>> It's very si
Did you mix up https://docs.djangoproject.com/en/1.8/intro/tutorial01/ and
https://docs.djangoproject.com/en/1.9/intro/tutorial01/? 1.9 has apps.py
inside polls directory and 1.8 tutorial doesn't. So, I think you have
INSTALLED_APPS setting from 1.9 tutorial inside 1.8.7 project...
On Thu, 10 Dec
You're missing a comma after my app inside installed_apps.
You can load bootstrap from cdn inside head, before your custom style
sheet. Not a problem there.
Pip install crispy forms. They'll end up in your site-packages folder. No
need to download it and put it inside your project.
Run collectst
Give cloudinary a go. It's really good especially for images and pdf
On Friday, 26 February 2016, Andrew Pinkham wrote:
> Heroku should be treated as the stateless portion of an app - do not store
> long term data there! (Same goes with services like EC2 and Digital Ocean.)
>
> Rackspace and Mic
http://stackoverflow.com/questions/3538999/django-admin-search-how-to-override-the-default-handler
On Monday, 28 March 2016, wrote:
> I need know how change the search that come with Django's Admins.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django use
Look for fabulous on GitHub. It sets up all of that on ec2.
On Wednesday, 6 April 2016, Neto wrote:
> I need a fabric to install Sentry, Redis, and configure the server with
> nginx template, supervisor etc.
> I have a Amazon Instance, and I want with a command install everything.
> I have follo
I think you're posting this to a wrong list Gary. This od django list.
On Friday, 22 April 2016, Gary Roach wrote:
> Debian Stretch system
> amd64 system
>
> A couple of weeks ago I updated my system and all of my desktop icons
> start looking as shown in attachment.
>
> Anyone have an idea wha
201 - 252 of 252 matches
Mail list logo